Mercurial > octave-nkf
diff src/ov-fcn-handle.cc @ 11223:64e7538db12a
fix printing of newlines for anonymous function handle bodies
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 10 Nov 2010 04:07:14 -0500 |
parents | 883b9308353c |
children | 2b8531a6a3c9 |
line wrap: on
line diff
--- a/src/ov-fcn-handle.cc Wed Nov 10 01:35:50 2010 -0500 +++ b/src/ov-fcn-handle.cc Wed Nov 10 04:07:14 2010 -0500 @@ -1321,33 +1321,7 @@ os << ") "; - tree_statement_list *b = f->body (); - - if (b) - { - assert (b->length () == 1); - - tree_statement *s = b->front (); - - if (s) - { - if (s->is_expression ()) - { - tree_expression *e = s->expression (); - - if (e) - e->accept (tpc); - } - else - { - tree_command *c = s->command (); - - tpc.suspend_newline (); - c->accept (tpc); - tpc.resume_newline (); - } - } - } + tpc.print_fcn_handle_body (f->body ()); printed = true; }