Expand description
A tree-walking interpreter for Doge — the second execution engine beside the
Rust-transpiling compiler. It evaluates a checked AST directly against
doge-runtime, so doge repl (and the interpreter path in general) skips the
rustc build entirely. Every value operation calls the same doge-runtime
function the generated Rust would, so an interpreted program behaves
identically to a compiled one — a guarantee the examples parity suite enforces.
Structs§
- Class
Info - One class already defined in a REPL session: its name, the parent it inherits from (if any), and its method names.
- Interp
- An interpreter session. Holds the program-wide callable and class tables, one
scope per file, and the mutable run state (recursion depth, current location).
A
doge replsession reuses oneInterpacross snippets, so bindings persist. - Session
Scope - The accumulated top-level scope of a REPL session: every name in scope, the
subset that are constants, and the object definitions (for inheritance and
superchecks). A snippet is checked as if these were already declared, so it can reference — and redefine — anything earlier snippets introduced. Built by the interpreter from its live session state, so the checker and the runtime always agree on what exists.
Enums§
- Repl
Parse - The outcome of parsing an interactive REPL snippet.
Functions§
- run_
program - Run a whole loaded program to completion: initialize every module, then
execute the entry file’s top-level statements. Used to run a
.dogefile through the interpreter (the parity path besidedoge build).