diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-09 17:41:55 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-09 17:41:55 -0400 |
commit | 47567307ce2da0d9ac2d5267bd6328a2a30ee7c5 (patch) | |
tree | c01745008d39af7ad179e6f65958e9af094b4261 /src/parser.cc | |
parent | 6ca01af594148e12cd8e1da87302644a0bbae3a0 (diff) | |
download | fork-ledger-47567307ce2da0d9ac2d5267bd6328a2a30ee7c5.tar.gz fork-ledger-47567307ce2da0d9ac2d5267bd6328a2a30ee7c5.tar.bz2 fork-ledger-47567307ce2da0d9ac2d5267bd6328a2a30ee7c5.zip |
Removed reference to session_t from the iterators module.
Diffstat (limited to 'src/parser.cc')
-rw-r--r-- | src/parser.cc | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/parser.cc b/src/parser.cc index a5fe9097..3ee57c4c 100644 --- a/src/parser.cc +++ b/src/parser.cc @@ -90,18 +90,20 @@ expr_t::parser_t::parse_dot_expr(std::istream& in, ptr_op_t node(parse_value_term(in, tflags)); if (node && ! tflags.has_flags(PARSE_SINGLE)) { - token_t& tok = next_token(in, tflags); - - if (tok.kind == token_t::DOT) { - ptr_op_t prev(node); - node = new op_t(op_t::O_LOOKUP); - node->set_left(prev); - node->set_right(parse_dot_expr(in, tflags)); - if (! node->right()) - throw_(parse_error, - tok.symbol << " operator not followed by argument"); - } else { - push_token(tok); + while (true) { + token_t& tok = next_token(in, tflags); + if (tok.kind == token_t::DOT) { + ptr_op_t prev(node); + node = new op_t(op_t::O_LOOKUP); + node->set_left(prev); + node->set_right(parse_value_term(in, tflags)); + if (! node->right()) + throw_(parse_error, + tok.symbol << " operator not followed by argument"); + } else { + push_token(tok); + break; + } } } |