Skip to main content

Module interpreter

Module interpreter 

Source
Expand description

Tree-walking interpreter for the Virtual Rust VM.

§Architecture

The interpreter is split into focused sub-modules:

ModuleResponsibility
valueRuntime value types (Value enum)
environmentVariable scoping (scope stack)
errorRuntimeError definition
builtinsBuilt-in functions & macro dispatch
methodsMethod call dispatch (String, Array, Int, …)
[format]Format-string processing ({}, {:?}, {:.2})
patternPattern matching for match expressions
castType casting (as expressions)

Re-exports§

pub use environment::Environment;
pub use error::RuntimeError;
pub use value::Value;

Modules§

builtins
Built-in function and macro dispatch.
cast
Type casting (as expressions).
environment
Variable scoping and environment management.
error
Runtime error type for the interpreter.
format
Format string processing ({}, {:?}, {:.2}, {0}, etc.).
methods
Method dispatch for built-in types.
pattern
Pattern matching logic for match expressions.
value
Runtime value representation for the Virtual Rust interpreter.

Structs§

Interpreter
The tree-walking interpreter that evaluates an AST.