55 if (strict && autoCreate && named && !extraAllowed)
218 variable->
assign(context, stack, argument);
230 defaultValue = defaultValue->
evaluate(context, stack);
233 variable->
assign(context, stack, defaultValue);
241 variable->
drop(context);
276 if (target + 1 > count)
281 return arglist[target];
341 for (
size_t i = argcount; i < (argcount + (2 * named_argcount)); i+=2)
360 if (!retriever->
exists(context)) retriever->
assign(context, stack, argValue);
376 variable->
assign(context, stack, argValue);
388 defaultValue = defaultValue->
evaluate(context, stack);
391 variable->
assign(context, stack, defaultValue);
399 variable->
drop(context);
448 bool matched = expectedNamedArguments.
match(expectedNamedArguments[i].name, expectedNamedArguments[i].nameLength,
OREF_NULL,
false, i+1,
true);
450 if (matched)
continue;
465 if (namedArgCount < minimumRequired)
470 if (!extraAllowed && namedArgCount > this->
count)
480 for (
size_t i= 0; i < (2 * namedArgCount); i+=2)
484 this->
match(argName, argValue, strict && !extraAllowed);
490 for (
size_t i = 0; i < this->
count; i++)
519 if (name == NULL)
return false;
534 std::swap(name1, name2);
537 if (strcmp(name1, name2) == 0)
539 Utilities::snprintf(buffer,
sizeof buffer - 1,
"Use named arg: The name '%s' is declared more than once", name1);
543 Utilities::snprintf(buffer,
sizeof buffer - 1,
"Use named arg: The name '%s' collides with '%s'", name1, name2);
550 if (name == NULL)
return false;
560 bool matched =
false;
561 for (i = from; i < this->
count; i++)
593 return strcmp(name, expectedName) == 0;
void reportException(wholenumber_t error)
#define Error_Incorrect_call_noarg
#define Error_Incorrect_call_minarg
#define Error_Incorrect_method_maxarg
#define Error_Invalid_argument_general
#define Error_Incorrect_method_minarg
#define Error_Incorrect_call_maxarg
#define Error_Incorrect_method_noarg
#define Error_Translation_user_defined
#define Error_Symbol_expected_user_defined
#define memory_mark(oref)
#define flatten_reference(oref, envel)
#define memory_mark_general(oref)
#define setUpFlatten(type)
RexxString * new_string(const char *s, stringsize_t l)
void nameCollision(const char *name1, const char *name2)
NamedArgument * namedArguments
void match(RexxObject **namedArglist, size_t namedArgCount, bool strict, bool extraAllowed, size_t minimumRequired=0)
bool checkNameMatching(const char *name, size_t nameLength, size_t i, bool parse_time)
RexxString * getCallname()
size_t getMethodArgumentCount()
void traceResult(RexxObject *v)
void traceInstruction(RexxInstruction *v)
RexxObject ** getMethodArgumentList()
size_t getMethodNamedArgumentCount()
RexxInstruction * nextInstruction
void execute(RexxActivation *, RexxExpressionStack *)
RexxInstructionUseStrict(size_t, bool, bool, bool, bool, RexxQueue *, RexxQueue *)
void checkNamedArguments()
void liveGeneral(int reason)
void executeNamedArguments(RexxActivation *, RexxExpressionStack *)
void flatten(RexxEnvelope *)
RexxObject * getArgument(RexxObject **arglist, size_t count, size_t target)
void executePositionalArguments(RexxActivation *, RexxExpressionStack *)
virtual RexxObject * evaluate(RexxActivation *, RexxExpressionStack *)
const char * getStringData()
RexxString * concatWithCstring(const char *)
RexxString * concatToCstring(const char *)
virtual bool exists(RexxActivation *)
virtual void assign(RexxActivation *, RexxExpressionStack *, RexxObject *)
virtual RexxString * getName()
virtual void drop(RexxActivation *)
static RexxVariableBase * getVariableRetriever(RexxString *variable)
RexxVariableBase * variable
RexxObject * defaultValue
static int snprintf(char *buffer, size_t count, const char *format,...)