23 #if defined (HAVE_CONFIG_H) 158 error (
"invalid use of end");
218 && ! (
object->is_function ()
219 ||
object->is_function_handle ()));
221 unwind_protect
frame;
232 std::list<octave_value_list> args;
235 for (
int k = 0;
k < len;
k++)
246 tree_expression *elt = *
p++;
252 if (
tmp.is_cs_list ())
253 args.push_back (
tmp.list_value ());
254 else if (
tmp.is_defined ())
255 args.push_back (
tmp);
276 for (tree_expression *elt : *
this)
277 retval(
k++) = elt->str_print_code ();
282 std::list<std::string>
285 std::list<std::string>
retval;
287 for (tree_expression *elt : *
this)
289 if (elt->is_identifier ())
291 tree_identifier *
id =
dynamic_cast<tree_identifier *
> (elt);
295 else if (elt->is_index_expression ())
297 tree_index_expression *idx_expr
298 =
dynamic_cast<tree_index_expression *
> (elt);
300 retval.push_back (idx_expr->name ());
315 for (
const tree_expression *elt : *
this)
316 new_list->append (elt ? elt->dup (scope) :
nullptr);
OCTINTERP_API octave_value_list feval(const std::string &name, const octave_value_list &args=octave_value_list(), int nargout=0)
bool m_list_includes_magic_end
virtual bool has_magic_end(void) const =0
void resize(int n, int fill_value=0)
size_t length(void) const
void error(const char *fmt,...)
std::list< tree_expression * >::iterator iterator
bool is_defined(void) const
tree_argument_list * dup(symbol_scope &scope) const
static int index_position
iterator erase(iterator pos)
bool m_list_includes_magic_tilde
bool all_elements_are_constant(void) const
#define DEFCONSTMETHOD(name, interp_name, args_name, nargout_name, doc)
Macro to define a builtin method that cannot be hidden by a variable.
bool isobject(void) const
~tree_argument_list(void)
create a structure array and initialize its values The dimensions of each cell array of values must match Singleton cells and non cell values are repeated so that they fill the entire array If the cells are create an empty structure array with the specified field names If the argument is an object
virtual bool is_index_expression(void) const
string_vector get_arg_names(void) const
dim_vector dims(void) const
octave_function * function_value(bool silent=false) const
std::string class_name(void) const
octave_value find_method(const std::string &name, const std::string &dispatch_type)
virtual bool is_constant(void) const
std::list< std::string > variable_names(void) const
virtual bool is_identifier(void) const
octave::unwind_protect frame
static const octave_value * indexed_object
void append(const element_type &s)
octave_value_list convert_to_const_vector(tree_evaluator *tw, const octave_value *object=nullptr)
bool has_magic_end(void) const
octave_idx_type ndims(void) const
Number of dimensions.
void append(const elt_type &s)
Vector representing the dimensions (size) of an Array.
bool is_valid_lvalue_list(void) const
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string