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

Function parseErrorAtPosition

test/fixtures/snapshot/typescript.js:31958–31970  ·  view source on GitHub ↗
(start, length, message, arg0)

Source from the content-addressed store, hash-verified

31956 return parseErrorAt(scanner.getTokenPos(), scanner.getTextPos(), message, arg0);
31957 }
31958 function parseErrorAtPosition(start, length, message, arg0) {
31959 // Don't report another error if it would just be at the same position as the last error.
31960 var lastError = ts.lastOrUndefined(parseDiagnostics);
31961 var result;
31962 if (!lastError || start !== lastError.start) {
31963 result = ts.createDetachedDiagnostic(fileName, start, length, message, arg0);
31964 parseDiagnostics.push(result);
31965 }
31966 // Mark that we've encountered an error. We'll set an appropriate bit on the next
31967 // node we finish so that it can't be reused incrementally.
31968 parseErrorBeforeNextFinishedNode = true;
31969 return result;
31970 }
31971 function parseErrorAt(start, end, message, arg0) {
31972 return parseErrorAtPosition(start, end - start, message, arg0);
31973 }

Callers 3

parseErrorAtFunction · 0.85
scanErrorFunction · 0.85
createMissingNodeFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected