File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1487,6 +1487,19 @@ class SymbolTableVisitor : public CommonVisitor<SymbolTableVisitor> {
1487
1487
}
1488
1488
}
1489
1489
1490
+ void visit_ClassDef (const AST::ClassDef_t &x) {
1491
+ SymbolTable *parent_scope = current_scope;
1492
+ current_scope = al.make_new <SymbolTable>(parent_scope);
1493
+ for (size_t i=0 ; i<x.n_body ; i++) {
1494
+ visit_stmt (*x.m_body [i]);
1495
+ }
1496
+ tmp = ASR::make_Class_t (al, x.base .base .loc ,
1497
+ nullptr , nullptr , 0 );
1498
+ ASR::symbol_t * t = ASR::down_cast<ASR::symbol_t >(tmp);
1499
+ parent_scope->scope [x.m_name ] = t;
1500
+ current_scope = parent_scope;
1501
+ }
1502
+
1490
1503
void create_GenericProcedure (const Location &loc) {
1491
1504
for (auto &p: overload_defs) {
1492
1505
std::string def_name = p.first ;
You can’t perform that action at this time.
0 commit comments