Class ItemAtomExpression
- Namespace
- RandomizerCore.StringItems
- Assembly
- RandomizerCore.dll
public record ItemAtomExpression : IExpression<ItemExpressionType>, IEquatable<ItemAtomExpression>
- Inheritance
-
ItemAtomExpression
- Implements
- Inherited Members
Constructors
ItemAtomExpression(Token)
public ItemAtomExpression(Token Token)
Parameters
Token
Token
Properties
EndChar
public int EndChar { get; }
Property Value
StartChar
public int StartChar { get; }
Property Value
Token
public Token Token { get; init; }
Property Value
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".
public IEnumerable<ItemExpressionType> Evaluate()
Returns
IsAtomToken(Token)
public static bool IsAtomToken(Token token)
Parameters
token
Token
Returns
Print()
Reconstructs the original string representation of the expression
public string Print()
Returns
Validate(ExpressionValidator<ItemExpressionType>)
Validates whether the expression is structurally and semantically valid and aggregates any errors using the provided expression validator.
public bool Validate(ExpressionValidator<ItemExpressionType> validator)
Parameters
validator
ExpressionValidator<ItemExpressionType>The validator to use to aggregate errors.
Returns
- bool
Whether the expression is valid or not.