Table of Contents

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

T

The 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

expression string
start int

The starting position in the text to begin parsing.

next int

When 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.