Mercurial > hg > octave-max
comparison src/ov-usr-fcn.cc @ 11304:c9fefa096ce2
echo commands in scripts
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 01 Dec 2010 15:26:01 -0500 |
parents | d782d7b524a6 |
children | 0d9640d755b1 |
comparison
equal
deleted
inserted
replaced
11303:5d1877a86180 | 11304:c9fefa096ce2 |
---|---|
127 { | 127 { |
128 octave_call_stack::push (this); | 128 octave_call_stack::push (this); |
129 | 129 |
130 frame.add_fcn (octave_call_stack::pop); | 130 frame.add_fcn (octave_call_stack::pop); |
131 | 131 |
132 frame.protect_var (tree_evaluator::in_fcn_or_script_body); | 132 frame.protect_var (tree_evaluator::statement_context); |
133 tree_evaluator::in_fcn_or_script_body = true; | 133 tree_evaluator::statement_context = tree_evaluator::script; |
134 | 134 |
135 cmd_list->accept (*current_evaluator); | 135 cmd_list->accept (*current_evaluator); |
136 | 136 |
137 if (tree_return_command::returning) | 137 if (tree_return_command::returning) |
138 tree_return_command::returning = 0; | 138 tree_return_command::returning = 0; |
424 frame.protect_var (curr_unwind_protect_frame); | 424 frame.protect_var (curr_unwind_protect_frame); |
425 curr_unwind_protect_frame = &frame; | 425 curr_unwind_protect_frame = &frame; |
426 | 426 |
427 // Evaluate the commands that make up the function. | 427 // Evaluate the commands that make up the function. |
428 | 428 |
429 frame.protect_var (tree_evaluator::in_fcn_or_script_body); | 429 frame.protect_var (tree_evaluator::statement_context); |
430 tree_evaluator::in_fcn_or_script_body = true; | 430 tree_evaluator::statement_context = tree_evaluator::function; |
431 | 431 |
432 bool special_expr = (is_inline_function () | 432 bool special_expr = (is_inline_function () |
433 || cmd_list->is_anon_function_body ()); | 433 || cmd_list->is_anon_function_body ()); |
434 | 434 |
435 if (special_expr) | 435 if (special_expr) |