MCPcopy Index your code
hub / github.com/nodejs/node / finishNode

Function finishNode

test/fixtures/snapshot/typescript.js:32323–32336  ·  view source on GitHub ↗
(node, pos, end)

Source from the content-addressed store, hash-verified

32321 return array;
32322 }
32323 function finishNode(node, pos, end) {
32324 ts.setTextRangePosEnd(node, pos, end !== null && end !== void 0 ? end : scanner.getStartPos());
32325 if (contextFlags) {
32326 node.flags |= contextFlags;
32327 }
32328 // Keep track on the node if we encountered an error while parsing it. If we did, then
32329 // we cannot reuse the node incrementally. Once we've marked this node, clear out the
32330 // flag so that we don't mark any subsequent nodes.
32331 if (parseErrorBeforeNextFinishedNode) {
32332 parseErrorBeforeNextFinishedNode = false;
32333 node.flags |= 131072 /* NodeFlags.ThisNodeHasError */;
32334 }
32335 return node;
32336 }
32337 function createMissingNode(kind, reportAtCurrentPosition, diagnosticMessage, arg0) {
32338 if (reportAtCurrentPosition) {
32339 parseErrorAtPosition(scanner.getStartPos(), 0, diagnosticMessage, arg0);

Callers 15

parseJsonTextFunction · 0.85
parseTokenNodeFunction · 0.85
parseTokenNodeJSDocFunction · 0.85
createMissingNodeFunction · 0.85
createIdentifierFunction · 0.85
parsePrivateIdentifierFunction · 0.85
parseEntityNameFunction · 0.85
createQualifiedNameFunction · 0.85
parseTemplateExpressionFunction · 0.85
parseTemplateTypeFunction · 0.85
parseTemplateTypeSpanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected