Add character rule class
This commit is contained in:
parent
061d8a8efc
commit
849f2ee195
3 changed files with 78 additions and 30 deletions
11
src/rules.h
11
src/rules.h
|
|
@ -36,6 +36,17 @@ namespace tree_sitter {
|
|||
private:
|
||||
int id;
|
||||
};
|
||||
|
||||
class Char : public Rule {
|
||||
public:
|
||||
Char(char value);
|
||||
TransitionMap<Rule> transitions() const;
|
||||
Char * copy() const;
|
||||
bool operator==(const Rule& other) const;
|
||||
std::string to_string() const;
|
||||
private:
|
||||
char value;
|
||||
};
|
||||
|
||||
class Choice : public Rule {
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue