2013-11-07 13:24:01 -08:00
|
|
|
#ifndef __tree_sitter__seq__
|
|
|
|
|
#define __tree_sitter__seq__
|
|
|
|
|
|
|
|
|
|
#include "rule.h"
|
|
|
|
|
|
|
|
|
|
namespace tree_sitter {
|
|
|
|
|
namespace rules {
|
|
|
|
|
class Seq : public Rule {
|
|
|
|
|
public:
|
2013-11-10 14:24:25 -08:00
|
|
|
Seq(rule_ptr left, rule_ptr right);
|
2013-11-07 13:24:01 -08:00
|
|
|
TransitionMap<Rule> transitions() const;
|
|
|
|
|
bool operator==(const Rule& other) const;
|
|
|
|
|
std::string to_string() const;
|
|
|
|
|
private:
|
2013-11-13 20:22:06 -08:00
|
|
|
const rule_ptr left;
|
|
|
|
|
const rule_ptr right;
|
2013-11-07 13:24:01 -08:00
|
|
|
};
|
2013-11-14 12:55:02 -08:00
|
|
|
|
|
|
|
|
rule_ptr seq(const std::initializer_list<rule_ptr> &rules);
|
2013-11-07 13:24:01 -08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-11-10 14:24:25 -08:00
|
|
|
#endif
|