Mercurial > octave
annotate libinterp/parse-tree/pt-anon-scopes.cc @ 25824:91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
* libinterp/parse-tree/pt-anon-scopes.[h,cc]: New files with new class
tree_anon_scopes derived from class tree_walker. Collects variables in
all scopes of nested anonymous function definitions.
* libinterp/octave-value/ov-fcn-handle.cc
(octave_fcn_handle::save_ascii, ::save_binary, ::save_hdf5): Use
tree_anon_scopes object to save variables of anonymous functions.
* test/bug-45969/bug-45969.tst, test/bug-45969/module.mk:
New testfiles.
author | Olaf Till <i7tiol@t-online.de> |
---|---|
date | Sat, 18 Aug 2018 23:05:41 +0200 |
parents | |
children | f2d795f07c84 |
rev | line source |
---|---|
25824
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
1 /* |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
2 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
3 Copyright (C) 1996-2018 John W. Eaton |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
4 Copyright (C) 2015-2018 Olaf Till |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
5 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
6 This file is part of Octave. |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
7 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
8 Octave is free software; you can redistribute it and/or modify it |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
9 under the terms of the GNU General Public License as published by the |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
10 Free Software Foundation; either version 3 of the License, or (at your |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
11 option) any later version. |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
12 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
16 for more details. |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
17 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
18 You should have received a copy of the GNU General Public License |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
19 along with Octave; see the file COPYING. If not, see |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
20 <http://www.gnu.org/licenses/>. |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
21 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
22 */ |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
23 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
24 #ifdef HAVE_CONFIG_H |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
25 #include <config.h> |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
26 #endif |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
27 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
28 #include "error.h" |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
29 #include "pt-all.h" |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
30 #include "pt-anon-scopes.h" |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
31 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
32 // TODO: make sure that if(f->scope()) is checked if necessary |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
33 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
34 namespace octave |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
35 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
36 tree_anon_scopes::tree_anon_scopes (octave_user_function *f) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
37 : scopes (), merged_tables () |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
38 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
39 if (f) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
40 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
41 if (! f->is_anonymous_function ()) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
42 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
43 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
44 // Collect the scope of the outer anonymous function. |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
45 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
46 stash_scope_if_valid (f->scope ()); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
47 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
48 // Further walk the tree to find nested definitions of further |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
49 // anonymous functions. |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
50 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
51 tree_statement_list *cmd_list = f->body (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
52 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
53 if (cmd_list) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
54 cmd_list->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
55 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
56 // Collect symbol records of all collected scopes. |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
57 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
58 merge_tables (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
59 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
60 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
61 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
62 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
63 tree_anon_scopes::visit_anon_fcn_handle (tree_anon_fcn_handle& afh) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
64 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
65 // Collect the scope of this anonymous function. |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
66 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
67 stash_scope_if_valid (afh.scope ()); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
68 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
69 // Further walk the tree to find nested definitions of further |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
70 // anonymous functions. |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
71 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
72 tree_expression *e = afh.expression (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
73 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
74 if (e) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
75 e->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
76 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
77 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
78 // The rest of visit_... methods is only for walking the tree. Many of |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
79 // them, in particular all methods for commands, are not applicable to |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
80 // anonymous functions. Only parts of the tree are walked which could |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
81 // contain further (nested) anonymous function definitions (so |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
82 // e.g. identifiers and left hand sides of assignments are ignored). |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
83 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
84 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
85 tree_anon_scopes::visit_argument_list (tree_argument_list& lst) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
86 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
87 tree_argument_list::iterator p = lst.begin (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
88 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
89 while (p != lst.end ()) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
90 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
91 tree_expression *elt = *p++; |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
92 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
93 if (elt) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
94 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
95 elt->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
96 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
97 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
98 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
99 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
100 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
101 tree_anon_scopes::visit_binary_expression (tree_binary_expression& expr) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
102 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
103 tree_expression *op1 = expr.lhs (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
104 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
105 if (op1) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
106 op1->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
107 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
108 tree_expression *op2 = expr.rhs (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
109 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
110 if (op2) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
111 op2->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
112 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
113 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
114 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
115 tree_anon_scopes::visit_break_command (tree_break_command&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
116 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
117 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
118 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
119 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
120 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
121 tree_anon_scopes::visit_colon_expression (tree_colon_expression& expr) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
122 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
123 tree_expression *op1 = expr.base (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
124 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
125 if (op1) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
126 op1->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
127 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
128 tree_expression *op3 = expr.increment (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
129 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
130 if (op3) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
131 op3->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
132 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
133 tree_expression *op2 = expr.limit (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
134 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
135 if (op2) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
136 op2->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
137 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
138 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
139 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
140 tree_anon_scopes::visit_continue_command (tree_continue_command&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
141 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
142 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
143 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
144 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
145 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
146 tree_anon_scopes::visit_decl_command (tree_decl_command&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
147 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
148 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
149 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
150 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
151 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
152 tree_anon_scopes::visit_decl_elt (tree_decl_elt&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
153 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
154 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
155 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
156 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
157 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
158 tree_anon_scopes::visit_decl_init_list (tree_decl_init_list&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
159 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
160 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
161 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
162 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
163 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
164 tree_anon_scopes::visit_simple_for_command (tree_simple_for_command&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
165 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
166 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
167 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
168 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
169 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
170 tree_anon_scopes::visit_complex_for_command (tree_complex_for_command&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
171 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
172 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
173 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
174 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
175 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
176 tree_anon_scopes::visit_octave_user_script (octave_user_script&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
177 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
178 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
179 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
180 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
181 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
182 tree_anon_scopes::visit_octave_user_function (octave_user_function&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
183 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
184 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
185 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
186 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
187 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
188 tree_anon_scopes::visit_function_def (tree_function_def&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
189 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
190 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
191 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
192 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
193 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
194 tree_anon_scopes::visit_identifier (tree_identifier& /* id */) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
195 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
196 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
197 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
198 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
199 tree_anon_scopes::visit_if_clause (tree_if_clause&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
200 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
201 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
202 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
203 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
204 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
205 tree_anon_scopes::visit_if_command (tree_if_command&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
206 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
207 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
208 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
209 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
210 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
211 tree_anon_scopes::visit_if_command_list (tree_if_command_list&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
212 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
213 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
214 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
215 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
216 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
217 tree_anon_scopes::visit_switch_case (tree_switch_case&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
218 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
219 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
220 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
221 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
222 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
223 tree_anon_scopes::visit_switch_case_list (tree_switch_case_list&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
224 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
225 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
226 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
227 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
228 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
229 tree_anon_scopes::visit_switch_command (tree_switch_command&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
230 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
231 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
232 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
233 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
234 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
235 tree_anon_scopes::visit_index_expression (tree_index_expression& expr) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
236 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
237 tree_expression *e = expr.expression (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
238 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
239 if (e) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
240 e->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
241 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
242 std::list<tree_argument_list *> lst = expr.arg_lists (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
243 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
244 std::list<tree_argument_list *>::iterator p = lst.begin (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
245 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
246 while (p != lst.end ()) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
247 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
248 tree_argument_list *elt = *p++; |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
249 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
250 if (elt) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
251 elt->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
252 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
253 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
254 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
255 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
256 tree_anon_scopes::visit_matrix (tree_matrix& lst) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
257 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
258 tree_matrix::iterator p = lst.begin (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
259 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
260 while (p != lst.end ()) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
261 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
262 tree_argument_list *elt = *p++; |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
263 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
264 if (elt) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
265 elt->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
266 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
267 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
268 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
269 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
270 tree_anon_scopes::visit_cell (tree_cell& lst) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
271 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
272 tree_matrix::iterator p = lst.begin (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
273 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
274 while (p != lst.end ()) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
275 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
276 tree_argument_list *elt = *p++; |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
277 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
278 if (elt) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
279 elt->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
280 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
281 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
282 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
283 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
284 tree_anon_scopes::visit_multi_assignment (tree_multi_assignment& expr) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
285 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
286 tree_expression *rhs = expr.right_hand_side (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
287 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
288 if (rhs) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
289 rhs->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
290 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
291 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
292 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
293 tree_anon_scopes::visit_no_op_command (tree_no_op_command&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
294 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
295 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
296 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
297 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
298 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
299 tree_anon_scopes::visit_constant (tree_constant& /* val */) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
300 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
301 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
302 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
303 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
304 tree_anon_scopes::visit_fcn_handle (tree_fcn_handle& /* fh */) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
305 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
306 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
307 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
308 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
309 tree_anon_scopes::visit_funcall (tree_funcall& /* fc */) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
310 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
311 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
312 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
313 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
314 tree_anon_scopes::visit_parameter_list (tree_parameter_list&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
315 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
316 // In visit_anon_fcn_handle we only accept/visit the body of |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
317 // anonymous function definitions, not the parameter list. |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
318 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
319 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
320 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
321 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
322 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
323 tree_anon_scopes::visit_postfix_expression (tree_postfix_expression& expr) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
324 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
325 tree_expression *e = expr.operand (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
326 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
327 if (e) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
328 e->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
329 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
330 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
331 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
332 tree_anon_scopes::visit_prefix_expression (tree_prefix_expression& expr) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
333 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
334 tree_expression *e = expr.operand (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
335 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
336 if (e) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
337 e->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
338 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
339 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
340 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
341 tree_anon_scopes::visit_return_command (tree_return_command&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
342 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
343 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
344 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
345 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
346 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
347 tree_anon_scopes::visit_return_list (tree_return_list& lst) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
348 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
349 tree_return_list::iterator p = lst.begin (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
350 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
351 while (p != lst.end ()) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
352 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
353 tree_index_expression *elt = *p++; |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
354 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
355 if (elt) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
356 elt->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
357 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
358 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
359 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
360 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
361 tree_anon_scopes::visit_simple_assignment (tree_simple_assignment& expr) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
362 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
363 tree_expression *rhs = expr.right_hand_side (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
364 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
365 if (rhs) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
366 rhs->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
367 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
368 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
369 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
370 tree_anon_scopes::visit_statement (tree_statement& stmt) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
371 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
372 tree_command *cmd = stmt.command (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
373 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
374 if (cmd) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
375 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
376 else |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
377 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
378 tree_expression *expr = stmt.expression (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
379 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
380 if (expr) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
381 expr->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
382 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
383 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
384 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
385 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
386 tree_anon_scopes::visit_statement_list (tree_statement_list& lst) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
387 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
388 for (auto& p : lst) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
389 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
390 tree_statement *elt = p; |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
391 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
392 if (elt) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
393 elt->accept (*this); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
394 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
395 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
396 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
397 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
398 tree_anon_scopes::visit_try_catch_command (tree_try_catch_command&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
399 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
400 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
401 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
402 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
403 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
404 tree_anon_scopes::visit_unwind_protect_command (tree_unwind_protect_command&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
405 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
406 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
407 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
408 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
409 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
410 tree_anon_scopes::visit_while_command (tree_while_command&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
411 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
412 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
413 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
414 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
415 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
416 tree_anon_scopes::visit_do_until_command (tree_do_until_command&) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
417 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
418 panic_impossible (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
419 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
420 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
421 void |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
422 tree_anon_scopes::merge_tables (void) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
423 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
424 for (const auto& sc : scopes) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
425 { |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
426 symrec_list vars = sc.all_variables (); |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
427 |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
428 for (const auto& symrec : vars) |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
429 merged_tables[symrec.name ()] = symrec; |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
430 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
431 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
432 } |
91e1ca0e3a9d
Save all scopes of nested anonymous functions (bug #45969).
Olaf Till <i7tiol@t-online.de>
parents:
diff
changeset
|
433 |