GSC Interpreter
A Turing-complete interpreter developed for a compiler course
|
Represents an if statement. More...
#include <stmt.hpp>
Public Member Functions | |
If (const std::shared_ptr< Expr > &condition, const std::shared_ptr< Stmt > &thenBranch, const std::shared_ptr< Stmt > &elseBranch) | |
std::any | accept (StmtVisitor &visitor) override |
std::shared_ptr< Expr > | getCondition () const |
std::shared_ptr< Stmt > | getThenBranch () const |
std::shared_ptr< Stmt > | getElseBranch () const |
Private Attributes | |
const std::shared_ptr< Expr > | condition |
const std::shared_ptr< Stmt > | thenBranch |
const std::shared_ptr< Stmt > | elseBranch |
Represents an if statement.
|
inline |
|
inlineoverridevirtual |
|
inline |