query: Fix escape sequence parsing in anonymous node patterns
Fixes #776 Fixes #760
This commit is contained in:
parent
071f4e40f1
commit
c2c63baf5b
3 changed files with 86 additions and 115 deletions
|
|
@ -1475,6 +1475,7 @@ fn test_query_matches_with_anonymous_tokens() {
|
|||
r#"
|
||||
";" @punctuation
|
||||
"&&" @operator
|
||||
"\"" @quote
|
||||
"#,
|
||||
)
|
||||
.unwrap();
|
||||
|
|
@ -1482,9 +1483,11 @@ fn test_query_matches_with_anonymous_tokens() {
|
|||
assert_query_matches(
|
||||
language,
|
||||
&query,
|
||||
"foo(a && b);",
|
||||
r#"foo(a && "b");"#,
|
||||
&[
|
||||
(1, vec![("operator", "&&")]),
|
||||
(2, vec![("quote", "\"")]),
|
||||
(2, vec![("quote", "\"")]),
|
||||
(0, vec![("punctuation", ";")]),
|
||||
],
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue