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

Function parseJSDocTypeExpression

test/fixtures/snapshot/typescript.js:37400–37410  ·  view source on GitHub ↗
(mayOmitBraces)

Source from the content-addressed store, hash-verified

37398 JSDocParser.parseJSDocTypeExpressionForTests = parseJSDocTypeExpressionForTests;
37399 // Parses out a JSDoc type expression.
37400 function parseJSDocTypeExpression(mayOmitBraces) {
37401 var pos = getNodePos();
37402 var hasBrace = (mayOmitBraces ? parseOptional : parseExpected)(18 /* SyntaxKind.OpenBraceToken */);
37403 var type = doInsideOfContext(8388608 /* NodeFlags.JSDoc */, parseJSDocType);
37404 if (!mayOmitBraces || hasBrace) {
37405 parseExpectedJSDoc(19 /* SyntaxKind.CloseBraceToken */);
37406 }
37407 var result = factory.createJSDocTypeExpression(type);
37408 fixupParentReferences(result);
37409 return finishNode(result, pos);
37410 }
37411 JSDocParser.parseJSDocTypeExpression = parseJSDocTypeExpression;
37412 function parseJSDocNameReference() {
37413 var pos = getNodePos();

Callers 6

tryParseTypeExpressionFunction · 0.85
parseTypeTagFunction · 0.85
parseThisTagFunction · 0.85
parseEnumTagFunction · 0.85
parseTemplateTagFunction · 0.85

Calls 5

getNodePosFunction · 0.85
doInsideOfContextFunction · 0.85
parseExpectedJSDocFunction · 0.85
fixupParentReferencesFunction · 0.85
finishNodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…