public override CSNode VisitDotExp(CSScriptParser.DotExpContext context) { CSOPDotNode node = new CSOPDotNode(context.Start.Line, context.Start.Column); CSScriptParser.ExpressionContext[] expressions = context.expression(); if (expressions == null || expressions.Length != 2) { CSLog.E(context.Start.Line, context.Start.Column, "invalid # of children..."); return(null); } node._children = new CSNode[2]; node._children[0] = Visit(expressions[0]); node._children[1] = Visit(expressions[1]); return(node); }
/// <summary> /// Visit a parse tree produced by <see cref="CSScriptParser.dotExp"/>. /// <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 VisitDotExp([NotNull] CSScriptParser.DotExpContext context) { return(VisitChildren(context)); }