Commit Graph

2 Commits

Author SHA1 Message Date
Bob Nystrom
8bb1a94a25 refactor: convert IO from singleton instance to static class with metaclass native methods
Replace the global `io` singleton object with a static `IO` class, moving the `write` native from the instance to the metaclass. Update all benchmark, example, and test files to use `IO.write()` instead of `io.write()`.
2013-12-22 03:25:09 +00:00
Bob Nystrom
8ff3684cbd 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.
2013-11-01 13:57:21 +00:00