summaryrefslogtreecommitdiff
path: root/parser.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-08-01 03:44:22 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-08-01 03:44:22 -0400
commitea3b386062e62379c546239f2e95cb1e11c56d23 (patch)
treef200790541093b401b3a40af000a90daff7b6cb5 /parser.cc
parent8ed99e621daccdebfe4fd81d9b3744ed1cdb375f (diff)
downloadledger-ea3b386062e62379c546239f2e95cb1e11c56d23.tar.gz
ledger-ea3b386062e62379c546239f2e95cb1e11c56d23.tar.bz2
ledger-ea3b386062e62379c546239f2e95cb1e11c56d23.zip
Added a new 'format' debugging command, which dissects the formatting
expression in its argument.
Diffstat (limited to 'parser.cc')
-rw-r--r--parser.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/parser.cc b/parser.cc
index 6eae2f1c..175581a2 100644
--- a/parser.cc
+++ b/parser.cc
@@ -151,10 +151,9 @@ expr_t::parser_t::parse_value_term(std::istream& in,
}
case token_t::LPAREN:
- node = new op_t(op_t::O_COMMA);
- node->set_left(parse_value_expr(in, tflags | EXPR_PARSE_PARTIAL));
- if (! node->left())
- throw_(parse_error, tok.symbol << " operator not followed by argument");
+ node = parse_value_expr(in, tflags | EXPR_PARSE_PARTIAL);
+ if (! node)
+ throw_(parse_error, tok.symbol << " operator not followed by expression");
tok = next_token(in, tflags);
if (tok.kind != token_t::RPAREN)