(ctx: ParserRuleContext)
| 5 | constructor(public start: Point, public end: Point) {} |
| 6 | |
| 7 | static fromCtx(ctx: ParserRuleContext): Location { |
| 8 | const stop = ctx.stop?.text ? ctx.stop : ctx.start; |
| 9 | const textLength = (stop.text ?? '').length; |
| 10 | |
| 11 | const start = new Point(ctx.start.line, ctx.start.column); |
| 12 | const end = new Point(stop.line, stop.column + textLength); |
| 13 | |
| 14 | return new Location(start, end); |
| 15 | } |
| 16 | |
| 17 | static fromToken(token: Token): Location { |
| 18 | const textLength = (token.text ?? '').length; |
no outgoing calls
no test coverage detected