Mercurial > hg > octave-nkf
comparison src/pt-arg-list.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 | 7c020c067a60 |
children | 2b2ca62f8ab6 |
comparison
equal
deleted
inserted
replaced
7766:fc81e027c53c | 7767:71f068b22fcc |
---|---|
251 | 251 |
252 return retval; | 252 return retval; |
253 } | 253 } |
254 | 254 |
255 tree_argument_list * | 255 tree_argument_list * |
256 tree_argument_list::dup (symbol_table::scope_id scope) | 256 tree_argument_list::dup (symbol_table::scope_id scope, |
257 symbol_table::context_id context) | |
257 { | 258 { |
258 tree_argument_list *new_list = new tree_argument_list (); | 259 tree_argument_list *new_list = new tree_argument_list (); |
259 | 260 |
260 new_list->list_includes_magic_end = list_includes_magic_end; | 261 new_list->list_includes_magic_end = list_includes_magic_end; |
261 new_list->simple_assign_lhs = simple_assign_lhs; | 262 new_list->simple_assign_lhs = simple_assign_lhs; |
262 | 263 |
263 for (iterator p = begin (); p != end (); p++) | 264 for (iterator p = begin (); p != end (); p++) |
264 { | 265 { |
265 tree_expression *elt = *p; | 266 tree_expression *elt = *p; |
266 | 267 |
267 new_list->append (elt ? elt->dup (scope) : 0); | 268 new_list->append (elt ? elt->dup (scope, context) : 0); |
268 } | 269 } |
269 | 270 |
270 return new_list; | 271 return new_list; |
271 } | 272 } |
272 | 273 |