Move shared rule pointer factories into individual rule files
This commit is contained in:
parent
8a0a442a24
commit
040ec86000
19 changed files with 102 additions and 76 deletions
14
src/rules.h
14
src/rules.h
|
|
@ -10,18 +10,4 @@
|
|||
#include "pattern.h"
|
||||
#include "char.h"
|
||||
|
||||
namespace tree_sitter {
|
||||
namespace rules {
|
||||
rule_ptr blank();
|
||||
rule_ptr sym(const std::string &name);
|
||||
rule_ptr character(char value);
|
||||
rule_ptr str(const std::string &value);
|
||||
rule_ptr pattern(const std::string &value);
|
||||
rule_ptr seq(const std::initializer_list<rule_ptr> &rules);
|
||||
rule_ptr choice(const std::initializer_list<rule_ptr> &rules);
|
||||
|
||||
typedef std::shared_ptr<const Symbol> sym_ptr;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue