summaryrefslogtreecommitdiff
path: root/src/expr.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-11 16:03:50 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-11 17:02:25 -0400
commitdea2aed0b509734ec4e1cd163ac2a4f013000da2 (patch)
tree7908da76c67ae5172882306a319bf26df81b73b4 /src/expr.cc
parentd580079df892c30d023b3211d6c4611c17b11f8f (diff)
downloadfork-ledger-dea2aed0b509734ec4e1cd163ac2a4f013000da2.tar.gz
fork-ledger-dea2aed0b509734ec4e1cd163ac2a4f013000da2.tar.bz2
fork-ledger-dea2aed0b509734ec4e1cd163ac2a4f013000da2.zip
Untabified all source files
Diffstat (limited to 'src/expr.cc')
-rw-r--r--src/expr.cc62
1 files changed, 31 insertions, 31 deletions
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<string>& original_string)
+ const optional<string>& 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;
}