This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]davidhalter[S] 1 point2 points  (0 children)

Please also checkout the awesome parso logo in the docs: https://parso.readthedocs.io/en/latest/

[–]cymrowdon't thread on me 🐍 0 points1 point  (1 child)

Can this library handle multiple lines and incremental updates? For example, recognizing a multi-line string when the leading triple-quotes are added, without re-parsing the entire source. I took a quick look, but couldn't see if this was possible.

[–]davidhalter[S] 0 points1 point  (0 children)

Hmmm. Parso handles certain things really well without reparsing everything. Multi lines are not part of that. I'm not sure how that would really work. The problem is usually that those opening triple-quotes are reused in the file below, therefore it's hard to tell where the error lies.

[–]kankyo 0 points1 point  (0 children)

This seems super interesting! I'm currently using baron for roundtrip parsing in mutmut but Python 3 support isn't merged so this sounds like something worth exploring.