Improve capture quantifier computation

Compute quantifiers in a bottom-up manner, which allows more precise
results for alternations, where the quantifiers are now precisly joined.
This commit is contained in:
Hendrik van Antwerpen 2021-12-02 19:04:49 +01:00
parent 9bac066330
commit 1f1a449c76
5 changed files with 506 additions and 78 deletions

View file

@ -107,10 +107,11 @@ typedef struct {
} TSQueryCapture;
typedef enum {
One,
OneOrMore,
Zero = 0, // must match the array initialization value
ZeroOrOne,
ZeroOrMore,
One,
OneOrMore,
} TSQuantifier;
typedef struct {