A tiny, WIP programming language written in rust that contains a lexer, parser and interpreter. So far can only print, create variables and comment.
let animal = "frog"; let legs = 4;
blurt "The {animal} has {legs} legs";
Prints: "The frog has 4 legs"
Put your code in a file like hello.blurt, then:
cargo run -- hello.blurt
- Every statement ends with ;
- blurt "text";` prints text
- let name = "text"; or let name = 5; stores a value
- {name} inside a blurt string fills in the variable
- "#" starts a comment that lasts until the end of the line
- Math
- Error messages with line numbers
- Quotes inside strings
- "if" and loops
lexer.rs splits text into tokens, parser.rs turns them into statements, and interpreter.rs runs them.