Compute transitions for regex pattern rules

This commit is contained in:
Max Brunsfeld 2013-11-14 21:25:58 -08:00
parent 040ec86000
commit ecd317ccd9
13 changed files with 206 additions and 23 deletions

View file

@ -21,7 +21,7 @@ namespace tree_sitter {
bool Seq::operator==(const Rule &rule) const {
const Seq *other = dynamic_cast<const Seq *>(&rule);
return (other != NULL) && (*other->left == *left) && (*other->right == *right);
return other && (*other->left == *left) && (*other->right == *right);
}
std::string Seq::to_string() const {