(prop: "start" | "end", loc: Loc, columnOffset: number)
| 362 | } |
| 363 | |
| 364 | _normalizePosition(prop: "start" | "end", loc: Loc, columnOffset: number) { |
| 365 | this._flush(); |
| 366 | |
| 367 | const pos = loc[prop]; |
| 368 | if (pos) { |
| 369 | this.setSourcePosition( |
| 370 | pos.line, |
| 371 | // TODO: Fix https://github.com/babel/babel/issues/15712 in downstream |
| 372 | Math.max(pos.column + columnOffset, 0), |
| 373 | ); |
| 374 | this._sourcePosition.filename = loc.filename; |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | setSourcePosition(line: number, column: number): void { |
| 379 | const target = this._sourcePosition; |
no test coverage detected