Table of Contents

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
object
ParseResult

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

EzrSyntaxError

Node

The Node which is the result of the parsing.

public Node Node

Field Value

Node

_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 int

The priority/fatality of the failure.

error EzrSyntaxError

The 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)

Parameters

node Node

The Node result of the parsing.