MCPcopy Create free account
hub / github.com/BaseXdb/basex / expr

Method expr

basex-core/src/main/java/org/basex/query/QueryParser.java:1107–1118  ·  view source on GitHub ↗

Parses the "Expr" rule. @return query expression or null @throws QueryException query exception

()

Source from the content-addressed store, hash-verified

1105 * @throws QueryException query exception
1106 */
1107 private Expr expr() throws QueryException {
1108 final Expr expr = single();
1109 if(expr == null) {
1110 if(more()) return null;
1111 throw alterError(NOEXPR);
1112 }
1113
1114 if(!wsConsume(",")) return expr;
1115 final ExprList el = new ExprList().add(expr);
1116 do add(el, single()); while(wsConsume(","));
1117 return new List(info(), el.finish());
1118 }
1119
1120 /**
1121 * Parses the "ExprSingle" rule.

Callers 12

parseMainMethod · 0.95
enclosedExprMethod · 0.95
switchhMethod · 0.95
typeswitchMethod · 0.95
ifCondMethod · 0.95
extensionMethod · 0.95
axisStepMethod · 0.95
postfixMethod · 0.95
arrayConstructorMethod · 0.95
parenthesizedMethod · 0.95
stringConstructorMethod · 0.95
compNameMethod · 0.95

Calls 8

singleMethod · 0.95
alterErrorMethod · 0.95
wsConsumeMethod · 0.95
addMethod · 0.95
infoMethod · 0.95
moreMethod · 0.65
addMethod · 0.65
finishMethod · 0.45

Tested by

no test coverage detected