Replies: 1 comment 5 replies
-
Please define "a valid expression". If you mean "syntactically valid" (to the extent that the parser understands it -- not every parser is complete), then you don't need any queries and can just parse the string and check for |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there some way to decide if a node is a valid expression without having to write complicated captures for all languages? As an example, let's say I want to decide if the current visual selection in
Python
is valid to use as a return value in a function.Related to:
ThePrimeagen/refactoring.nvim#443 (comment)
Beta Was this translation helpful? Give feedback.
All reactions