diff options
author | John Wiegley <johnw@newartisans.com> | 2009-03-03 16:05:04 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-03-03 16:05:04 -0400 |
commit | e2c30cf6e4e8c0d38f129e3e209954bf1bfbe602 (patch) | |
tree | 118ab3ef92756dd208ece3c35d4b8ba4d6d47271 /src/parser.cc | |
parent | 098e3b0043c275cfe195be1c592baf5716ab73e5 (diff) | |
download | fork-ledger-e2c30cf6e4e8c0d38f129e3e209954bf1bfbe602.tar.gz fork-ledger-e2c30cf6e4e8c0d38f129e3e209954bf1bfbe602.tar.bz2 fork-ledger-e2c30cf6e4e8c0d38f129e3e209954bf1bfbe602.zip |
Added ; as a sequencing operator in valexprs
Diffstat (limited to 'src/parser.cc')
-rw-r--r-- | src/parser.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/parser.cc b/src/parser.cc index 15cd4fc6..4b0c1b54 100644 --- a/src/parser.cc +++ b/src/parser.cc @@ -441,14 +441,17 @@ expr_t::parser_t::parse_value_expr(std::istream& in, if (node && ! tflags.has_flags(PARSE_SINGLE)) { token_t& tok = next_token(in, tflags.plus_flags(PARSE_OP_CONTEXT)); - if (tok.kind == token_t::COMMA) { + if (tok.kind == token_t::COMMA || tok.kind == token_t::SEMI) { + bool comma_op = tok.kind == token_t::COMMA; + ptr_op_t prev(node); - node = new op_t(op_t::O_CONS); + node = new op_t(comma_op ? op_t::O_CONS : op_t::O_SEQ); node->set_left(prev); node->set_right(parse_value_expr(in, tflags)); if (! node->right()) throw_(parse_error, _("%1 operator not followed by argument") << tok.symbol); + tok = next_token(in, tflags.plus_flags(PARSE_OP_CONTEXT)); } |