2013-11-07 13:24:01 -08:00
|
|
|
#ifndef __tree_sitter__seq__
|
|
|
|
|
#define __tree_sitter__seq__
|
|
|
|
|
|
|
|
|
|
#include "rule.h"
|
2014-02-16 22:13:08 -08:00
|
|
|
#include <vector>
|
2013-11-07 13:24:01 -08:00
|
|
|
|
|
|
|
|
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);
|
2014-02-16 22:13:08 -08:00
|
|
|
static rule_ptr Build(const std::vector<rule_ptr> &rules);
|
2013-12-30 23:52:38 -08:00
|
|
|
|
2013-11-07 13:24:01 -08:00
|
|
|
bool operator==(const Rule& other) const;
|
2013-12-30 23:52:38 -08:00
|
|
|
size_t hash_code() const;
|
2014-01-02 13:04:41 -08:00
|
|
|
rule_ptr copy() const;
|
2013-11-07 13:24:01 -08:00
|
|
|
std::string to_string() const;
|
2013-12-19 23:16:13 -08:00
|
|
|
void accept(Visitor &visitor) const;
|
2013-12-18 20:58:05 -08:00
|
|
|
|
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-10 14:24:25 -08:00
|
|
|
#endif
|