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.
20 lines
307 B
Lox
20 lines
307 B
Lox
// 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
|