Struct BinOp¶
- Defined in File ASTNode.h
Inheritance Relationships¶
Base Type¶
public AST::ASTNode(Struct ASTNode)
Derived Type¶
public AST::BoolOp(Struct BoolOp)
Struct Documentation¶
-
struct
BinOp: public AST::ASTNode¶ Subclassed by AST::BoolOp
Public Functions
-
~BinOp()¶
-
void
print_original_src(unsigned int indent_depth = 0)¶
-
bool
check_initialize_before_use(InitializedList &inits, InitializedList *all_inits, bool is_method)¶ Checks if the initialize before use test on the two subexpressions passes.
- Return
- True if the initialized before use test passes for both subexpressions.
- Parameters
inits: Set of initialized variables.
-
virtual 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
Public Static Functions
-
static const std::string
op_lookup(const std::string &op)¶ Helper function to get the method name that desugars the binary operator.
- Return
- Desugared method name.
- Parameters
op: Binary operator value
-