comparison src/pt-decl.cc @ 14294:9e3983c8963c

deprecate the static keyword * octave.gperf: Use PERSISTENT as the token for "static" and "persistent" but use separate static_kw and persistent_kw values so we can distinguish them. * lex.ll (is_keyword_token): Handle static_kw and persistent_kw separately. Generate deprecated keyword warning for static_kw. * oct-parse.cc: Use PERSISTENT token instead of STATIC. * pt-decl.h, pt-decl.cc (tree_persistent_command): Rename from tree_static_command. Change all uses. * pt-walk.h (tree_walker::visit_persistent_command): Rename from visit_static_command. Change all derived classes. * NEWS: note that static has been deprecated.
author John W. Eaton <jwe@octave.org>
date Mon, 30 Jan 2012 23:42:41 -0500
parents 72c96de7a403
children
comparison
equal deleted inserted replaced
14293:71a198cca35b 14294:9e3983c8963c
130 } 130 }
131 131
132 // Static. 132 // Static.
133 133
134 tree_command * 134 tree_command *
135 tree_static_command::dup (symbol_table::scope_id scope, 135 tree_persistent_command::dup (symbol_table::scope_id scope,
136 symbol_table::context_id context) const 136 symbol_table::context_id context) const
137 { 137 {
138 return 138 return
139 new tree_static_command (init_list ? init_list->dup (scope, context) : 0, 139 new tree_persistent_command (init_list ? init_list->dup (scope, context) : 0,
140 line (), column ()); 140 line (), column ());
141 } 141 }
142 142
143 void 143 void
144 tree_static_command::accept (tree_walker& tw) 144 tree_persistent_command::accept (tree_walker& tw)
145 { 145 {
146 tw.visit_static_command (*this); 146 tw.visit_persistent_command (*this);
147 } 147 }