66 std::set<std::string> dict;
76 std::string name =
id->
name ();
81 error (
"invalid use of ~ in output list");
83 else if (dict.find (name) != dict.end ())
86 error (
"'%s' appears more than once in parameter list",
97 std::string va_type = (type ==
in ?
"varargin" :
"varargout");
107 if (
id && id->
name () == va_type)
141 if (++count > nargout)
152 while (k < ignored.
numel ())
169 (
"Octave:undefined-return-values",
170 "%s: some elements in list of return values are undefined",
185 int nargin = args.
length ();
187 int expected_nargin =
length ();
191 for (
int i = 0; i < expected_nargin; i++)
199 if (args(i).
is_defined () && args(i).is_magic_colon ())
203 ::error (
"no default value for argument %d\n", i+1);
222 for (
int i = 0; i < len; i++)
232 std::list<std::string>
235 std::list<std::string> retval;
241 retval.push_back (elt->
name ());
249 const Cell& varargout)
257 else if (nargout <= len)
287 retval(i++) = varargout(j);
325 new_list->
append (elt->
dup (scope, context));
359 new_list->
append (elt->
dup (scope, context));
void warning_with_id(const char *id, const char *fmt,...)
size_t length(void) const
std::list< std::string > variable_names(void) const
tree_decl_elt * dup(symbol_table::scope_id scope, symbol_table::context_id context) const
bool validate(in_or_out type)
octave_idx_type numel(void) const
Number of elements in the array.
octave_idx_type length(void) const
bool is_defined(void) const
void error(const char *fmt,...)
tree_decl_elt *& back(void)
tree_return_list * dup(symbol_table::scope_id scope, symbol_table::context_id context) const
virtual void visit_return_list(tree_return_list &)=0
octave_value rvalue1(int nargout=1)
tree_parameter_list * dup(symbol_table::scope_id scope, symbol_table::context_id context) const
static octave_value varval(const std::string &name, scope_id scope=xcurrent_scope, context_id context=xdefault_context)
tree_identifier * ident(void)
~tree_parameter_list(void)
void define_from_arg_vector(const octave_value_list &args)
std::list< tree_decl_elt * >::iterator iterator
void define(const octave_value &v)
void append(const elt_type &s)
virtual void visit_parameter_list(tree_parameter_list &)=0
static llvm::LLVMContext & context
std::string name(void) const
octave_value_list convert_to_const_vector(int nargout, const Cell &varargout)
void mark_as_formal_parameters(void)
virtual bool is_black_hole(void)
std::list< tree_decl_elt * >::const_iterator const_iterator
tree_parameter_list(void)
Matrix matrix_value(bool frc_str_conv=false) const
octave_lvalue lvalue(void)
bool takes_varargs(void) const
void mark_as_formal_parameter(void)
void assign(octave_value::assign_op, const octave_value &)
void initialize_undefined_elements(const std::string &warnfor, int nargout, const octave_value &val)
iterator erase(iterator pos)
void mark_varargs_only(void)
void accept(tree_walker &tw)
tree_index_expression * dup(symbol_table::scope_id scope, symbol_table::context_id context) const
void accept(tree_walker &tw)