Skip to content

Commit 5f5e3b4

Browse files
committed
Doc: Add comment about current_body
1 parent 7f6abcd commit 5f5e3b4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lpython/semantics/python_ast_to_asr.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,10 @@ class CommonVisitor : public AST::BaseVisitor<Struct> {
582582
std::map<int, ASR::symbol_t*> &ast_overload;
583583
std::string parent_dir;
584584
std::vector<std::string> import_paths;
585+
/*
586+
current_body exists only for Functions, For, If (& its Else part), While.
587+
current_body does not exist for Modules, ClassDef/Structs.
588+
*/
585589
Vec<ASR::stmt_t*> *current_body;
586590
ASR::ttype_t* ann_assign_target_type;
587591
AST::expr_t* assign_ast_target;

0 commit comments

Comments
 (0)