Table of Contents

Class NumericLiteralFactory

Namespace
Albatross.Expression.Parsing
Assembly
Albatross.Expression.dll

Factory for parsing numeric literal tokens from expression text.

public class NumericLiteralFactory : IExpressionFactory<NumericLiteral>
Inheritance
NumericLiteralFactory
Implements
Inherited Members
Extension Methods

Fields

NumericPatternRegex

Compiled regex pattern for matching numeric literals.

public static readonly Regex NumericPatternRegex

Field Value

Regex

Methods

Parse(string, int, out int)

Attempts to parse a token from the given text starting at the specified position.

public NumericLiteral? Parse(string text, int start, out int next)

Parameters

text string

The expression text to parse.

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

NumericLiteral

The parsed token if successful; otherwise, null.