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

Method finish

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

Finishes the parsing step. @param mm main module; null for library modules @throws QueryException query exception

(final MainModule mm)

Source from the content-addressed store, hash-verified

251 * @throws QueryException query exception
252 */
253 private void finish(final MainModule mm) throws QueryException {
254 if(more()) {
255 if(alter != null) throw alterError(null);
256 final String rest = remaining();
257 pos++;
258 if(mm == null) throw error(MODEXPR, rest);
259 throw error(QUERYEND_X, rest);
260 }
261
262 // completes the parsing step
263 qnames.resolve(this, 0, sc.elemNS);
264 if(sc.elemNS != null) sc.ns.add(EMPTY, sc.elemNS, null);
265 RecordType.resolveRefs(recordTypeRefs, namedRecordTypes);
266 }
267
268 /**
269 * Checks function calls, variable references and updating semantics.

Callers 15

parseMainMethod · 0.95
parseLibraryMethod · 0.95
paramListMethod · 0.45
exprMethod · 0.45
switchhMethod · 0.45
orMethod · 0.45
andMethod · 0.45
otherwiseMethod · 0.45
stringConcatMethod · 0.45
unionMethod · 0.45
intersectExceptMethod · 0.45

Calls 7

alterErrorMethod · 0.95
errorMethod · 0.95
resolveRefsMethod · 0.95
moreMethod · 0.65
resolveMethod · 0.65
addMethod · 0.65
remainingMethod · 0.45

Tested by

no test coverage detected