This is mostly a non-issue, at least for me, but I thought I'd put this here anyway. I am attempting to create a nunjucks parser in another language. While searching through the code for lexer.js and testing my code I realized that lineno and colno should start at 1 and not 0 (they're not arrays).
The other issue is that colno doesn't give the column of the start of the token, rather it gives the column that the token ends on.
As an example, passing this {{ "http://mozilla.github.io/" | urlize(10, true) | safe }} string through the lexer yields the following output:
This is mostly a non-issue, at least for me, but I thought I'd put this here anyway. I am attempting to create a nunjucks parser in another language. While searching through the code for
lexer.js
and testing my code I realized thatlineno
andcolno
should start at 1 and not 0 (they're not arrays).The other issue is that
colno
doesn't give the column of the start of the token, rather it gives the column that the token ends on.As an example, passing this
{{ "http://mozilla.github.io/" | urlize(10, true) | safe }}
string through the lexer yields the following output: