public override Node VisitFormal([NotNull] coolgrammarParser.FormalContext context) { var id = new Id(context.ID().GetText()); var t = new Type_cool(context.TYPE().GetText()); return(new Formal(id, t)); }
/// <summary> /// Visit a parse tree produced by <see cref="coolgrammarParser.formal"/>. /// <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 VisitFormal([NotNull] coolgrammarParser.FormalContext context) { return(VisitChildren(context)); }