From c4dd6e3c6b68f86c9a26dfc33083bb9f759b4a21 Mon Sep 17 00:00:00 2001 From: Stefano Sanfilippo Date: Tue, 2 Dec 2014 16:28:01 +0100 Subject: [PATCH] Removing extra \n when no functions are defined. --- Nodes.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Nodes.cpp b/Nodes.cpp index 002b2bd..3dbc097 100644 --- a/Nodes.cpp +++ b/Nodes.cpp @@ -231,7 +231,9 @@ void Program::emit(std::ostream &stream, int indent) { stream << ";\n"; } - stream << "\n"; + if (!functions.empty()) { + stream << "\n"; + } for (Function *f: functions) { f->emit(stream);