Class ParseResult
- Namespace
- EzrSquared.Syntax
- Assembly
- ezrSquared-lib.dll
The type of the object that is returned as the result of parsing done by the Parser.
public class ParseResult
- Inheritance
-
objectParseResult
Fields
AdvanceCount
The amount of times the Parser advanced.
public int AdvanceCount
Field Value
- int
Error
The EzrSyntaxError that occurred while parsing, if any.
public EzrSyntaxError? Error
Field Value
Node
The Node which is the result of the parsing.
public Node Node
Field Value
_errorPriority
The priority of the error held in the ParseResult.
private int _errorPriority
Field Value
- int
Methods
Failure(int, EzrSyntaxError)
Sets Error as the result of failed parsing.
public void Failure(int priority, EzrSyntaxError error)
Parameters
priority
intThe priority/fatality of the failure.
error
EzrSyntaxErrorThe EzrSyntaxError that occurred in parsing.
Remarks
If priority
is greater than or equal to the _errorPriority
then error
will override Error.
Success(Node)
Sets Node as the result of successful parsing.
public void Success(Node node)