(marker: Marker, node)
| 395 | } |
| 396 | |
| 397 | finalize(marker: Marker, node) { |
| 398 | if (this.config.range) { |
| 399 | node.range = [marker.index, this.lastMarker.index]; |
| 400 | } |
| 401 | |
| 402 | if (this.config.loc) { |
| 403 | node.loc = { |
| 404 | start: { |
| 405 | line: marker.line, |
| 406 | column: marker.column, |
| 407 | }, |
| 408 | end: { |
| 409 | line: this.lastMarker.line, |
| 410 | column: this.lastMarker.column |
| 411 | } |
| 412 | }; |
| 413 | if (this.config.source) { |
| 414 | node.loc.source = this.config.source; |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | if (this.delegate) { |
| 419 | const metadata = { |
| 420 | start: { |
| 421 | line: marker.line, |
| 422 | column: marker.column, |
| 423 | offset: marker.index |
| 424 | }, |
| 425 | end: { |
| 426 | line: this.lastMarker.line, |
| 427 | column: this.lastMarker.column, |
| 428 | offset: this.lastMarker.index |
| 429 | } |
| 430 | }; |
| 431 | this.delegate(node, metadata); |
| 432 | } |
| 433 | |
| 434 | return node; |
| 435 | } |
| 436 | |
| 437 | // Expect the next token to match the specified punctuator. |
| 438 | // If not, an exception will be thrown. |
no outgoing calls
no test coverage detected