update

This commit is contained in:
ValKmjolnir
2023-06-17 00:15:07 +08:00
parent c95810b46c
commit 7d8f199c8e
5 changed files with 95 additions and 4 deletions
+19
View File
@@ -26,4 +26,23 @@ bool ast_visitor::visit_identifier(identifier* node) {
bool ast_visitor::visit_bool_literal(bool_literal* node) {
return true;
}
bool ast_visitor::visit_vector_expr(vector_expr* node) {
for(auto i : node->get_elements()) {
i->accept(this);
}
return true;
}
bool ast_visitor::visit_hash_expr(hash_expr* node) {
for(auto i : node->get_members()) {
i->accept(this);
}
}
bool ast_visitor::visit_hash_pair(hash_pair* node) {
if (node->get_element()) {
node->get_element()->accept(this);
}
}