Skip to main content

Questions tagged [tree-walker]

Use for questions about building tree-walking interpreters, a style of interpreter working by recursively traversing the abstract syntax tree of the language.

8 votes
1 answer
550 views

How are coroutines implemented in a tree-walking interpreter?

It seems to me that coroutines and derived abstractions like the iterators and generators are implemented the following way: When returning Move the function's stack frame to the heap Save a pointer ...
Matheus Moreira's user avatar
7 votes
3 answers
560 views

How do I Interpret a Continue/Break Statement in a Loop?

Say I have the following construct in an interpreted language that uses an AST tree walker: ...
lyxal's user avatar
  • 2,045