Start work on recording parse action conflicts
This commit is contained in:
parent
1da9f1fdfd
commit
3982b73ed6
12 changed files with 278 additions and 26 deletions
|
|
@ -31,9 +31,16 @@ namespace tree_sitter {
|
|||
const std::vector<std::pair<std::string, rules::rule_ptr>> rules;
|
||||
};
|
||||
|
||||
std::ostream& operator<<(std::ostream &stream, const Grammar &grammar);
|
||||
struct Conflict {
|
||||
Conflict(std::string description);
|
||||
std::string description;
|
||||
bool operator==(const Conflict &other) const;
|
||||
};
|
||||
|
||||
std::string compile(const Grammar &grammar, std::string name);
|
||||
std::ostream& operator<<(std::ostream &stream, const Grammar &grammar);
|
||||
std::ostream& operator<<(std::ostream &stream, const Conflict &conflict);
|
||||
|
||||
std::pair<std::string, std::vector<Conflict>> compile(const Grammar &grammar, std::string name);
|
||||
}
|
||||
|
||||
#endif // TREE_SITTER_COMPILER_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue