public ConstExpression(IFunctionRuntimeControl internalControl, Token token) : base(internalControl, token) { switch (Token.TokenType) { case TokenType.Numeric: string tokenString = Token.TokenString.Replace(',', '.'); decimal num; if (!decimal.TryParse(tokenString, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) { throw new ArgumentException($"Wrong numeric value '{Token.TokenString}'"); } constValue = new SObject() { NumValue = num }; break; case TokenType.Text: constValue = new SObject() { StringValue = Token.TokenString }; break; default: throw new ScriptRuntimeException(Token, $"Const token type '{Token.TokenType}' not supported!"); } }
public ParserA(FunctionsRepository functions, IVariablesHeap vars, IFunctionRuntimeControl runtimeControl) { this.functions = functions ?? throw new ArgumentNullException("Interpreter box can't be null!"); this.vars = vars ?? throw new ArgumentNullException("Vars can't be null!"); this.runtimeControl = runtimeControl ?? throw new ArgumentNullException("Runtime control can't be null!"); }
public VariableExpression(IFunctionRuntimeControl internalControl, Token token, IVariablesHeap vars) : base(internalControl, token) { this.vars = vars ?? throw new ArgumentNullException("Vars can't be null!"); }
public FunctionExpression(IFunctionRuntimeControl internalControl, Token token, FunctionBase function) : base(internalControl, token) { this.Function = function ?? throw new ArgumentNullException("Function can't be null!"); }
public ArgumentsExpression(IFunctionRuntimeControl internalControl) : base(internalControl) { }
public Expression(IFunctionRuntimeControl internalControl, List <Expression> expressions) : this(internalControl) { SubExpressions = expressions ?? throw new ArgumentNullException("SubExpressions can'tbe null!"); }
public Expression(IFunctionRuntimeControl internalControl, Token token) : this(internalControl) { this.Token = token ?? throw new ArgumentNullException("Token can'tbe null!"); }
public Expression(IFunctionRuntimeControl internalControl) { this.InternalControl = internalControl ?? throw new ArgumentNullException("internalControl can't be null!"); }