Implementing an interpreter for an imaginary language with reference to "Thorsten Ball - Writing An Interpreter In Go"
- C-like syntax
- variable bindings
- integers and booleans
- arithmetic expressions
- built-in functions
- first-class and higher-order functions
- closures
- a string data structure
- an array data structure
- a hash data structure
Lexer - Supports ASCII Characters, identifiers contain only letters, whitespaces are seperators (not a part of syntax)
Parser - Recursive-Descent Parser, uses an AST (Abstract Syntax Tree), built from ground up, Top-Down Operator Precedence (Pratt Parser), Prefix and Postfix Expression parsing
Evaluator - Tree-walking interpreter, uses Go's inbuilt Garbage Collector, contained scopes (termed Environments), all values are "Objects"
Macro System - A LISPy macro system which expands the Macros by changing and returning changed nodes to the AST. Uses "quote" and "unquote" to halt execution of current line or let it evaluate, respectively.