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

Location of node? #37

Open
BugDiver opened this issue Mar 14, 2020 · 3 comments
Open

Location of node? #37

BugDiver opened this issue Mar 14, 2020 · 3 comments

Comments

@BugDiver
Copy link

How to get the location of the node?
Ex:

  • Start Line no
  • End Line no
  • Start Char no of line
  • End Char no of line
@cretz
Copy link
Owner

cretz commented Mar 14, 2020

I don't actively develop this anymore, but you could populate the tag field on every node with positional information using a custom converter (i.e. extending kastree.ast.psi.Converter and overriding onNode).

@BugDiver
Copy link
Author

BugDiver commented Mar 15, 2020

@cretz I figured that from #16. Thanks for the help.

I don't actively develop this anymore
Do you suggest any other libraries which I can use for parsing manipulating kotlin code?

@cretz
Copy link
Owner

cretz commented Mar 15, 2020

In the readme I mention https://github.com/kotlinx/ast, but I have never used it so I can't exactly say how good it is.

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

No branches or pull requests

2 participants