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

Function parseErrorForInvalidName

test/fixtures/snapshot/typescript.js:32192–32199  ·  view source on GitHub ↗

* Reports a diagnostic error for the current token being an invalid name. * * @param blankDiagnostic Diagnostic to report for the case of the name being blank (matched tokenIfBlankName). * @param nameDiagnostic Diagnostic to report for all other cases. * @param to

(nameDiagnostic, blankDiagnostic, tokenIfBlankName)

Source from the content-addressed store, hash-verified

32190 * @param tokenIfBlankName Current token if the name was invalid for being blank (not provided / skipped).
32191 */
32192 function parseErrorForInvalidName(nameDiagnostic, blankDiagnostic, tokenIfBlankName) {
32193 if (token() === tokenIfBlankName) {
32194 parseErrorAtCurrentToken(blankDiagnostic);
32195 }
32196 else {
32197 parseErrorAtCurrentToken(nameDiagnostic, scanner.getTokenValue());
32198 }
32199 }
32200 function getSpaceSuggestion(expressionText) {
32201 for (var _i = 0, viableKeywordSuggestions_1 = viableKeywordSuggestions; _i < viableKeywordSuggestions_1.length; _i++) {
32202 var keyword = viableKeywordSuggestions_1[_i];

Callers 1

Calls 2

parseErrorAtCurrentTokenFunction · 0.85
tokenFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…