Construct a new visitor for a block of code inside the AST.
Optionalparent: ExpressionVisitor | StatementVisitorParent context of the surrounding code block.
Deferred statement to be executed at the end of the current block.
Exported constants and functions usually from a module declaration.
Local context for immutable (const) variables.
Imported names.
Whether or not the state of the visitor can be represented as text and that state represents the runtime from a user's perspective. The global context doesn't have a representation because the builtins are not written in the SonicWeave DSL.
Declared modules.
Local context for mutable (let) variables.
OptionalparentParent context of the surrounding code block.
The root context with the current values of the root pitch, ups, lifts, etc.
ProtectedassignCreate an independent (shallow) clone of the visitor useable as a cache of runtime state.
A StatementVisitor in the same state as this one.
Construct a visitor for evaluating the contents of an ExpressionStatement.
If true the expression visitor will share context of the variables with this one.
A new visitor for the AST of an expression.
ProtecteddeclareOptionalvalue: SonicWeaveValueProtecteddeclareOptionalvalue: SonicWeaveValueExecute the abstract syntax tree of a SonicWeave program.
Program containing the AST to be executed.
Convert the state of this statement visitor into a block of text in the SonicWeave DSL. Only intended for the user scope just above the global scope.
Root context for determining if root pitch declaration must be included.
A string that when evaluated should recreate the same runtime state.
ProtectedfreezeGet the value of a variable in the current context.
Name of the variable.
Value of the variable.
ProtectedgetProtectedhandleHandle a value by pushing it to the current scale or taking some other action depending on the type of the value.
Value understood by the SonicWeave runtime.
Currently active expression evaluator.
ProtectedrealizeSet the value of a variable in the current context.
Name of the variable.
Value for the variable.
Optionalamount: numberProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisitProtectedvisit
Abstract syntax tree visitor for statements in a SonicWeave program.