From 47567307ce2da0d9ac2d5267bd6328a2a30ee7c5 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 9 Feb 2009 17:41:55 -0400 Subject: Removed reference to session_t from the iterators module. --- src/parser.cc | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'src/parser.cc') 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; + } } } -- cgit v1.2.3