2013-11-10 14:24:25 -08:00
|
|
|
#ifndef __tree_sitter_pattern_h_
|
|
|
|
|
#define __tree_sitter_pattern_h_
|
|
|
|
|
|
|
|
|
|
#include "rule.h"
|
|
|
|
|
|
|
|
|
|
namespace tree_sitter {
|
|
|
|
|
namespace rules {
|
|
|
|
|
class Pattern : public Rule {
|
|
|
|
|
public:
|
|
|
|
|
Pattern(const std::string &string);
|
|
|
|
|
TransitionMap<Rule> transitions() const;
|
|
|
|
|
bool operator==(const Rule& other) const;
|
|
|
|
|
std::string to_string() const;
|
|
|
|
|
private:
|
2013-11-13 20:22:06 -08:00
|
|
|
const std::string value;
|
2013-11-10 14:24:25 -08:00
|
|
|
};
|
2013-11-14 12:55:02 -08:00
|
|
|
|
|
|
|
|
typedef std::shared_ptr<const Pattern> pattern_ptr;
|
|
|
|
|
pattern_ptr pattern(const std::string &value);
|
2013-11-10 14:24:25 -08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|