Skip to main content

Crate doge_interp

Crate doge_interp 

Source
Expand description

Doge’s tree-walking interpreter. It evaluates a checked AST through doge-runtime, sharing value operations with generated Rust; the examples parity suite enforces identical behavior without a rustc build.

Structs§

ClassInfo
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 repl session reuses one Interp across snippets, so bindings persist.
SessionScope
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 super checks). 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§

ReplParse
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 .doge file through the interpreter (the parity path beside doge build). Takes the program by Arc so a pack.zoom pup can rebuild an interpreter over it.