9 std::shared_ptr<ASTExpr> ARG;
12 std::vector<std::shared_ptr<ASTNode>>
getChildren()
override;
16 llvm::Value *
codegen()
override;
19 std::ostream &
print(std::ostream &out)
const override;
Abstract class for all expression subtypes.
Definition: ASTExpr.h:7
Class for a return statement.
Definition: ASTReturnStmt.h:8
ASTReturnStmt(std::shared_ptr< ASTExpr > ARG)
Definition: ASTReturnStmt.h:13
ASTExpr * getArg() const
Definition: ASTReturnStmt.h:14
std::vector< std::shared_ptr< ASTNode > > getChildren() override
Return all of the children for the node.
Definition: ASTReturnStmt.cpp:16
llvm::Value * codegen() override
Perform code generation and return an LLVM value the code.
Definition: CodeGenFunctions.cpp:1051
std::ostream & print(std::ostream &out) const override
Definition: ASTReturnStmt.cpp:11
void accept(ASTVisitor *visitor) override
Visit the children of this node and apply the visitor.
Definition: ASTReturnStmt.cpp:4
Base class for all statement nodes.
Definition: ASTStmt.h:7
Base class for AST visitors.
Definition: ASTVisitor.h:23