Class UnaryExpressionFactory<T>
- Namespace
- Albatross.Expression.Parsing
- Assembly
- Albatross.Expression.dll
Generic factory for creating unary expression instances by matching their operator tokens.
public class UnaryExpressionFactory<T> : IExpressionFactory<T> where T : class, IUnaryExpression, new()
Type Parameters
TThe type of unary expression to create.
- Inheritance
-
UnaryExpressionFactory<T>
- Implements
- Inherited Members
- Extension Methods
Methods
Parse(string, int, out int)
Attempts to parse a token from the given text starting at the specified position.
public T? Parse(string expression, int start, out int next)
Parameters
expressionstringstartintThe starting position in the text to begin parsing.
nextintWhen this method returns, contains the position after the parsed token, or the original start position if parsing failed.
Returns
- T
The parsed token if successful; otherwise, null.