2014-03-09 21:37:21 -07:00
|
|
|
#include "compiler/rules/seq.h"
|
2017-03-17 12:52:01 -07:00
|
|
|
#include "compiler/rule.h"
|
2013-12-19 23:05:54 -08:00
|
|
|
|
2013-11-10 14:24:25 -08:00
|
|
|
namespace tree_sitter {
|
2014-07-20 21:43:27 -07:00
|
|
|
namespace rules {
|
|
|
|
|
|
2017-03-17 12:52:01 -07:00
|
|
|
Seq::Seq(const Rule &left, const Rule &right) :
|
|
|
|
|
left(std::make_shared<Rule>(left)),
|
|
|
|
|
right(std::make_shared<Rule>(right)) {}
|
|
|
|
|
|
|
|
|
|
bool Seq::operator==(const Seq &other) const {
|
|
|
|
|
return left->operator==(*other.left) && right->operator==(*other.right);
|
2015-07-31 16:32:24 -07:00
|
|
|
}
|
2014-07-20 21:43:27 -07:00
|
|
|
|
|
|
|
|
} // namespace rules
|
|
|
|
|
} // namespace tree_sitter
|