Node builder utility functions
(ch *Checker, e *printer.EmitContext, idToSymbol map[*ast.IdentifierNode]*ast.Symbol)
| 117 | // Node builder utility functions |
| 118 | |
| 119 | func newNodeBuilderImpl(ch *Checker, e *printer.EmitContext, idToSymbol map[*ast.IdentifierNode]*ast.Symbol) *NodeBuilderImpl { |
| 120 | if idToSymbol == nil { |
| 121 | idToSymbol = make(map[*ast.IdentifierNode]*ast.Symbol) |
| 122 | } |
| 123 | b := &NodeBuilderImpl{f: e.Factory.AsNodeFactory(), ch: ch, e: e, idToSymbol: idToSymbol, pc: pseudochecker.NewPseudoChecker(ch.strictNullChecks, ch.exactOptionalPropertyTypes)} |
| 124 | b.cloneBindingNameVisitor = ast.NewNodeVisitor(b.cloneBindingName, b.f, ast.NodeVisitorHooks{}) |
| 125 | return b |
| 126 | } |
| 127 | |
| 128 | func (b *NodeBuilderImpl) saveRestoreFlags() func() { |
| 129 | flags := b.ctx.flags |
no test coverage detected