@Test public void shouldParsePredicatesWithAttributeLessThanIntegerLiteral() { assertThat(parser.parsePredicates(tokenize("[@ex:age<3]")), is(predicates(comparison(attributeNameTest(nameTest("ex", "age")), Operator.LESS_THAN, literal("3"))))); }
protected List<Component> parsePredicates( TokenStream tokens ) { List<Component> predicates = new ArrayList<Component>(); while (tokens.canConsume('[')) { predicates.add(collapse(parseExpr(tokens))); tokens.consume(']'); } return predicates; }
XPathParser { protected List<Component> parsePredicates( TokenStream tokens ) { List<Component> predicates = new ArrayList<Component>(); while (tokens.canConsume('[')) { predicates.add(collapse(parseExpr(tokens))); tokens.consume(']'); } return predicates; } }
XPathParser { protected List<Component> parsePredicates( TokenStream tokens ) { List<Component> predicates = new ArrayList<Component>(); while (tokens.canConsume('[')) { predicates.add(collapse(parseExpr(tokens))); tokens.consume(']'); } return predicates; } XPathParser( TypeSystem context ); }
XPathParser { protected List<Component> parsePredicates( TokenStream tokens ) { List<Component> predicates = new ArrayList<Component>(); while (tokens.canConsume('[')) { predicates.add(collapse(parseExpr(tokens))); tokens.consume(']'); } return predicates; } XPathParser( TypeSystem context ); Component parseXPath( String xpath ); }
XPathParser { protected List<Component> parsePredicates( TokenStream tokens ) { List<Component> predicates = new ArrayList<Component>(); while (tokens.canConsume('[')) { predicates.add(collapse(parseExpr(tokens))); tokens.consume(']'); } return predicates; } XPathParser( TypeSystem context ); Component parseXPath( String xpath );  }