Mercurial > hg > octave-lyh
changeset 7351:8470a6b0b769
[project @ 2008-01-07 17:57:24 by jwe]
author | jwe |
---|---|
date | Mon, 07 Jan 2008 17:57:24 +0000 |
parents | 288614c6634d |
children | fab9bc33b949 |
files | src/ChangeLog src/parse.y |
diffstat | 2 files changed, 7 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-01-07 John W. Eaton <jwe@octave.org> + + * parse.y (make_anon_fcn_handle): Don't attempt to convert + expression to assignment to __retval__. + 2008-01-07 Michael Goffioul <michael.goffioul@gmail.com> * ov-builtin.h (octave_builtin): Tag with OCTINTERP_API.
--- a/src/parse.y +++ b/src/parse.y @@ -1,7 +1,7 @@ /* Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007 John W. Eaton + 2002, 2003, 2004, 2005, 2006, 2007, 2008 John W. Eaton This file is part of Octave. @@ -1760,29 +1760,7 @@ symtab_context.pop (); - if (stmt && stmt->is_expression ()) - { - symbol_table::symbol_record& sr = symbol_table::insert ("__retval__"); - - tree_expression *e = stmt->expression (); - - tree_identifier *id = new tree_identifier (sr); - - tree_simple_assignment *asn = new tree_simple_assignment (id, e); - - stmt->set_expression (asn); - - stmt->set_print_flag (false); - - // FIXME -- would like to delete old_stmt here or - // replace expression inside it with the new expression we just - // created so we don't have to create a new statement at all. - - id = new tree_identifier (sr); - tree_decl_elt *elt = new tree_decl_elt (id); - - ret_list = new tree_parameter_list (elt); - } + stmt->set_print_flag (false); tree_statement_list *body = new tree_statement_list (stmt);