tree-sitter/src/compiler/rules/pattern.h
Max Brunsfeld 649f200831 Expand regex/string rules as part of grammar preparation
This makes it possible to report errors in regex parsing
2014-05-19 20:54:59 -07:00

25 lines
594 B
C++

#ifndef COMPILER_RULES_PATTERN_H_
#define COMPILER_RULES_PATTERN_H_
#include <string>
#include "compiler/rules/rule.h"
namespace tree_sitter {
namespace rules {
class Pattern : public Rule {
public:
explicit Pattern(const std::string &string);
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;
};
}
}
#endif // COMPILER_RULES_PATTERN_H_