MCPcopy Create free account
hub / github.com/microsoft/typescript-go / reparseJSDocComment

Method reparseJSDocComment

internal/parser/reparser.go:281–291  ·  view source on GitHub ↗
(node *ast.Node, tag *ast.Node)

Source from the content-addressed store, hash-verified

279}
280
281func (p *Parser) reparseJSDocComment(node *ast.Node, tag *ast.Node) {
282 if comment := tag.CommentList(); comment != nil {
283 newComment := p.factory.NewNodeList(core.Map(comment.Nodes, p.factory.DeepCloneReparse))
284 newComment.Loc = comment.Loc
285 propJSDoc := p.factory.NewJSDoc(newComment, nil)
286 p.finishReparsedNode(propJSDoc, tag)
287 propJSDoc.Parent = node
288 p.jsdocInfos = append(p.jsdocInfos, JSDocInfo{parent: node, jsDocs: []*ast.Node{propJSDoc}})
289 node.Flags |= ast.NodeFlagsHasJSDoc
290 }
291}
292
293func (p *Parser) gatherTypeParameters(j *ast.Node, typedefOrCallback bool) *ast.NodeList {
294 var typeParameters []*ast.Node

Callers 2

reparseJSDocSignatureMethod · 0.95

Calls 6

finishReparsedNodeMethod · 0.95
MapFunction · 0.92
CommentListMethod · 0.80
NewNodeListMethod · 0.80
NewJSDocMethod · 0.80
appendFunction · 0.50

Tested by

no test coverage detected