tree-sitter/src/compiler/rules/pattern.h

27 lines
534 B
C
Raw Normal View History

2014-03-09 22:05:17 -07:00
#ifndef COMPILER_RULES_PATTERN_H_
#define COMPILER_RULES_PATTERN_H_
2014-03-09 22:45:33 -07:00
#include <string>
#include "compiler/rule.h"
namespace tree_sitter {
namespace rules {
2013-12-30 23:52:38 -08:00
class Pattern : public Rule {
public:
explicit Pattern(const std::string &string);
2014-03-09 19:49:35 -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 std::string value;
};
} // namespace rules
} // namespace tree_sitter
#endif // COMPILER_RULES_PATTERN_H_