summaryrefslogtreecommitdiff
path: root/src/parser.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-02 01:55:55 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-02 01:55:55 -0400
commitcda19829bd1100d6563b48ddb121f2afc1c55d95 (patch)
tree5b6ab0d1eb7ec1b0b3eccf817678d0aa9a3feb47 /src/parser.cc
parent017492ef5e80003073c5d053252d4a68a44260ae (diff)
parentfb7cafa8965c89bbd66b09f827bd5989a87c983b (diff)
downloadfork-ledger-cda19829bd1100d6563b48ddb121f2afc1c55d95.tar.gz
fork-ledger-cda19829bd1100d6563b48ddb121f2afc1c55d95.tar.bz2
fork-ledger-cda19829bd1100d6563b48ddb121f2afc1c55d95.zip
Merge branch 'next'
Diffstat (limited to 'src/parser.cc')
-rw-r--r--src/parser.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/parser.cc b/src/parser.cc
index e8e987cb..f52949ce 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -79,9 +79,7 @@ expr_t::parser_t::parse_value_term(std::istream& in,
case token_t::LPAREN:
node = parse_value_expr(in, tflags.plus_flags(PARSE_PARTIAL)
.minus_flags(PARSE_SINGLE));
- tok = next_token(in, tflags);
- if (tok.kind != token_t::RPAREN)
- tok.expected(')');
+ tok = next_token(in, tflags, ')');
if (node->kind == op_t::O_CONS) {
ptr_op_t prev(node);
@@ -383,10 +381,7 @@ expr_t::parser_t::parse_querycolon_expr(std::istream& in,
throw_(parse_error,
_("%1 operator not followed by argument") << tok.symbol);
- token_t& next_tok = next_token(in, tflags.plus_flags(PARSE_OP_CONTEXT));
- if (next_tok.kind != token_t::COLON)
- next_tok.expected(':');
-
+ next_token(in, tflags.plus_flags(PARSE_OP_CONTEXT), ':');
prev = node->right();
ptr_op_t subnode = new op_t(op_t::O_COLON);
subnode->set_left(prev);