Initialize Rust implementation of Lox interpreter
This initial commit sets up the basic structure for a Rust implementation of the Lox interpreter, including: - Lexer for tokenizing source code - Parser for building AST - Basic interpreter functionality - Environment for variable storage The core components include source tracking, error handling, and basic expression evaluation.
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
// var Person :: struct {
|
||||
// name: String,
|
||||
// age: Int,
|
||||
// address: String,
|
||||
// }
|
||||
// var func_name :: fn(param, param2) {param is Int} do
|
||||
do
|
||||
print "ciao";
|
||||
1 + 2;
|
||||
var cavallo = 1 + 2;
|
||||
cavallo = cavallo + 1;
|
||||
print cavallo;
|
||||
cavallo
|
||||
end
|
||||
do
|
||||
print "cavallo";
|
||||
89
|
||||
end
|
||||
99
|
||||
Reference in New Issue
Block a user