Class If¶
- Defined in File ASTNode.h
Inheritance Relationships¶
Base Type¶
public AST::ASTNode(Struct ASTNode)
Class Documentation¶
-
class
If: public AST::ASTNode¶ Public Functions
-
~If()¶
-
void
print_original_src(unsigned int indent_depth = 0)¶
-
bool
check_initialize_before_use(InitializedList &inits, InitializedList *all_inits, bool is_method)¶ Specialized implementation of the initialize before use type check. The initialized list is modified by the function and represents the set of variables in the intersection of the variables from the true and false blocks.
- Return
- True if the check passed.
- Parameters
inits: Initialized list modified in place
-
std::string
generate_code(CodeGen::Settings &settings, unsigned indent_lvl, bool is_lhs) const¶ Generates the code for an If block.
- Return
- No variable name returned. This is because no temporary variables are associated with an If.
- Parameters
settings: Code generator settingsindent_lvl: Indentation level for the generated code
-
bool
contains_return_all_paths()¶ Checks whether the if block contains a return in both the true and false parts
- Return
- True both the true and false parts always raise a return
-