class Scope
Mapping from syms to RTNodes.
index
members
-
scope\set_raw(key, val)
– set a Lua value in the scope. -
scope\set(key, val)
– set a symbol to a RTNode. -
scope\get(key)
– resolve a key in this Scope. -
scope\use(other)
– copy definitions from another scope.
static functions
-
Scope\new([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.
wraps val in a Constant and RTNode before calling set.
parameters:
-
– set a symbol to a RTNode.
parameters:
-
– resolve a key in this Scope.
parameters:
- the key to resolve
returns:
- (optional RTNode): 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 Constant.wrap on the values recursively.
parameters:
- the table to convert
returns:
- (Scope)