Replies: 1 comment
-
Did you try with tree-sitter's Python parser if it works better with comments? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using the python parser (PythonTreeGenerator) and working on getting comments in the code. I know that the structure of the Simple node generated has body and inside the body there is the nodes. Inside the nodes we have targets, specialsAfter, value.. I am able to get the specialsAfter using NodeUtils.getBody(root).specialsAfter. I want to access the value and dive into it to collect the comments as well as args. I could not find methods to help me do that, does anyone knows how can I do that or propose a better method to get the comments and add them to the root tree?
Thank you so much for your help in advance.
Best,
Beta Was this translation helpful? Give feedback.
All reactions