2014-03-09 22:05:17 -07:00
|
|
|
#ifndef COMPILER_RULES_REPEAT_H_
|
|
|
|
|
#define COMPILER_RULES_REPEAT_H_
|
2013-11-15 08:46:45 -08:00
|
|
|
|
2014-03-09 22:45:33 -07:00
|
|
|
#include <string>
|
2015-09-03 17:49:20 -07:00
|
|
|
#include "compiler/rule.h"
|
2013-11-15 08:46:45 -08:00
|
|
|
|
2014-07-20 21:43:27 -07:00
|
|
|
namespace tree_sitter {
|
|
|
|
|
namespace rules {
|
2013-12-30 23:52:38 -08:00
|
|
|
|
2014-07-20 21:43:27 -07:00
|
|
|
class Repeat : public Rule {
|
|
|
|
|
public:
|
|
|
|
|
explicit Repeat(rule_ptr content);
|
2015-01-14 21:09:39 -08:00
|
|
|
static rule_ptr build(const rule_ptr &rule);
|
2013-12-18 20:58:05 -08:00
|
|
|
|
2014-07-20 21:43:27 -07:00
|
|
|
bool operator==(const Rule &other) const;
|
|
|
|
|
size_t hash_code() const;
|
|
|
|
|
rule_ptr copy() const;
|
|
|
|
|
std::string to_string() const;
|
|
|
|
|
void accept(Visitor *visitor) const;
|
|
|
|
|
|
|
|
|
|
const rule_ptr content;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace rules
|
|
|
|
|
} // namespace tree_sitter
|
2013-11-15 08:46:45 -08:00
|
|
|
|
2014-03-09 22:05:17 -07:00
|
|
|
#endif // COMPILER_RULES_REPEAT_H_
|