fix: allow files without trailing newline in block compilation

The compiler previously required a TOKEN_LINE after each statement in a block,
causing parse failures for files missing a final newline. Changed consume() to
match() with conditional break, and added a test case for no-trailing-newline
files.
This commit is contained in:
Bob Nystrom
2013-11-01 13:57:21 +00:00
parent 5a9330be0e
commit 8ff3684cbd
2 changed files with 2 additions and 2 deletions
+1
View File
@@ -0,0 +1 @@
io.write("ok") // expect: ok