class Scope
Mapping from sym
s to Results.
index
members
-
scope:set_raw(key, val)
– set a Lua value in the scope. -
scope:set(key, val)
– set a symbol to a Result. -
scope:get(key)
– resolve a key in this Scope. -
scope:use(other)
– copy definitions from another scope.
static functions
-
Scope([parent[, dynamic_parent]])
– create a new Scope. -
Scope.from_table(tbl)
– convert a Lua table to a Scope.
details
members
- – set a Lua value in the scope.
-
– set a symbol to a Result.
parameters:
-
– resolve a key in this Scope.
parameters:
- the key to resolve
returns:
-
(optional Result):
the value of the definition that was found, or
nil
-
– copy definitions from another scope.
copies all definitions from
other
. Does not copy inherited definitions.parameters:
static functions
-
– create a new Scope.
parameters:
- a parent this scope inherits definitions from (optional)
- a parent scope that should be checked for dynamic definitions (optional)
-
– convert a Lua table to a Scope.
tbl
may contain more tables (or Scopes). Uses ValueStream.wrap on the values recursively.parameters:
- the table to convert
returns:
- (Scope)