diff --git a/src/syntax.cpp b/src/syntax.cpp index a6733d4..c9ba282 100644 --- a/src/syntax.cpp +++ b/src/syntax.cpp @@ -19,7 +19,7 @@ NumNode::NumNode(float num) { } void NumNode::display() { - + cout << num; } StringNode::StringNode(string* stringVal) { @@ -27,7 +27,7 @@ StringNode::StringNode(string* stringVal) { } void StringNode::display() { - + cout << *stringVal; } OpNode::OpNode(int op, Node *first, Node *second) { @@ -37,7 +37,9 @@ OpNode::OpNode(int op, Node *first, Node *second) { } void OpNode::display() { - + first->display(); + cout << " " << (char)op << " "; + second->display(); } void print_expression_list(NodeList *list) {