Porting the tree-walk interpreter for the Lox programming language to Go.
I am in the process of porting the Lox programming language, as described in Part II of Crafting Interpreters to Go.
- Ported the Scanner.
- Started porting the tokenizer, (5) != (6) spits out an ugly-printed AST as BinaryExpr { Left GroupingExpr { Expr LiteralExpr { Value 5 } };; Operator Type != Lexeme != Literal Line 0 ;; Right GroupingExpr { Expr LiteralExpr { Value 6 } } }
- go run main.go [filename] OR go run main.go which starts a prompt for you to input source code.
- You can look up the Lox syntax
- As of now, on input-ing source code, it will spit out the AST (not for all statements, but basic ones -> completed Parsing expressions)