Mercurial > hg > octave-nkf
diff src/pt-decl.cc @ 7767:71f068b22fcc
scope and context fixes for function handles
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 07 May 2008 13:45:30 -0400 |
parents | 745a8299c2b5 |
children | 3100283874d7 |
line wrap: on
line diff
--- a/src/pt-decl.cc +++ b/src/pt-decl.cc @@ -69,10 +69,11 @@ } tree_decl_elt * -tree_decl_elt::dup (symbol_table::scope_id scope) +tree_decl_elt::dup (symbol_table::scope_id scope, + symbol_table::context_id context) { - return new tree_decl_elt (id ? id->dup (scope) : 0, - expr ? expr->dup (scope) : 0); + return new tree_decl_elt (id ? id->dup (scope, context) : 0, + expr ? expr->dup (scope, context) : 0); } void @@ -98,7 +99,8 @@ } tree_decl_init_list * -tree_decl_init_list::dup (symbol_table::scope_id scope) +tree_decl_init_list::dup (symbol_table::scope_id scope, + symbol_table::context_id context) { tree_decl_init_list *new_dil = new tree_decl_init_list (); @@ -106,7 +108,7 @@ { tree_decl_elt *elt = *p; - new_dil->append (elt ? elt->dup (scope) : 0); + new_dil->append (elt ? elt->dup (scope, context) : 0); } return new_dil; @@ -177,10 +179,12 @@ } tree_command * -tree_global_command::dup (symbol_table::scope_id scope) +tree_global_command::dup (symbol_table::scope_id scope, + symbol_table::context_id context) { - return new tree_global_command (init_list ? init_list->dup (scope) : 0, - line (), column ()); + return + new tree_global_command (init_list ? init_list->dup (scope, context) : 0, + line (), column ()); } // Static. @@ -228,10 +232,12 @@ } tree_command * -tree_static_command::dup (symbol_table::scope_id scope) +tree_static_command::dup (symbol_table::scope_id scope, + symbol_table::context_id context) { - return new tree_static_command (init_list ? init_list->dup (scope) : 0, - line (), column ()); + return + new tree_static_command (init_list ? init_list->dup (scope, context) : 0, + line (), column ()); } /*