Handle set! predicate function in queries
This commit is contained in:
parent
ff9a2c1f53
commit
b15e90bd26
5 changed files with 140 additions and 25 deletions
|
|
@ -196,7 +196,7 @@ static void stream_skip_whitespace(Stream *stream) {
|
|||
}
|
||||
|
||||
static bool stream_is_ident_start(Stream *stream) {
|
||||
return iswalpha(stream->next) || stream->next == '_' || stream->next == '-';
|
||||
return iswalnum(stream->next) || stream->next == '_' || stream->next == '-';
|
||||
}
|
||||
|
||||
static void stream_scan_identifier(Stream *stream) {
|
||||
|
|
@ -417,6 +417,7 @@ static TSQueryError ts_query_parse_predicate(
|
|||
for (;;) {
|
||||
if (stream->next == ')') {
|
||||
stream_advance(stream);
|
||||
stream_skip_whitespace(stream);
|
||||
array_back(&self->predicates_by_pattern)->length++;
|
||||
array_push(&self->predicate_steps, ((TSQueryPredicateStep) {
|
||||
.type = TSQueryPredicateStepTypeDone,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue