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

Function parseJSDocParameter

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

Source from the content-addressed store, hash-verified

33353 return finishNode(factory.createTypeReferenceNode(parseIdentifierName(), /*typeArguments*/ undefined), pos);
33354 }
33355 function parseJSDocParameter() {
33356 var pos = getNodePos();
33357 var name;
33358 if (token() === 108 /* SyntaxKind.ThisKeyword */ || token() === 103 /* SyntaxKind.NewKeyword */) {
33359 name = parseIdentifierName();
33360 parseExpected(58 /* SyntaxKind.ColonToken */);
33361 }
33362 return finishNode(factory.createParameterDeclaration(
33363 /*decorators*/ undefined,
33364 /*modifiers*/ undefined,
33365 /*dotDotDotToken*/ undefined,
33366 // TODO(rbuckton): JSDoc parameters don't have names (except `this`/`new`), should we manufacture an empty identifier?
33367 name,
33368 /*questionToken*/ undefined, parseJSDocType(),
33369 /*initializer*/ undefined), pos);
33370 }
33371 function parseJSDocType() {
33372 scanner.setInJSDocType(true);
33373 var pos = getNodePos();

Callers

nothing calls this directly

Calls 6

getNodePosFunction · 0.85
parseIdentifierNameFunction · 0.85
parseExpectedFunction · 0.85
finishNodeFunction · 0.85
parseJSDocTypeFunction · 0.85
tokenFunction · 0.70

Tested by

no test coverage detected