tree-sitter/src/rules/rule.h
Max Brunsfeld 11e3980319 Add helper functions for making shared pointers to rules
- start work on item set class
2013-11-10 14:59:40 -08:00

23 lines
No EOL
575 B
C++

#ifndef __TreeSitter__rule__
#define __TreeSitter__rule__
#include <string>
namespace tree_sitter {
template<class value> class TransitionMap;
namespace rules {
class Rule {
public:
virtual TransitionMap<Rule> transitions() const = 0;
virtual bool operator==(const Rule& other) const = 0;
virtual std::string to_string() const = 0;
};
typedef std::shared_ptr<const Rule> rule_ptr;
}
}
std::ostream& operator<<(std::ostream& stream, const tree_sitter::rules::Rule &rule);
#endif