Add copy method to rules

This commit is contained in:
Max Brunsfeld 2014-01-02 13:04:41 -08:00
parent 257b8d7b68
commit f5a9fb67a4
18 changed files with 47 additions and 4 deletions

View file

@ -16,6 +16,10 @@ namespace tree_sitter {
return typeid(this).hash_code() ^ content->hash_code();
}
rule_ptr Repeat::copy() const {
return std::make_shared<Repeat>(*this);
}
string Repeat::to_string() const {
return string("#<repeat ") + content->to_string() + ">";
}