aboutsummaryrefslogtreecommitdiffstats
path: root/c_compiler/include/statement.hpp
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-03-17 22:38:08 +0000
committerYann Herklotz <ymherklotz@gmail.com>2017-03-17 22:38:08 +0000
commita9663b327230e08a6bc5cfe4f20ed8d066f33338 (patch)
tree4a47654b4fd29300ebee876fa1d9f79dac52499f /c_compiler/include/statement.hpp
parentf35548ee7d4c54558c38d63df7e2572150c28d22 (diff)
downloadCompiler-a9663b327230e08a6bc5cfe4f20ed8d066f33338.tar.gz
Compiler-a9663b327230e08a6bc5cfe4f20ed8d066f33338.zip
Creating if statement
Diffstat (limited to 'c_compiler/include/statement.hpp')
-rw-r--r--c_compiler/include/statement.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/c_compiler/include/statement.hpp b/c_compiler/include/statement.hpp
index fe0597c..fe509c2 100644
--- a/c_compiler/include/statement.hpp
+++ b/c_compiler/include/statement.hpp
@@ -51,10 +51,11 @@ public:
class SelectionStatement : public Statement {
protected:
+ ExpressionPtr condition_;
StatementPtr if_;
StatementPtr else_;
public:
- SelectionStatement(Statement* _if = nullptr, Statement* _else = nullptr);
+ SelectionStatement(Expression* condition, Statement* _if, Statement* _else = nullptr);
virtual void print() const;
virtual void printXml() const;