From 9cd63688ae354a40aa0d7995984d77b83706f241 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 4 Jun 2012 18:23:59 -0700 Subject: [PATCH] Remove empty expression statements from the output. --- Parser.hpp | 3 ++- Replace.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Parser.hpp b/Parser.hpp index 033c12c..2743166 100644 --- a/Parser.hpp +++ b/Parser.hpp @@ -384,7 +384,8 @@ struct CYContext { Type_ **last(&values); CYForEach (next, values) { Replace(*last = next); - last = &(*last)->next_; + if (*last != NULL) + last = &(*last)->next_; } } diff --git a/Replace.cpp b/Replace.cpp index 00f6419..f51d223 100644 --- a/Replace.cpp +++ b/Replace.cpp @@ -240,7 +240,7 @@ CYStatement *CYEmpty::Collapse(CYContext &context) { } CYStatement *CYEmpty::Replace(CYContext &context) { - return this; + return NULL; } CYStatement *CYExpress::Collapse(CYContext &context) { -- 2.45.2