Expand description
ScopeContext tracks our knowledge of the scope types used in script and validates its consistency.
Structs§
- Scope
Context - The
ScopeContextrepresents what we know about the scopes leading to theBlockcurrently being validated. - Signature
- The essential characteristics of a
ScopeContextfor the purpose of deciding whether an event has already been evaluated with a similar-enoughScopeContext. - Stashed
Builder - Information about a temporarily suspended scope-building operation.
This is used in constructs like
squared_distance(prev.capital_province), where the builder scope opened bysquared_distanceneeds to be preserved whileprev.capital_provinceis evaluated in the original scope.
Enums§
- Reason
- This enum records the reason why we think a certain scope has the type it does. It is used for error reporting.
- Scope
Entry 🔒 ScopeEntryis a description of what we know of a scope’s type and its connection to other scopes.- Temporary
Constants§
- MAX_
SCOPE_ 🔒NAME_ LIST - When reporting an unknown scope, list alternative scope names if there are not more than this.
- PREV 🔒
- Backref index to pass to refer to the
prevscope. - THIS 🔒
- Backref index to pass to refer to the
thisscope.
Functions§
- scope_
type_ 🔒from_ name - Deduce a scope type from a scope’s name. This leads to better error messages.