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

Add NOOP after and before quote if there is no labeled vnodes #609

Open
zurk opened this issue Feb 14, 2019 · 0 comments
Open

Add NOOP after and before quote if there is no labeled vnodes #609

zurk opened this issue Feb 14, 2019 · 0 comments
Labels
bug Something isn't working format Issues related to format analyzer small Small size

Comments

@zurk
Copy link
Contributor

zurk commented Feb 14, 2019

I mention that when you have a string var t = "asd";and parse it into a sequence of vnodes you get

VirtualNode('', y=∅, start=(0, 1, 1), end=(0, 1, 1), node=None, path="test.py"),
VirtualNode('var', y=None, start=(0, 1, 1), end=(3, 1, 4), node=None, path="test.py"),
VirtualNode(' ', y=␣, start=(3, 1, 4), end=(4, 1, 5), node=None, path="test.py"),
VirtualNode('t', y=None, start=(4, 1, 5), end=(5, 1, 6), node=140603951547032, path="test.py"),
VirtualNode(' ', y=␣, start=(5, 1, 6), end=(6, 1, 7), node=None, path="test.py"),
VirtualNode('=', y=None, start=(6, 1, 7), end=(7, 1, 8), node=None, path="test.py"),
VirtualNode(' ', y=␣, start=(7, 1, 8), end=(8, 1, 9), node=None, path="test.py"),
VirtualNode('"', y=", start=(8, 1, 9), end=(9, 1, 10), node=None, path="test.py"),
VirtualNode('asd', y=None, start=(9, 1, 10), end=(12, 1, 13), node=140603951547120, path="test.py"),
VirtualNode('"', y=", start=(12, 1, 13), end=(13, 1, 14), node=None, path="test.py"),
VirtualNode(';', y=None, start=(13, 1, 14), end=(14, 1, 15), node=None, path="test.py"),
VirtualNode('', y=∅, start=(14, 1, 15), end=(14, 1, 15), node=None, path="test.py")

And if you want to insert space between last " and ; you cannot because there is no NOOP from parser.

@zurk zurk added bug Something isn't working format Issues related to format analyzer small Small size labels Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working format Issues related to format analyzer small Small size
Projects
None yet
Development

No branches or pull requests

1 participant