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

Function grammarErrorOnFirstToken

test/fixtures/snapshot/typescript.js:88897–88905  ·  view source on GitHub ↗
(node, message, arg0, arg1, arg2)

Source from the content-addressed store, hash-verified

88895 return sourceFile.parseDiagnostics.length > 0;
88896 }
88897 function grammarErrorOnFirstToken(node, message, arg0, arg1, arg2) {
88898 var sourceFile = ts.getSourceFileOfNode(node);
88899 if (!hasParseDiagnostics(sourceFile)) {
88900 var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos);
88901 diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, message, arg0, arg1, arg2));
88902 return true;
88903 }
88904 return false;
88905 }
88906 function grammarErrorAtPos(nodeForSourceFile, start, length, message, arg0, arg1, arg2) {
88907 var sourceFile = ts.getSourceFileOfNode(nodeForSourceFile);
88908 if (!hasParseDiagnostics(sourceFile)) {

Callers 15

checkTypeParameterFunction · 0.85
checkReturnStatementFunction · 0.85
checkWithStatementFunction · 0.85
checkTryStatementFunction · 0.85
checkClassDeclarationFunction · 0.85
checkImportDeclarationFunction · 0.85
checkExportDeclarationFunction · 0.85
checkExportAssignmentFunction · 0.85
checkGrammarDecoratorsFunction · 0.85

Calls 2

hasParseDiagnosticsFunction · 0.85
addMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…