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

Function tryParseSemicolon

test/fixtures/snapshot/typescript.js:32305–32314  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32303 return token() === 19 /* SyntaxKind.CloseBraceToken */ || token() === 1 /* SyntaxKind.EndOfFileToken */ || scanner.hasPrecedingLineBreak();
32304 }
32305 function tryParseSemicolon() {
32306 if (!canParseSemicolon()) {
32307 return false;
32308 }
32309 if (token() === 26 /* SyntaxKind.SemicolonToken */) {
32310 // consume the semicolon if it was explicitly provided.
32311 nextToken();
32312 }
32313 return true;
32314 }
32315 function parseSemicolon() {
32316 return tryParseSemicolon() || parseExpected(26 /* SyntaxKind.SemicolonToken */);
32317 }

Callers 4

parseSemicolonFunction · 0.85
parseThrowStatementFunction · 0.85

Calls 3

canParseSemicolonFunction · 0.85
nextTokenFunction · 0.85
tokenFunction · 0.70

Tested by

no test coverage detected