Struct BoolOp¶
- Defined in File ASTNode.h
Inheritance Relationships¶
Base Type¶
public AST::BinOp(Struct BinOp)
Struct Documentation¶
-
struct
BoolOp: public AST::BinOp¶ Public Functions
-
std::string
generate_code(CodeGen::Settings &settings, unsigned indent_lvl, bool is_lhs) const¶ Binary operators are syntactic sugar for function cals. Therefore, turn a binary operator node in the tree into an object call.
- Parameters
settings: Code generator settingsindent_lvl: Level of indentation
-
void
generate_eval_bool_op(CodeGen::Settings settings, const unsigned indent_lvl, const std::string &true_label, const std::string &false_label)¶ Special handling of the short circuit Boolean operators
- Parameters
settings: Code generator settingsindent_lvl: Level of indentaitontrue_label: Label to jump to if the Boolean operator evaluates to truefalse_label: Label to jump to if the Boolean operator evaluates to false
-
std::string