sqlparse
sqlparse copied to clipboard
token source position tracking
This PR adds tracking of token source positions, accessible with new pos
and length
attributes on the Token
class and its subclasses. As mentioned in the corresponding issue (#793), we've been using a forked version of sqlparse with this addition to power syntax highlighting in a production system for awhile, and were hoping to upstream the change if it's acceptable.
- [x] ran the tests (
pytest
) - [x] all style issues addressed (
flake8
) - [x] your changes are covered by tests
- [ ] your changes are documented, if needed