Small & Easy Programming Language written in Rust based on the awesome book Crafting Interpreters
Follows closely the book to produce an Interpreted and a Bytecode Compiled version as an exercise to learn about Compilers in a practical way with a deeper understanding of Rust.
Did not want to name it Lox or Rlox too. While I might extend in future to make it moderately useful. Lako means Easy in Croatian/Bosnian - although I am not Croatian or Bosnian it seems a short and simple name to pronounce different from everything else.
Status:
April 2023 update:
- Resuming after a loooong period of inactivity. Forgot half of what I wrote.
- Restarted from scratch evaluating and updating every piece of code:
- Finished & tested scanner and tokenizer - OK.
Need to redo - have errors when supposedly this used to work fine:
- Finished Expressions Syntax Tree and tested AST printer.
- Finished & tested parser (chap 6). For now it just prints the parsed expression back handling precedence and associativity correctly.
As a repl. Just launch Lako. To exit Ctrl-c.
./lako
With source file. ie with "test.lak":
./lako test.lak
Not started yet...
For now it mirrors the basic capabilities of Lox
- High level: dynamic typing, automatic memory management.
- Data types: booleans, numbers, strings, nil (ugh).
- Expressions: arithmetic, comparison / equality, logical operators, precedence / grouping.
- Syntax, Statements & Control Flow: follows C based languages for familiarity.
- Functions are first class.
- OOP: Classes & Inheritance.
- Minuscule Standard Library: starting off with just print & clock
- Created in Rust