Add keypattern rule helper
This way, pattern rules (e.g. golang's comment) can be easily given the same precedence as keyword rules.
This commit is contained in:
parent
174f306e2a
commit
3cd031af38
3 changed files with 11 additions and 7 deletions
|
|
@ -20,6 +20,7 @@ namespace tree_sitter {
|
|||
rule_ptr pattern(const std::string &value);
|
||||
rule_ptr str(const std::string &value);
|
||||
rule_ptr keyword(const std::string &value);
|
||||
rule_ptr keypattern(const std::string &value);
|
||||
rule_ptr err(const rule_ptr &rule);
|
||||
rule_ptr prec(int precedence, rule_ptr rule);
|
||||
rule_ptr token(rule_ptr rule);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue