cli: Check queries when running tree-sitter test

This commit is contained in:
Max Brunsfeld 2019-10-18 14:42:52 -07:00
parent b73b31356d
commit e14e285a10
6 changed files with 69 additions and 20 deletions

View file

@ -485,7 +485,7 @@ static TSQueryError ts_query_parse_predicate(
// Parse the string content
const char *string_content = stream->input;
while (stream->next != '"') {
if (!stream_advance(stream)) {
if (stream->next == '\n' || !stream_advance(stream)) {
stream_reset(stream, string_content - 1);
return TSQueryErrorSyntax;
}