Implement include-children directive in injection queries

This commit is contained in:
Max Brunsfeld 2019-10-14 16:55:14 -07:00
parent b3809274f0
commit 060e00463d
6 changed files with 86 additions and 43 deletions

View file

@ -16,7 +16,13 @@ fn test_query_errors_on_invalid_syntax() {
// Mismatched parens
assert_eq!(
Query::new(language, "(if_statement"),
Err(QueryError::Syntax("Unexpected EOF".to_string()))
Err(QueryError::Syntax(
[
"(if_statement", //
" ^",
]
.join("\n")
))
);
assert_eq!(
Query::new(language, "; comment 1\n; comment 2\n (if_statement))"),