Mercurial > hg > octave-lyh
comparison libinterp/parse-tree/oct-parse.yy @ 16136:ed36d5543b27
don't declare octave_parser member functions static
* parse.h (class octave_parser): Don't declare new member functions as
static.
* oct-parse.yy (octave_parser::make_unwind_command,
octave_parser::make_try_command): Rename cleanup arg to cleanup_stmts.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 27 Feb 2013 11:14:44 -0500 |
parents | ec9c6222ef5a |
children | 284e2ca86ef7 |
comparison
equal
deleted
inserted
replaced
16135:98b211a163ce | 16136:ed36d5543b27 |
---|---|
2185 // Build an unwind-protect command. | 2185 // Build an unwind-protect command. |
2186 | 2186 |
2187 tree_command * | 2187 tree_command * |
2188 octave_parser::make_unwind_command (token *unwind_tok, | 2188 octave_parser::make_unwind_command (token *unwind_tok, |
2189 tree_statement_list *body, | 2189 tree_statement_list *body, |
2190 tree_statement_list *cleanup, | 2190 tree_statement_list *cleanup_stmts, |
2191 token *end_tok, | 2191 token *end_tok, |
2192 octave_comment_list *lc, | 2192 octave_comment_list *lc, |
2193 octave_comment_list *mc) | 2193 octave_comment_list *mc) |
2194 { | 2194 { |
2195 tree_command *retval = 0; | 2195 tree_command *retval = 0; |
2199 octave_comment_list *tc = octave_comment_buffer::get_comment (); | 2199 octave_comment_list *tc = octave_comment_buffer::get_comment (); |
2200 | 2200 |
2201 int l = unwind_tok->line (); | 2201 int l = unwind_tok->line (); |
2202 int c = unwind_tok->column (); | 2202 int c = unwind_tok->column (); |
2203 | 2203 |
2204 retval = new tree_unwind_protect_command (body, cleanup, | 2204 retval = new tree_unwind_protect_command (body, cleanup_stmts, |
2205 lc, mc, tc, l, c); | 2205 lc, mc, tc, l, c); |
2206 } | 2206 } |
2207 | 2207 |
2208 return retval; | 2208 return retval; |
2209 } | 2209 } |
2210 | 2210 |
2211 // Build a try-catch command. | 2211 // Build a try-catch command. |
2212 | 2212 |
2213 tree_command * | 2213 tree_command * |
2214 octave_parser::make_try_command (token *try_tok, tree_statement_list *body, | 2214 octave_parser::make_try_command (token *try_tok, tree_statement_list *body, |
2215 tree_statement_list *cleanup, token *end_tok, | 2215 tree_statement_list *cleanup_stmts, |
2216 token *end_tok, | |
2216 octave_comment_list *lc, | 2217 octave_comment_list *lc, |
2217 octave_comment_list *mc) | 2218 octave_comment_list *mc) |
2218 { | 2219 { |
2219 tree_command *retval = 0; | 2220 tree_command *retval = 0; |
2220 | 2221 |
2223 octave_comment_list *tc = octave_comment_buffer::get_comment (); | 2224 octave_comment_list *tc = octave_comment_buffer::get_comment (); |
2224 | 2225 |
2225 int l = try_tok->line (); | 2226 int l = try_tok->line (); |
2226 int c = try_tok->column (); | 2227 int c = try_tok->column (); |
2227 | 2228 |
2228 retval = new tree_try_catch_command (body, cleanup, | 2229 retval = new tree_try_catch_command (body, cleanup_stmts, |
2229 lc, mc, tc, l, c); | 2230 lc, mc, tc, l, c); |
2230 } | 2231 } |
2231 | 2232 |
2232 return retval; | 2233 return retval; |
2233 } | 2234 } |