From dea2aed0b509734ec4e1cd163ac2a4f013000da2 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 11 Jun 2010 16:03:50 -0400 Subject: Untabified all source files --- src/expr.cc | 62 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'src/expr.cc') diff --git a/src/expr.cc b/src/expr.cc index 62058e0b..defa5b79 100644 --- a/src/expr.cc +++ b/src/expr.cc @@ -37,7 +37,7 @@ namespace ledger { void expr_t::parse(std::istream& in, const parse_flags_t& flags, - const optional& original_string) + const optional& original_string) { parser_t parser; istream_pos_type start_pos = in.tellg(); @@ -78,36 +78,36 @@ value_t expr_t::real_calc(scope_t& scope) } catch (const std::exception& err) { if (locus) { - string current_context = error_context(); - - add_error_context(_("While evaluating value expression:")); - add_error_context(op_context(ptr, locus)); - - if (SHOW_INFO()) { - add_error_context(_("The value expression tree was:")); - std::ostringstream buf; - ptr->dump(buf, 0); - - std::istringstream in(buf.str()); - std::ostringstream out; - char linebuf[1024]; - bool first = true; - while (in.good() && ! in.eof()) { - in.getline(linebuf, 1023); - std::streamsize len = in.gcount(); - if (len > 0) { - if (first) - first = false; - else - out << '\n'; - out << " " << linebuf; - } - } - add_error_context(out.str()); - } - - if (! current_context.empty()) - add_error_context(current_context); + string current_context = error_context(); + + add_error_context(_("While evaluating value expression:")); + add_error_context(op_context(ptr, locus)); + + if (SHOW_INFO()) { + add_error_context(_("The value expression tree was:")); + std::ostringstream buf; + ptr->dump(buf, 0); + + std::istringstream in(buf.str()); + std::ostringstream out; + char linebuf[1024]; + bool first = true; + while (in.good() && ! in.eof()) { + in.getline(linebuf, 1023); + std::streamsize len = in.gcount(); + if (len > 0) { + if (first) + first = false; + else + out << '\n'; + out << " " << linebuf; + } + } + add_error_context(out.str()); + } + + if (! current_context.empty()) + add_error_context(current_context); } throw; } -- cgit v1.2.3