fix: handle empty and comment-only files by removing early skip in repl and compiler

Remove the empty-line check in runRepl that skipped interpretation for blank input, and refactor the main compilation loop in wrenCompile to use a while loop with TOKEN_EOF matching instead of a for loop with redundant EOF break. This allows the compiler to process files containing only comments or whitespace without prematurely terminating, fixing issue #57. Add test fixtures for comment-only source files.
This commit is contained in:
Bob Nystrom
2015-01-04 21:00:53 +00:00
parent a6bef8586f
commit ed31544ead
5 changed files with 5 additions and 9 deletions
+1
View File
@@ -0,0 +1 @@
// comment
@@ -0,0 +1 @@
// comment
View File