class Ven::Suite::Context::Machine
- Ven::Suite::Context::Machine
- Reference
- Object
Overview
The context for a Machine
.
Defined in:
ven/suite/context.crConstant Summary
-
MAX_TRACES =
64
-
Maximum amount of traceback entries. Clears the traces if exceeds.
Constructors
Instance Method Summary
-
#[](symbol : String | VSymbol)
Returns the value of a symbol.
-
#[]=(symbol : String, value : Model, nest = -1)
Makes symbol be value in the localmost scope.
-
#[]=(symbol : VSymbol, value : Model)
Makes symbol be value in its nest, or, if no nest specified, in the localmost scope.
-
#[]?(symbol : String, maybe = nil)
Returns the value of symbol.
-
#[]?(symbol : VSymbol)
Returns the value of symbol.
-
#clear
Deletes all scopes except the globalmost.
-
#pop
Pops the current scope and the current trace.
-
#push(file, line, name)
Introduces a child scope and a child trace.
- #scopes : Array(Scope)
- #size(*args, **options)
- #size(*args, **options, &)
- #traces : Array(Ven::Suite::Trace)
Constructor Detail
Instance Method Detail
Returns the value of a symbol.
Raises if symbol was not found.
Makes symbol be value in the localmost scope.
If the localmost scope contains a meta-context ($
),
and that meta-context has a field named symbol, this
field will be set to value.
Will raise VenAssignmentError
if symbol already exists
and is an MFunction
, whilst value is not.
Makes symbol be value in its nest, or, if no nest specified, in the localmost scope.
Returns the value of symbol.
Respects the meta-context ($
).
Nests maybe and -1 will be searched in first.
Returns nil if symbol was not found.
Returns the value of symbol.
Respects the meta-context ($
).
Nests maybe and -1 will be searched in first.
Returns nil if symbol was not found.
Introduces a child scope and a child trace.
Deletes all existing traces if the amount of them is
bigger than MAX_TRACES
.