public override CompilerResult VisitLitExpr(DesignScriptParser.LitExprContext context)
        {
            var litContext = context.lit();

            if (litContext is DesignScriptParser.DoubleLitContext doubleLitContext)
            {
                VisitDoubleLit(doubleLitContext);
            }
            else if (litContext is DesignScriptParser.IntLitContext intLitContext)
            {
                VisitIntLit(intLitContext);
            }
            return(new NullCompilerResult());
        }
Esempio n. 2
0
 /// <summary>
 /// Visit a parse tree produced by the <c>litExpr</c>
 /// labeled alternative in <see cref="DesignScriptParser.primary"/>.
 /// <para>
 /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/>
 /// on <paramref name="context"/>.
 /// </para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 /// <return>The visitor result.</return>
 public virtual Result VisitLitExpr([NotNull] DesignScriptParser.LitExprContext context)
 {
     return(VisitChildren(context));
 }