Class Scope
- Namespace
- StepLang.Interpreting
- Assembly
- StepLang.dll
- Inheritance
-
Scope
- Inherited Members
-
Constructors
Scope(Scope)
public Scope(Scope parent)
Parameters
parent
Scope
Fields
GlobalScope
public static readonly Scope GlobalScope
Field Value
- Scope
Methods
CreateVariable(TokenLocation, Token, IReadOnlyList<ResultType>, ExpressionResult, bool)
public Variable CreateVariable(TokenLocation assignmentLocation, Token identifierToken, IReadOnlyList<ResultType> types, ExpressionResult initialValue, bool nullable = false)
Parameters
assignmentLocation
TokenLocation
identifierToken
Token
types
IReadOnlyList<ResultType>
initialValue
ExpressionResult
nullable
bool
Returns
- Variable
CreateVariable(string, ExpressionResult, bool)
public void CreateVariable(string identifier, ExpressionResult initialValue, bool nullable = false)
Parameters
identifier
string
initialValue
ExpressionResult
nullable
bool
Exists(string, bool)
public bool Exists(string identifier, bool includeParent)
Parameters
identifier
string
includeParent
bool
Returns
- bool
GetVariable(Token)
public Variable GetVariable(Token identifierToken)
Parameters
identifierToken
Token
Returns
- Variable
SetBreak()
SetContinue()
public void SetContinue()
SetResult(TokenLocation, ExpressionResult)
public void SetResult(TokenLocation location, ExpressionResult result)
Parameters
location
TokenLocation
result
ExpressionResult
ShouldBreak()
public bool ShouldBreak()
Returns
- bool
ShouldContinue()
public bool ShouldContinue()
Returns
- bool
ShouldReturn()
public bool ShouldReturn()
Returns
- bool
ToString()
public override string ToString()
Returns
- string
TryGetResult(out ExpressionResult?, out TokenLocation?)
public bool TryGetResult(out ExpressionResult? result, out TokenLocation? location)
Parameters
result
ExpressionResult
location
TokenLocation
Returns
- bool