@@ -592,6 +592,11 @@ class CommonVisitor : public AST::BaseVisitor<Struct> {
592
592
return nullptr ;
593
593
}
594
594
595
+
596
+ void visit_AsyncFunctionDef (const AST::AsyncFunctionDef_t &x){
597
+ throw SemanticError (" The `async` keyword is currently not supported" , x.base .base .loc );
598
+ }
599
+
595
600
void visit_expr_list (AST::expr_t ** exprs, size_t n,
596
601
Vec<ASR::expr_t *>& exprs_vec) {
597
602
LCOMPILERS_ASSERT (exprs_vec.reserve_called );
@@ -4051,17 +4056,7 @@ class SymbolTableVisitor : public CommonVisitor<SymbolTableVisitor> {
4051
4056
// Implement visit_Global for Symbol Table visitor.
4052
4057
void visit_Global (const AST::Global_t &/* x*/ ) {}
4053
4058
4054
- void visit_AsyncFunctionDef (const AST::AsyncFunctionDef_t &x){
4055
- try
4056
- {
4057
- // to be implemented
4058
- }
4059
- catch (const std::exception& e)
4060
- {
4061
- std::cerr << e.what () << ' \n ' ;
4062
- }
4063
- throw SemanticError (" The `async` keyword is currently not supported" , x.base .base .loc );
4064
- }
4059
+
4065
4060
4066
4061
void visit_FunctionDef (const AST::FunctionDef_t &x) {
4067
4062
dependencies.clear (al);
@@ -4835,18 +4830,6 @@ class BodyVisitor : public CommonVisitor<BodyVisitor> {
4835
4830
tmp = nullptr ;
4836
4831
}
4837
4832
4838
- void visit_AsyncFunctionDef (const AST::AsyncFunctionDef_t &/* x*/ ) {
4839
- try
4840
- {
4841
- // BodyVisitor for visit_AsyncFunctionDef to be implemented
4842
- }
4843
- catch (const std::exception& e)
4844
- {
4845
- std::cerr << e.what () << ' \n ' ;
4846
- }
4847
-
4848
- }
4849
-
4850
4833
4851
4834
void visit_Import (const AST::Import_t &x) {
4852
4835
// All the modules are imported in the SymbolTable visitor
0 commit comments