feat: replace recursive descent parser with grammar-driven approach and add method call infrastructure
Refactor compiler.c to remove recursive descent parsing infrastructure (InfixCompiler, CompileFn, precedence enums) and replace with a simpler grammar-driven approach using statement(), call(), primary(), and number() functions. Add VM struct to compiler.h and vm.h with symbol table support, including getSymbol() for method name resolution. Introduce CODE_CALL opcode in VM interpreter with basic call dispatch. Update main.c to use new VM lifecycle (newVM/freeVM) and pass VM through compile and interpret calls.
This commit is contained in:
+2
-1
@@ -1 +1,2 @@
|
||||
21212
|
||||
123.ok
|
||||
123.yar
|
||||
|
||||
Reference in New Issue
Block a user