Exemple #1
0
        public override CSNode VisitIntAtomExp(CSScriptParser.IntAtomExpContext context)
        {
            CSIntNode node = new CSIntNode(context.Start.Line, context.Start.Column);
            int       val  = 0;

            if (!int.TryParse(context.INT().GetText(), out val))
            {
                CSLog.E(node, "failed to parse int: " + context.INT().GetText());
            }
            node._val = val;
            return(node);
        }
 /// <summary>
 /// Visit a parse tree produced by <see cref="CSScriptParser.intAtomExp"/>.
 /// <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 VisitIntAtomExp([NotNull] CSScriptParser.IntAtomExpContext context)
 {
     return(VisitChildren(context));
 }