(node: any, _content: string)
| 148 | } |
| 149 | |
| 150 | private firstErrorLine(node: any, _content: string): number | null { |
| 151 | if (node.type === 'ERROR' || node.isMissing?.()) return (node.startPosition?.row ?? 0) + 1; |
| 152 | for (let i = 0; i < (node.childCount ?? 0); i++) { |
| 153 | const l = this.firstErrorLine(node.child(i), _content); |
| 154 | if (l) return l; |
| 155 | } |
| 156 | return null; |
| 157 | } |
| 158 | } |