Add string rules
This commit is contained in:
parent
d830c7c255
commit
ec8b7ccf20
6 changed files with 70 additions and 2 deletions
21
src/rules/string.h
Normal file
21
src/rules/string.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#ifndef __tree_sitter__string__
|
||||
#define __tree_sitter__string__
|
||||
|
||||
#include "rule.h"
|
||||
|
||||
namespace tree_sitter {
|
||||
namespace rules {
|
||||
class String : public Rule {
|
||||
public:
|
||||
String(std::string value);
|
||||
TransitionMap<Rule> transitions() const;
|
||||
String * copy() const;
|
||||
bool operator==(const Rule& other) const;
|
||||
std::string to_string() const;
|
||||
private:
|
||||
std::string value;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue