Hi guys,
If you clone the master repo, you can see the new ASTInterpreter and
ASTDebugger classes.
The ASTInterpreter is able to interpret Amber code without compiling it
into JS. The debugger, a subclass of the interpreter, has stepping
capabilities.
While it's not 100% working yet (the tests show that the interpret
supports most of the language already), you can give it a try with the
SUnit tests, or by running something like the following:
| ast debugger |
ast := Smalltalk current parse: 'foo 1 + 2 + 4'.
(SemanticAnalyzer on: Object) visit: ast.
debugger := ASTDebugger new
context: (AIContext new receiver: Object new; yourself);
interpret: ast nodes first;
yourself.
debugger step; step.
debugger step; step.
debugger result."Answers 1"
debugger step.
debugger result. "Answers 3"
debugger step.
debugger result. "Answers 7"
Cheers!
Nico
--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[hidden email].
For more options, visit
https://groups.google.com/groups/opt_out.