Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node positions not ordered #1

Open
titusjan opened this issue Oct 30, 2016 · 0 comments
Open

Node positions not ordered #1

titusjan opened this issue Oct 30, 2016 · 0 comments

Comments

@titusjan
Copy link
Owner

When traversing the abstract syntax tree nodes in depth first order, the node position (being the lineno and col_offset attributes) are not always encountered in increasing order. For example decorators occur after their function in the tree but before their function in the source code. Also dictionary keys and values nodes are not in order. More examples can be found in testprogs/invalid_highlights.py

All this can lead to invalid highlighting in the tree. Fixing this would require node-type specific knowledge for the different AST node types. This is low-priority. At the moment only decorator nodes are handled as a special case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant