public void EnterArgs(ExprParser.ArgsContext context) { var currentExpr = _callStack.Peek(); if (context.INT() != null) { currentExpr.AddArgument(new LazyValue(() => new Value(context.INT().GetText(), Types.Int))); } else if (context.FLOATING() != null) { currentExpr.AddArgument(new LazyValue(() => new Value(context.FLOATING().GetText(), Types.FloatingPoint))); } else if (context.STRING() != null) { currentExpr.AddArgument(new LazyValue(() => new Value(context.STRING().GetText(), Types.String))); } else if (context.NAME() != null) { currentExpr.AddArgument(new LazyValue(() => new Value(context.NAME().GetText(), Types.Name))); } else if (context.FALSY() != null) { currentExpr.AddArgument(new LazyValue(() => new Value(context.FALSY().GetText(), Types.Falsy))); } }
public void ExitArgs(ExprParser.ArgsContext context) { }
/// <summary> /// Exit a parse tree produced by <see cref="ExprParser.args"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitArgs([NotNull] ExprParser.ArgsContext context) { }