Hi
AST nodes currently only track lineno. It'd be super nice if they could track their own column number. Ideally, they also track their own end, but that's more complex.
I'm currently doing some static analysis of jinja template usage, and highlighting problems, such as undefined variables.
At the moment, I'm using lineno and searching for the column manually, which is mostly OK, but prone to false positives.
Implementing this change does not seem too complicated, I could submit a PR if this feature is desired in Jinja.
Hi
AST nodes currently only track lineno. It'd be super nice if they could track their own column number. Ideally, they also track their own
end, but that's more complex.I'm currently doing some static analysis of jinja template usage, and highlighting problems, such as undefined variables.
At the moment, I'm using
linenoand searching for the column manually, which is mostly OK, but prone to false positives.Implementing this change does not seem too complicated, I could submit a PR if this feature is desired in Jinja.