-
Notifications
You must be signed in to change notification settings - Fork 35
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
how can we pass double quote in the java tree sitter query language #31
Comments
Have you tried escaping the inner double quotes with backslashes? e.g.
|
yes I did and it didn't worked out |
Something similar did work here. Perhaps you'd be willing to post more details of what you tried when you tried the escaping with backslashes and the specific output of what didn't work? |
FWIW, it's not quite the same but when I used a file named
and another file named flagEnabled("FG_CODE_CLEAN_FEATURE_FLAG"); the invocation:
gave:
This was with
Does your query work with the cli? |
how can we pass double quote in the java tree sitter query language
currently its giving following errror to me -
upon passing (#eq? @argument ""FG_CODE_CLEAN_FEATURE_FLAG"")
Error - Could not parse the query : "((\n (method_invocation \n name : () @name\n arguments: ((argument_list \n ([\n (field_access field: ()@argument)\n (_) @argument\n ])) )\n \n ) @method_invocation\n)\n(#eq? @name "flagEnabled")\n(#eq? @argument ""FG_CODE_CLEAN_FEATURE_FLAG"")\n)" Some(QueryError { row: 0, column: 0, offset: 0, message: "Wrong number of arguments to #eq? predicate. Expected 2, got 4.", kind: Predicate }
upon passing - (#eq? @argument '"FG_CODE_CLEAN_FEATURE_FLAG"')
'Incorrect Rule Graph - Cannot parse the tree-sitter query - ((
(method_invocation
name : () @name
arguments: ((argument_list
([
(field_access field: ()@argument)
(_) @argument
])) )
)
(#eq? @name "flagEnabled")
(#eq? @argument '"FG_CODE_CLEAN_FEATURE_FLAG"')
Request you guide me to the right path!!!
The text was updated successfully, but these errors were encountered: