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
5341bdcbb3 feat: add null literal token and compiler support with keyword parsing and test cases
Introduce TOKEN_NULL to the token enum and register it as a prefix parse rule that emits CODE_NULL. Implement the null() compiler function to emit the null constant. Extend readName() to recognize the "null" keyword and map it to TOKEN_NULL. Add test files verifying null output, and that null, true, and false cannot be used as variable names.
2013-11-06 02:22:22 +00:00