public override object VisitGroupby_clause([NotNull] KoraliumParser.Groupby_clauseContext context) { GroupByClause groupByClause = new GroupByClause(); var elements = context.groupby_element(); foreach (var element in elements) { var groupElement = Visit(element) as Group; if (groupElement == null) { throw new SqlParserException("Could not parse group by group"); } groupByClause.Groups.Add(groupElement); } return(groupByClause); }
/// <summary> /// Exit a parse tree produced by <see cref="KoraliumParser.groupby_clause"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitGroupby_clause([NotNull] KoraliumParser.Groupby_clauseContext context) { }
/// <summary> /// Visit a parse tree produced by <see cref="KoraliumParser.groupby_clause"/>. /// <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 VisitGroupby_clause([NotNull] KoraliumParser.Groupby_clauseContext context) { return(VisitChildren(context)); }