The parser now correctly produces a workable AST. I think I'll skip over the optimizer, and begin on the compiler next session. The optimizer will act directly on the AST, but it isn't totally necessary. Other tools can also operate on the AST, such as for debugging - I'll have to ask what kinds are out there.
Toy
The Toy programming language is an imperative, bytecode-interpreted, embedded scripting language. Rather than functioning independently, it serves as part of another program, the "host". This design allows for straightforward customization by both the host’s developer and end users, achieved by exposing program logic through text files.
This repository holds the reference implementation for Toy version 2.x, written in C.
Nifty Features
- Simple C-like syntax
- Intermediate bytecode interpretation
- Strong, but optional type system
- First-class and higher-order functions
- Extensible via external libraries
- Re-direct output, error and assertion failure messages
- Open source under the zlib license
Syntax
Omitted for review.
Building
Omitted for review.
Tools
Omitted for review.
License
This source code is covered by the zlib license (see LICENSE).
Past and Current Contributors
@hiperiondev - Disassembler, porting support and feedback
@add00 - Library support
@gruelingpine185 - Unofficial MacOS support
@solar-mist - Minor bugfixes
Unnamed Individuals - Feedback
Patrons via Patreon
- Seth A. Robinson
Special thanks to Robert Nystrom of http://craftinginterpreters.com/ for their fantastic book that set me on this path.
