Class Block

Class Documentation

class Block

Public Functions

Block()
~Block()
void append(ASTNode *stmt)
void print_original_src(unsigned int indent_depth)
bool check_initialize_before_use(InitializedList &inits, InitializedList *all_inits, bool is_method)
bool perform_type_inference(TypeCheck::Settings &settings)
void generate_code(CodeGen::Settings &settings, unsigned indent_lvl = 0)

Generates the code for a block of statements

This function also increases the indent level for all statements in the block.

Parameters
  • settings:
  • indent_lvl: Incoming number of indents

bool contains_return_all_paths()

Checks whether the block has a return on all paths through the block.

Return
True if it contains a return on all paths.

bool empty()