26 #if defined (HAVE_CONFIG_H)
52 param_list->
accept (*
this);
62 auto p = lst.
begin ();
64 while (p != lst.
end ())
159 init_list->
accept (*
this);
165 auto p = lst.
begin ();
167 while (p != lst.
end ())
350 std::string fcn_name = fcn.
name ();
352 m_os << (fcn_name.empty () ?
"(empty)" : fcn_name) <<
' ';
357 param_list->
accept (*
this);
390 std::string nm =
id.name ();
391 m_os << (nm.empty () ?
"(empty)" : nm);
442 auto p = lst.
begin ();
444 bool first_elt =
true;
446 while (p != lst.
end ())
483 std::list<tree_argument_list *> arg_lists = expr.
arg_lists ();
484 std::string type_tags = expr.
type_tags ();
485 std::list<string_vector> arg_names = expr.
arg_names ();
486 std::list<tree_expression *> dyn_fields = expr.
dyn_fields ();
488 int n = type_tags.length ();
490 auto p_arg_lists = arg_lists.begin ();
491 auto p_arg_names = arg_names.begin ();
492 auto p_dyn_fields = dyn_fields.begin ();
494 for (
int i = 0; i <
n; i++)
496 switch (type_tags[i])
501 if ((nc ==
'[' || nc ==
'{') && expr.
paren_count () == 0)
519 if ((nc ==
'[' || nc ==
'{') && expr.
paren_count () == 0)
538 std::string fn = (*p_arg_names)(0);
579 auto p = lst.
begin ();
581 while (p != lst.
end ())
610 auto p = lst.
begin ();
612 while (p != lst.
end ())
727 auto p = lst.
begin ();
729 while (p != lst.
end ())
980 catch_code->
accept (*
this);
989 m_os <<
"end_try_catch";
999 m_os <<
"unwind_protect";
1005 if (unwind_protect_code)
1009 unwind_protect_code->
accept (*
this);
1018 m_os <<
"unwind_protect_cleanup";
1028 cleanup_code->
accept (*
this);
1037 m_os <<
"end_unwind_protect";
1184 for (
int i = 0; i <
n; i++)
1191 bool printed_something =
false;
1193 bool prev_char_was_newline =
false;
1195 std::string comment = elt.
text ();
1197 size_t len = comment.length ();
1201 while (i <
len && comment[i++] ==
'\n')
1207 char c = comment[i++];
1211 if (prev_char_was_newline)
1213 printed_something =
true;
1222 prev_char_was_newline =
true;
1228 printed_something =
true;
1234 if (! (isspace (c) || c ==
'!'))
1238 m_os << static_cast<char> (c);
1240 prev_char_was_newline =
false;
size_t length(void) const
tree_expression * expression(void) const
tree_parameter_list * parameter_list(void) const
void accept(tree_walker &tw)
tree_expression * lhs(void)
tree_expression * rhs(void)
std::string oper(void) const
tree_expression * increment(void)
tree_expression * limit(void)
tree_expression * base(void)
tree_expression * control_expr(void)
tree_statement_list * body(void)
comment_list * trailing_comment(void)
comment_list * leading_comment(void)
tree_argument_list * left_hand_side(void)
void print_raw(std::ostream &os, bool pr_as_read_syntax=false, bool pr_orig_txt=true)
tree_decl_init_list * initializer_list(void)
std::string name(void) const
tree_expression * expression(void)
void accept(tree_walker &tw)
tree_identifier * ident(void)
void accept(tree_walker &tw)
int paren_count(void) const
void print_raw(std::ostream &os, bool pr_as_read_syntax=false, bool pr_orig_txt=true)
octave_value function(void)
void accept(tree_walker &tw)
comment_list * leading_comment(void)
tree_expression * condition(void)
bool is_else_clause(void)
void accept(tree_walker &tw)
tree_statement_list * commands(void)
void accept(tree_walker &tw)
comment_list * leading_comment(void)
comment_list * trailing_comment(void)
tree_if_command_list * cmd_list(void)
std::list< string_vector > arg_names(void)
std::string type_tags(void)
std::list< tree_argument_list * > arg_lists(void)
std::list< tree_expression * > dyn_fields(void)
tree_expression * expression(void)
std::string oper(void) const
tree_argument_list * left_hand_side(void)
tree_expression * right_hand_side(void)
bool is_end_of_fcn_or_script(void) const
std::string original_command(void)
void accept(tree_walker &tw)
std::string varargs_symbol_name(void) const
bool is_input_list(void) const
bool takes_varargs(void) const
void print_indented_comment(comment_list *comment_list)
void visit_binary_expression(tree_binary_expression &)
void visit_decl_elt(tree_decl_elt &)
void visit_superclass_ref(tree_superclass_ref &)
void print_comment_elt(const comment_elt &comment_elt)
void visit_break_command(tree_break_command &)
void visit_colon_expression(tree_colon_expression &)
void visit_argument_list(tree_argument_list &)
void visit_if_clause(tree_if_clause &)
void increment_indent_level(void)
void visit_postfix_expression(tree_postfix_expression &)
void visit_anon_fcn_handle(tree_anon_fcn_handle &)
bool m_print_original_text
void visit_constant(tree_constant &)
void visit_parameter_list(tree_parameter_list &)
void visit_function_def(tree_function_def &)
void visit_fcn_handle(tree_fcn_handle &)
void visit_matrix(tree_matrix &)
void visit_octave_user_script(octave_user_script &)
void visit_decl_command(tree_decl_command &)
void visit_simple_assignment(tree_simple_assignment &)
void visit_complex_for_command(tree_complex_for_command &)
void visit_decl_init_list(tree_decl_init_list &)
int m_curr_print_indent_level
void visit_statement(tree_statement &)
void newline(const char *alt_txt=", ")
void visit_simple_for_command(tree_simple_for_command &)
void visit_try_catch_command(tree_try_catch_command &)
void visit_metaclass_query(tree_metaclass_query &)
void visit_cell(tree_cell &)
void visit_identifier(tree_identifier &)
void visit_if_command(tree_if_command &)
void visit_switch_case(tree_switch_case &)
void visit_octave_user_function_trailer(octave_user_function &)
void visit_prefix_expression(tree_prefix_expression &)
void visit_statement_list(tree_statement_list &)
void visit_switch_command(tree_switch_command &)
void print_comment_list(comment_list *comment_list)
void visit_return_command(tree_return_command &)
void decrement_indent_level(void)
void visit_multi_assignment(tree_multi_assignment &)
void visit_octave_user_function_header(octave_user_function &)
void visit_unwind_protect_command(tree_unwind_protect_command &)
void visit_while_command(tree_while_command &)
void visit_continue_command(tree_continue_command &)
void print_parens(const tree_expression &expr, const char *txt)
void visit_no_op_command(tree_no_op_command &)
std::stack< char > m_nesting
void visit_octave_user_function(octave_user_function &)
void visit_if_command_list(tree_if_command_list &)
void visit_do_until_command(tree_do_until_command &)
void visit_index_expression(tree_index_expression &)
void print_fcn_handle_body(tree_expression *)
tree_expression * right_hand_side(void)
std::string oper(void) const
tree_expression * left_hand_side(void)
comment_list * trailing_comment(void)
tree_expression * control_expr(void)
comment_list * leading_comment(void)
tree_expression * left_hand_side(void)
tree_statement_list * body(void)
tree_expression * maxproc_expr(void)
void accept(tree_walker &tw)
tree_expression * expression(void)
comment_list * comment_text(void)
tree_command * command(void)
std::string method_name(void) const
std::string class_name(void) const
void accept(tree_walker &tw)
tree_statement_list * commands(void)
tree_expression * case_label(void)
bool is_default_case(void)
comment_list * leading_comment(void)
tree_switch_case_list * case_list(void)
comment_list * leading_comment(void)
tree_expression * switch_value(void)
comment_list * middle_comment(void)
tree_statement_list * cleanup(void)
comment_list * trailing_comment(void)
comment_list * leading_comment(void)
tree_identifier * identifier(void)
tree_statement_list * body(void)
std::string oper(void) const
tree_expression * operand(void)
tree_statement_list * cleanup(void)
tree_statement_list * body(void)
comment_list * middle_comment(void)
comment_list * leading_comment(void)
comment_list * trailing_comment(void)
comment_list * leading_comment(void)
comment_list * trailing_comment(void)
tree_statement_list * body(void)
tree_expression * condition(void)
virtual void accept(tree_walker &tw)=0
std::string name(void) const
octave::tree_statement_list * body(void)
octave::tree_parameter_list * return_list(void)
octave::tree_parameter_list * parameter_list(void)
octave::comment_list * trailing_comment(void)
octave::comment_list * leading_comment(void)
octave_function * function_value(bool silent=false) const
#define panic_impossible()
static double f(double k, double l_nu, double c_pm)