Beispiel #1
0
        private BooleanBinaryType ParseBinaryType(KoraliumParser.Boolean_binary_typeContext type)
        {
            var typeText = type.GetText().ToLower();

            switch (typeText)
            {
            case "and":
                return(BooleanBinaryType.AND);

            case "or":
                return(BooleanBinaryType.OR);
            }

            throw new SqlParserException($"Unexpected boolean binary type '{typeText}'");
        }
 /// <summary>
 /// Exit a parse tree produced by <see cref="KoraliumParser.boolean_binary_type"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitBoolean_binary_type([NotNull] KoraliumParser.Boolean_binary_typeContext context)
 {
 }
Beispiel #3
0
 /// <summary>
 /// Visit a parse tree produced by <see cref="KoraliumParser.boolean_binary_type"/>.
 /// <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 VisitBoolean_binary_type([NotNull] KoraliumParser.Boolean_binary_typeContext context)
 {
     return(VisitChildren(context));
 }