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:
Max Brunsfeld 2014-06-11 12:40:49 -07:00
parent 174f306e2a
commit 3cd031af38
3 changed files with 11 additions and 7 deletions

View file

@ -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);