Table of Contents

Interface IExpression<T>

Namespace
RandomizerCore.StringParsing
Assembly
RandomizerCore.dll

An expression with results constrained by the set T

public interface IExpression<T>

Type Parameters

T

The set of valid types for the expression (usually an enum).

Properties

EndChar

int EndChar { get; }

Property Value

int

StartChar

int StartChar { get; }

Property Value

int

Methods

Evaluate()

Speculates possible types for an expression. If the result { T.A, T.B } is returned, then the result is to be interpreted as "A or B".

IEnumerable<T> Evaluate()

Returns

IEnumerable<T>

Print()

Reconstructs the original string representation of the expression

string Print()

Returns

string

Validate(ExpressionValidator<T>)

Validates whether the expression is structurally and semantically valid and aggregates any errors using the provided expression validator.

bool Validate(ExpressionValidator<T> validator)

Parameters

validator ExpressionValidator<T>

The validator to use to aggregate errors.

Returns

bool

Whether the expression is valid or not.