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

Docs: Add isEquivalentTo example(s) #386

Open
parker-research opened this issue Dec 2, 2024 · 0 comments
Open

Docs: Add isEquivalentTo example(s) #386

parker-research opened this issue Dec 2, 2024 · 0 comments

Comments

@parker-research
Copy link
Contributor

Related to #380, it would be helpful to add an example of this important method. Creating this issue as a reminder to add it once Python docs are released.

Explanation:

There is an isEquivalentTo function on SyntaxNodes that compare logical equivalence (i.e. without any trivia like whitespace or comments), which is maybe what you want. Otherwise if you want a string comparison you can use the SyntaxPrinter class which has various options for controlling whether comments, trivia, preprocessed nodes, etc are included.

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

1 participant