()
| 1235 | } |
| 1236 | |
| 1237 | get loc() { |
| 1238 | const lc = this._locConverter; |
| 1239 | // `LocConverter#get` mutates and returns the converter itself, so we |
| 1240 | // must snapshot `line`/`column` between the two calls. |
| 1241 | const s = lc.get(this.start); |
| 1242 | const sl = s.line; |
| 1243 | const sc = s.column; |
| 1244 | const e = lc.get(this.end); |
| 1245 | return { |
| 1246 | start: { line: sl, column: sc }, |
| 1247 | end: { line: e.line, column: e.column } |
| 1248 | }; |
| 1249 | } |
| 1250 | |
| 1251 | /** |
| 1252 | * Serialize back to source — re-slices the original input (zero-alloc for |
no test coverage detected