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

Function parseExpectedMatchingBrackets

test/fixtures/snapshot/typescript.js:32245–32257  ·  view source on GitHub ↗
(openKind, closeKind, openParsed, openPosition)

Source from the content-addressed store, hash-verified

32243 return false;
32244 }
32245 function parseExpectedMatchingBrackets(openKind, closeKind, openParsed, openPosition) {
32246 if (token() === closeKind) {
32247 nextToken();
32248 return;
32249 }
32250 var lastError = parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(closeKind));
32251 if (!openParsed) {
32252 return;
32253 }
32254 if (lastError) {
32255 ts.addRelatedInfo(lastError, ts.createDetachedDiagnostic(fileName, openPosition, 1, ts.Diagnostics.The_parser_expected_to_find_a_1_to_match_the_0_token_here, ts.tokenToString(openKind), ts.tokenToString(closeKind)));
32256 }
32257 }
32258 function parseOptional(t) {
32259 if (token() === t) {
32260 nextToken();

Callers 7

parseBlockFunction · 0.85
parseIfStatementFunction · 0.85
parseDoStatementFunction · 0.85
parseWhileStatementFunction · 0.85
parseWithStatementFunction · 0.85

Calls 3

nextTokenFunction · 0.85
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…