Skip to content

Commit

Permalink
Printing works now
Browse files Browse the repository at this point in the history
  • Loading branch information
jimtahu committed Apr 27, 2013
1 parent db2b21c commit 00860cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions PrintStatement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@
*/

#include "PrintStatement.h"
#include <iostream>

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 00860cd

Please sign in to comment.