summaryrefslogtreecommitdiff
path: root/src/parser.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-02-21 03:53:00 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-02-21 03:53:00 -0600
commitc47350dce9c666987f924c54507973fc11587b2e (patch)
treeaf3dce9cdcea344d640f108efd58bc949d0a2955 /src/parser.cc
parent36922c5945290f43a3517fb2f5f155b287b9b565 (diff)
downloadfork-ledger-c47350dce9c666987f924c54507973fc11587b2e.tar.gz
fork-ledger-c47350dce9c666987f924c54507973fc11587b2e.tar.bz2
fork-ledger-c47350dce9c666987f924c54507973fc11587b2e.zip
Corrected handling of nested definitions
Diffstat (limited to 'src/parser.cc')
-rw-r--r--src/parser.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/parser.cc b/src/parser.cc
index ad621106..6197af6b 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -517,14 +517,10 @@ expr_t::parser_t::parse_value_expr(std::istream& in,
ptr_op_t seq(new op_t(op_t::O_SEQ));
if (! chain) {
seq->set_left(node);
- ptr_op_t scope(new op_t(op_t::SCOPE));
- scope->set_left(seq);
- node = scope;
+ node = seq;
} else {
seq->set_left(chain->right());
- ptr_op_t scope(new op_t(op_t::SCOPE));
- scope->set_left(seq);
- chain->set_right(scope);
+ chain->set_right(seq);
}
seq->set_right(parse_assign_expr(in, tflags));
chain = seq;