summaryrefslogtreecommitdiff
path: root/src/format.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-10 12:22:19 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-10 12:22:19 -0500
commit5ffa987daf4d97c52066e4c28733d826d3726297 (patch)
treeab058dec32702ccce9d1f7cacacb5b5c157d6798 /src/format.cc
parent9e07e61fadf7f3c9d1fd32a3805f6e97163eba15 (diff)
parent3f638d355c977fd5513ab1db380c5813599f3664 (diff)
downloadfork-ledger-5ffa987daf4d97c52066e4c28733d826d3726297.tar.gz
fork-ledger-5ffa987daf4d97c52066e4c28733d826d3726297.tar.bz2
fork-ledger-5ffa987daf4d97c52066e4c28733d826d3726297.zip
Merge branch 'next'
Diffstat (limited to 'src/format.cc')
-rw-r--r--src/format.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/format.cc b/src/format.cc
index d949c350..b93a42a4 100644
--- a/src/format.cc
+++ b/src/format.cc
@@ -263,12 +263,15 @@ format_t::element_t * format_t::parse_elements(const string& fmt,
args3_node->set_left(call1_node);
args3_node->set_right(args2_node);
+ expr_t::ptr_op_t seq1_node(new expr_t::op_t(expr_t::op_t::O_SEQ));
+ seq1_node->set_left(args3_node);
+
expr_t::ptr_op_t justify_node(new expr_t::op_t(expr_t::op_t::IDENT));
justify_node->set_ident("justify");
expr_t::ptr_op_t call2_node(new expr_t::op_t(expr_t::op_t::O_CALL));
call2_node->set_left(justify_node);
- call2_node->set_right(args3_node);
+ call2_node->set_right(seq1_node);
string prev_expr = boost::get<expr_t>(current->data).text();
@@ -280,9 +283,12 @@ format_t::element_t * format_t::parse_elements(const string& fmt,
args4_node->set_left(call2_node);
args4_node->set_right(colorize_op);
+ expr_t::ptr_op_t seq2_node(new expr_t::op_t(expr_t::op_t::O_SEQ));
+ seq2_node->set_left(args4_node);
+
expr_t::ptr_op_t call3_node(new expr_t::op_t(expr_t::op_t::O_CALL));
call3_node->set_left(ansify_if_node);
- call3_node->set_right(args4_node);
+ call3_node->set_right(seq2_node);
current->data = expr_t(call3_node);
} else {