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
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
textstringThe expression text to parse.
startintThe 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
- NumericLiteral
The parsed token if successful; otherwise, null.