Class ExecutionResult
- Namespace
- EzrSquared.Executor
- Assembly
- ezrSquared-lib.dll
The result of a code execution operation.
public class ExecutionResult
- Inheritance
-
objectExecutionResult
Constructors
ExecutionResult(Token[], Node, RuntimeResult)
Creates a new execution result.
public ExecutionResult(Token[] tokens, Node ast, RuntimeResult result)
Parameters
tokensToken[]The tokens returned by the lexer.
astNodeThe executed AST node.
resultRuntimeResultThe runtime result carrying the result or error.
ExecutionResult(Token[], EzrSyntaxError)
Creates a new execution result, which failed at lexing.
public ExecutionResult(Token[] tokens, EzrSyntaxError error)
Parameters
tokensToken[]The tokens returned by the lexer.
errorEzrSyntaxErrorThe error.
ExecutionResult(Token[], ParseResult)
Creates a new execution result, which failed at parsing.
public ExecutionResult(Token[] tokens, ParseResult result)
Parameters
tokensToken[]The tokens returned by the lexer.
resultParseResultThe parse result carrying the error.
Fields
Ast
The Abstract Syntax Tree of the executed script.
public readonly Node? Ast
Field Value
LexerError
Any error that occurred during lexing.
public readonly EzrSyntaxError? LexerError
Field Value
ParseError
Any error that occurred during parsing.
public readonly EzrSyntaxError? ParseError
Field Value
Result
The result of the execution.
public readonly IEzrObject? Result
Field Value
Success
Was the execution successful?
public readonly bool Success
Field Value
- bool
Tokens
The tokens making up the executed script.
public readonly Token[] Tokens
Field Value
- Token[]
Methods
GetErrorMessage()
Returns the error message of the execution, be it a lexing, parsing or interpretation error.
public string GetErrorMessage()
Returns
- string
The error message.