diff --git a/src/parser/grammar.pg b/src/parser/grammar.pg index 9185e35..f296f02 100644 --- a/src/parser/grammar.pg +++ b/src/parser/grammar.pg @@ -29,7 +29,7 @@ rule stmts { <.term>?[ [<.term>+ | <.before > | $ | ] ]* {*} } -token term { \n | ';' } +token term { \h*\n | \h*';' } token end_block { <.ws> [ 'end' | '}' ] } token basic_stmt { diff --git a/t/00-sanity.t b/t/00-sanity.t index 44eb1b8..91d6d0e 100644 --- a/t/00-sanity.t +++ b/t/00-sanity.t @@ -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