We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f1b564 commit 95bcea2Copy full SHA for 95bcea2
src/tokens.ts
@@ -46,7 +46,8 @@ function range(token: AntlrToken): [number, number] {
46
}
47
48
function loc(token: AntlrToken): Location {
49
- const textInLines = token.text?.split(/\r?\n/) ?? ['']
+ const tokenText = token.text ?? ''
50
+ const textInLines = tokenText.split(/\r?\n/)
51
const numberOfNewLines = textInLines.length - 1
52
return {
53
start: { line: token.line, column: token.column },
0 commit comments