Skip to content

Commit

Permalink
Enable trailing whitespace
Browse files Browse the repository at this point in the history
Also add trailing whitespace to sanity test as a primitive regression test
  • Loading branch information
joeri committed Aug 22, 2009
1 parent c87038c commit e1abfa0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/parser/grammar.pg
Expand Up @@ -29,7 +29,7 @@ rule stmts {
<.term>?[ <stmt> [<.term>+ | <.before <end_block>> | $ | <panic: unterminated statement>] ]* {*}
}

token term { \n | ';' }
token term { \h*\n | \h*';' }
token end_block { <.ws> [ 'end' | '}' ] }

token basic_stmt {
Expand Down
10 changes: 5 additions & 5 deletions t/00-sanity.t
Expand Up @@ -5,13 +5,13 @@ puts "1..5" if 1

# comments work!
#
puts "ok 1"

puts "ok 1"
puts "ok 2" ; puts "ok 3"

print "ok "; print 1 + 3; print "\n"

print "ok #{ 2 * 2 + 1 }\n"


; ; ; # Trailing whitespace should not be a problem for the code

0 comments on commit e1abfa0

Please sign in to comment.