Move rule transitions to visitor class

This commit is contained in:
Max Brunsfeld 2013-12-18 20:58:05 -08:00
parent 84a7afbca5
commit b1bbeae2a1
29 changed files with 205 additions and 125 deletions

View file

@ -6,14 +6,13 @@
namespace tree_sitter {
namespace rules {
class Pattern : public Rule {
const std::string value;
public:
Pattern(const std::string &string);
TransitionMap<Rule> transitions() const;
bool operator==(const Rule& other) const;
std::string to_string() const;
void accept(RuleVisitor &visitor) const;
rule_ptr to_rule_tree() const;
private:
const std::string value;
};
typedef std::shared_ptr<const Pattern> pattern_ptr;