feat(lib)!: disallow whitespace in supertype syntax

This commit is contained in:
Amaan Qureshi 2025-09-27 20:49:45 -04:00 committed by Amaan Qureshi
parent 341665824c
commit 00e394f0f1
2 changed files with 16 additions and 4 deletions

View file

@ -238,6 +238,20 @@ fn test_query_errors_on_invalid_syntax() {
]
.join("\n")
);
assert_eq!(
Query::new(&language, "(statement / export_statement)").unwrap_err(),
QueryError {
row: 0,
offset: 11,
column: 11,
kind: QueryErrorKind::Syntax,
message: [
"(statement / export_statement)", //
" ^"
]
.join("\n")
}
);
});
}