MCPcopy Create free account
hub / github.com/nodejs/node / grammarErrorAfterFirstToken

Function grammarErrorAfterFirstToken

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

Source from the content-addressed store, hash-verified

89108 return false;
89109 }
89110 function grammarErrorAfterFirstToken(node, message, arg0, arg1, arg2) {
89111 var sourceFile = ts.getSourceFileOfNode(node);
89112 if (!hasParseDiagnostics(sourceFile)) {
89113 var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos);
89114 diagnostics.add(ts.createFileDiagnostic(sourceFile, ts.textSpanEnd(span), /*length*/ 0, message, arg0, arg1, arg2));
89115 return true;
89116 }
89117 return false;
89118 }
89119 function getAmbientModules() {
89120 if (!ambientModulesCache) {
89121 ambientModulesCache = [];

Callers 1

checkThrowStatementFunction · 0.85

Calls 2

hasParseDiagnosticsFunction · 0.85
addMethod · 0.65

Tested by

no test coverage detected