(loc: Position)
| 54 | } |
| 55 | |
| 56 | startNodeAt<T extends NodeType = never>(loc: Position): Undone<T> { |
| 57 | this.setLoc(loc); |
| 58 | const { optionFlags, filename } = this; |
| 59 | if (!(optionFlags & OptionFlags.Locations)) { |
| 60 | return new Node(optionFlags, filename, loc.index) as unknown as Undone<T>; |
| 61 | } |
| 62 | return new Node( |
| 63 | optionFlags, |
| 64 | filename, |
| 65 | loc.index, |
| 66 | this.createPosition(loc), |
| 67 | ) as unknown as Undone<T>; |
| 68 | } |
| 69 | |
| 70 | /** Start a new node with a previous node's location. */ |
| 71 | startNodeAtNode<T extends NodeType = never>( |
nothing calls this directly
no test coverage detected