Deep-clone the given node and add the clone to the reparsed clone list. The list is used by ast.GetReparsedNodeForNode to locate reparsed clones of JSDoc nodes. Since the binder attaches symbols to reparsed nodes and not to JSDoc nodes, we need the mapping when obtaining symbols and types from JSDoc
(node *ast.Node)
| 24 | // to locate reparsed clones of JSDoc nodes. Since the binder attaches symbols to reparsed nodes and not to JSDoc nodes, we |
| 25 | // need the mapping when obtaining symbols and types from JSDoc nodes. |
| 26 | func (p *Parser) addDeepCloneReparse(node *ast.Node) *ast.Node { |
| 27 | clone := p.factory.DeepCloneReparse(node) |
| 28 | if clone != nil { |
| 29 | p.reparsedClones = append(p.reparsedClones, clone) |
| 30 | } |
| 31 | return clone |
| 32 | } |
| 33 | |
| 34 | func (p *Parser) addTransformedReparse(newNode *ast.Node, old *ast.Node) *ast.Node { |
| 35 | p.finishReparsedNode(newNode, old) |
no test coverage detected