(message: string)
| 72 | } |
| 73 | |
| 74 | error(message: string): never { |
| 75 | const { line, col } = this.lineCol; |
| 76 | // message = message.replace(/\n/g, ' '); |
| 77 | // message = message.replace(/\s+/g, ' '); // Normalize whitespace |
| 78 | // message = message.trim(); |
| 79 | // if (message.endsWith('.')) message = message.slice(0, -1); // Remove trailing period |
| 80 | message = `|${this.getLine(line)}\n|${' '.repeat( |
| 81 | col - 1 |
| 82 | )}^\n| ${line}:${col}: ${message}`; |
| 83 | |
| 84 | throw new Error(message); |
| 85 | } |
| 86 | |
| 87 | // @todo: atString()?, or just at()? |
| 88 | match(pattern: string): boolean { |
nothing calls this directly
no outgoing calls
no test coverage detected