Add '.' as a valid start of a predicate, in addition to '#'

See https://github.com/ubolonton/emacs-tree-sitter/issues/38
This commit is contained in:
Tuấn-Anh Nguyễn 2020-07-19 12:40:17 +07:00
parent 82aa1462fd
commit 740d864e67
2 changed files with 31 additions and 2 deletions

View file

@ -805,8 +805,8 @@ static TSQueryError ts_query__parse_pattern(
}
}
// A pound character indicates the start of a predicate.
else if (stream->next == '#') {
// A dot/pound character indicates the start of a predicate.
else if (stream->next == '.' || stream->next == '#') {
stream_advance(stream);
return ts_query__parse_predicate(self, stream);
}