Finishes the parsing step. @param mm main module; null for library modules @throws QueryException query exception
(final MainModule mm)
| 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. |
no test coverage detected