Class NumericLiteral
- Namespace
- Albatross.Expression.Nodes
- Assembly
- Albatross.Expression.dll
Represents a numeric literal that can be parsed as a double value.
public class NumericLiteral : ValueToken, IValueToken, IExpression, IToken
- Inheritance
-
NumericLiteral
- Implements
- Inherited Members
- Extension Methods
Constructors
NumericLiteral(string)
Initializes a new instance of the NumericLiteral class.
public NumericLiteral(string value)
Parameters
valuestringThe string representation of the numeric value.
Methods
Eval(Func<string, object>)
Evaluates the expression synchronously using the provided context function.
public object Eval(Func<string, object> context)
Parameters
Returns
- object
The result of evaluating the expression.
EvalAsync(Func<string, Task<object>>)
Evaluates the expression asynchronously using the provided context function.
public Task<object> EvalAsync(Func<string, Task<object>> context)
Parameters
contextFunc<string, Task<object>>A function that asynchronously resolves variable names to their values.