Class VariableFactory
- Namespace
- Albatross.Expression.Parsing
- Assembly
- Albatross.Expression.dll
Factory for parsing variable name tokens from expression text.
public class VariableFactory : IExpressionFactory<Variable>
- Inheritance
-
VariableFactory
- Implements
- Inherited Members
- Extension Methods
Fields
VariableNameRegex
Compiled regex pattern for matching variable names (supports dot notation like "obj.prop").
public static readonly Regex VariableNameRegex
Field Value
Methods
Parse(string, int, out int)
Attempts to parse a token from the given text starting at the specified position.
public Variable? 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
- Variable
The parsed token if successful; otherwise, null.