Add copy method to rules
This commit is contained in:
parent
257b8d7b68
commit
f5a9fb67a4
18 changed files with 47 additions and 4 deletions
|
|
@ -14,11 +14,11 @@ namespace tree_sitter {
|
|||
}
|
||||
|
||||
void visit(const Character *rule) {
|
||||
value = transition_map<Rule, Rule>({{ std::make_shared<Character>(*rule), blank() }});
|
||||
value = transition_map<Rule, Rule>({{ rule->copy(), blank() }});
|
||||
}
|
||||
|
||||
void visit(const Symbol *rule) {
|
||||
value = transition_map<Rule, Rule>({{ std::make_shared<Symbol>(*rule), blank() }});
|
||||
value = transition_map<Rule, Rule>({{ rule->copy(), blank() }});
|
||||
}
|
||||
|
||||
void visit(const Choice *rule) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue