Skip to content

Commit

Permalink
we now can assign and fetch variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jimtahu committed Apr 27, 2013
1 parent d3ad6ff commit 83aec26
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions PrintStatement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,22 @@
* Author: jimtahu
*/

#include <iostream>

#include "PrintStatement.h"

namespace ParseTree {

using namespace std;

PrintStatement::PrintStatement(Value *output) {
this->value=output;
}

void PrintStatement::Execute(){
cout<<this->value->getValue()<<endl;
}

PrintStatement::~PrintStatement() {
// TODO Auto-generated destructor stub
}
Expand Down
1 change: 1 addition & 0 deletions PrintStatement.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class PrintStatement: public ParseTree::Statement {
Value *value;
public:
PrintStatement(Value *output);
void Execute();
virtual ~PrintStatement();
};

Expand Down

0 comments on commit 83aec26

Please sign in to comment.