summaryrefslogtreecommitdiff
path: root/src/parser.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2011-11-10 00:48:19 -0600
committerJohn Wiegley <johnw@newartisans.com>2011-11-10 00:48:19 -0600
commit37e9ec8030a2634cbe9b2727f4d5530a582292c7 (patch)
tree7fb3a1ece2c97c6b034a56b7e47b5754c0150e9b /src/parser.cc
parentd493f79651d124481aa49bd0eeea1fdea11e477b (diff)
downloadfork-ledger-37e9ec8030a2634cbe9b2727f4d5530a582292c7.tar.gz
fork-ledger-37e9ec8030a2634cbe9b2727f4d5530a582292c7.tar.bz2
fork-ledger-37e9ec8030a2634cbe9b2727f4d5530a582292c7.zip
Report an error in the case of '(1' (missing rparen)
Fixes #557
Diffstat (limited to 'src/parser.cc')
-rw-r--r--src/parser.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser.cc b/src/parser.cc
index f0085295..a18fa552 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -74,7 +74,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, ')');
+ tok = next_token(in, tflags, token_t::RPAREN);
break;
default:
@@ -367,7 +367,7 @@ expr_t::parser_t::parse_querycolon_expr(std::istream& in,
throw_(parse_error,
_("%1 operator not followed by argument") << tok.symbol);
- next_token(in, tflags.plus_flags(PARSE_OP_CONTEXT), ':');
+ next_token(in, tflags.plus_flags(PARSE_OP_CONTEXT), token_t::COLON);
prev = node->right();
ptr_op_t subnode = new op_t(op_t::O_COLON);
subnode->set_left(prev);