示例#1
0
        public override void ExitOperatorOptionsSpecified(NSPredicateParser.OperatorOptionsSpecifiedContext context)
        {
            string optStr = context.IDENTIFIER().GetText().ToLower();

              ComparisonPredicateOptions opts = 0;
              if (optStr.Contains("c")) {
            opts |= ComparisonPredicateOptions.CaseInsensitive;
              }
              if (optStr.Contains("d")) {
            opts |= ComparisonPredicateOptions.DiacriticInsensitive;
              }

              ComparisonOptions.Push(opts);
        }
示例#2
0
 //        | IDENTIFIER                            # ExprKeypathIdentifier
 public override void ExitExprKeypathIdentifier(NSPredicateParser.ExprKeypathIdentifierContext context)
 {
     var identifier = context.IDENTIFIER().GetText();
       Stack.Push(Expr.MakeKeyPath(identifier));
 }
示例#3
0
 //        | IDENTIFIER '(' ')'            # ExprNoArgFunction
 public override void ExitExprNoArgFunction(NSPredicateParser.ExprNoArgFunctionContext context)
 {
     string fn = context.IDENTIFIER().GetText().ToLower();
       Stack.Push(Expr.MakeFunction(fn));
 }
示例#4
0
        //        | '@' IDENTIFIER                        # ExprKeypathAtIdentifier
        public override void ExitExprKeypathAtIdentifier(NSPredicateParser.ExprKeypathAtIdentifierContext context)
        {
            var identifier = context.IDENTIFIER().GetText();
              Debug.Assert(identifier is string);

              Stack.Push(Expr.MakeKeyPath("@" + identifier));
        }