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); }
// | IDENTIFIER # ExprKeypathIdentifier public override void ExitExprKeypathIdentifier(NSPredicateParser.ExprKeypathIdentifierContext context) { var identifier = context.IDENTIFIER().GetText(); Stack.Push(Expr.MakeKeyPath(identifier)); }
// | IDENTIFIER '(' ')' # ExprNoArgFunction public override void ExitExprNoArgFunction(NSPredicateParser.ExprNoArgFunctionContext context) { string fn = context.IDENTIFIER().GetText().ToLower(); Stack.Push(Expr.MakeFunction(fn)); }
// | '@' IDENTIFIER # ExprKeypathAtIdentifier public override void ExitExprKeypathAtIdentifier(NSPredicateParser.ExprKeypathAtIdentifierContext context) { var identifier = context.IDENTIFIER().GetText(); Debug.Assert(identifier is string); Stack.Push(Expr.MakeKeyPath("@" + identifier)); }