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

Method piTest

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

Parses the "PITest" rule without the leading keyword and its brackets. @return test or null @throws QueryException query exception

()

Source from the content-addressed store, hash-verified

3779 * @throws QueryException query exception
3780 */
3781 private Test piTest() throws QueryException {
3782 token.reset();
3783 final byte[] name;
3784 if(quote(current())) {
3785 name = trim(stringLiteral());
3786 if(!XMLToken.isNCName(name)) throw error(INVNCNAME_X, name);
3787 } else if(ncName(false)) {
3788 name = token.toArray();
3789 } else {
3790 return null;
3791 }
3792 return NameTest.get(new QNm(name), Kind.PROCESSING_INSTRUCTION);
3793 }
3794
3795 /**
3796 * Parses the "EnumerationType" rule without the leading keyword and the opening bracket.

Callers 1

kindTestMethod · 0.95

Calls 10

stringLiteralMethod · 0.95
isNCNameMethod · 0.95
errorMethod · 0.95
ncNameMethod · 0.95
getMethod · 0.95
resetMethod · 0.65
quoteMethod · 0.45
currentMethod · 0.45
trimMethod · 0.45
toArrayMethod · 0.45

Tested by

no test coverage detected