Fix query analysis with top-level non-terminal extras
Fixes https://github.com/tree-sitter/tree-sitter/issues/968#issuecomment-792314281
This commit is contained in:
parent
5a2534ac4a
commit
6ba11d7778
2 changed files with 18 additions and 2 deletions
|
|
@ -3132,6 +3132,20 @@ fn test_query_step_is_definite() {
|
|||
"#,
|
||||
results_by_substring: &[("name:", true)],
|
||||
},
|
||||
Row {
|
||||
description: "top-level non-terminal extra nodes",
|
||||
language: get_language("ruby"),
|
||||
pattern: r#"
|
||||
(heredoc_body
|
||||
(interpolation)
|
||||
(heredoc_end) @end)
|
||||
"#,
|
||||
results_by_substring: &[
|
||||
("(heredoc_body", false),
|
||||
("(interpolation)", false),
|
||||
("(heredoc_end)", true),
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
allocations::record(|| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue