Add copy method to rules
This commit is contained in:
parent
257b8d7b68
commit
f5a9fb67a4
18 changed files with 47 additions and 4 deletions
|
|
@ -16,6 +16,10 @@ namespace tree_sitter {
|
|||
return typeid(this).hash_code() ^ left->hash_code() ^ right->hash_code();
|
||||
}
|
||||
|
||||
rule_ptr Choice::copy() const {
|
||||
return std::make_shared<Choice>(*this);
|
||||
}
|
||||
|
||||
string Choice::to_string() const {
|
||||
return string("#<choice ") + left->to_string() + " " + right->to_string() + ">";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue