Other display types
This commit is contained in:
parent
148abaf5ab
commit
ea8df64acd
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user