From 36de368b19f03643c9aff70270ffa75cc3970456 Mon Sep 17 00:00:00 2001 From: Stefano Sanfilippo Date: Sun, 30 Nov 2014 13:40:08 +0100 Subject: [PATCH] Enclose output expression in (). --- Nodes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Nodes.cpp b/Nodes.cpp index 8df3fe3..f2d2515 100644 --- a/Nodes.cpp +++ b/Nodes.cpp @@ -161,9 +161,9 @@ void Assignment::emit(std::ostream &stream, int indent) { } void Print::emit(std::ostream &stream, int indent) { - stream << "std::cout << "; + stream << "std::cout << ("; expression->emit(stream); - stream << " << std::endl"; + stream << ") << std::endl"; } void Input::emit(std::ostream &stream, int indent) {