From 89978d1ca50aa4fe6b1b8dc46d829e76afbd47f4 Mon Sep 17 00:00:00 2001 From: Ulya Trofimovich Date: Thu, 2 Apr 2015 15:02:33 +0100 Subject: [PATCH] Prettified debug output. --- re2c/go_emit.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/re2c/go_emit.cc b/re2c/go_emit.cc index 8d2264b2..2ec1d832 100644 --- a/re2c/go_emit.cc +++ b/re2c/go_emit.cc @@ -62,11 +62,17 @@ std::string output_hgo (OutputFile & o, uint ind, bool & readCh, SwitchIf * hgo) uint Span::show (std::ostream & o, uint lb) const { + printSpan(o, lb, ub); + o << " "; if (to) { - printSpan(o, lb, ub); - o << " " << to->label << "; "; + o << to->label; } + else + { + o << "(nil)"; + } + o << "; "; return ub; } -- 2.40.0