The ezr² Project 0.1.1
The codebase for the ezr² programming language.
Loading...
Searching...
No Matches
EzrSquared.Executor.ExecutionResult Class Reference

The result of a code execution operation. More...

Public Member Functions

 ExecutionResult (Token[] tokens, SyntaxError error)
 Creates a new execution result, which failed at lexing.
 
 ExecutionResult (Token[] tokens, ParseResult result)
 Creates a new execution result, which failed at parsing.
 
 ExecutionResult (Token[] tokens, Node ast, RuntimeResult result)
 Creates a new execution result.
 
string GetErrorMessage ()
 Returns the error message of the execution, be it a lexing, parsing or interpretation error.
 

Public Attributes

readonly Token[] Tokens
 The tokens making up the executed script.
 
readonly? SyntaxError LexerError
 Any error that occurred during lexing.
 
readonly? Node Ast
 The Abstract Syntax Tree of the executed script.
 
readonly? SyntaxError ParseError
 Any error that occurred during parsing.
 
readonly? IEzrObject Result
 The result of the execution.
 
readonly bool Success
 Was the execution successful?
 

Detailed Description

The result of a code execution operation.

Constructor & Destructor Documentation

◆ ExecutionResult() [1/3]

EzrSquared.Executor.ExecutionResult.ExecutionResult ( Token[] tokens,
SyntaxError error )

Creates a new execution result, which failed at lexing.

Parameters
tokensThe tokens returned by the lexer.
errorThe error.

◆ ExecutionResult() [2/3]

EzrSquared.Executor.ExecutionResult.ExecutionResult ( Token[] tokens,
ParseResult result )

Creates a new execution result, which failed at parsing.

Parameters
tokensThe tokens returned by the lexer.
resultThe parse result carrying the error.

◆ ExecutionResult() [3/3]

EzrSquared.Executor.ExecutionResult.ExecutionResult ( Token[] tokens,
Node ast,
RuntimeResult result )

Creates a new execution result.

Parameters
tokensThe tokens returned by the lexer.
astThe executed AST node.
resultThe runtime result carrying the result or error.

Member Function Documentation

◆ GetErrorMessage()

string EzrSquared.Executor.ExecutionResult.GetErrorMessage ( )

Returns the error message of the execution, be it a lexing, parsing or interpretation error.

Returns
The error message.

The documentation for this class was generated from the following file: