tid = ejsLexGetToken(ep, state);
if (tid == EJS_TOK_LPAREN) {
+ if (ep->currentProperty == 0 && (flags & EJS_FLAGS_EXE)) {
+ ejsError(ep, "Function name not defined \"%s\"\n", *id);
+ return -1;
+ }
ejsLexPutbackToken(ep, EJS_TOK_FUNCTION_NAME, ep->token);
return state;
}
actualArgs = proc->args;
argValues = (MprVar**) actualArgs->handles;
- if (prototype == NULL) {
- ejsError(ep, "Function name not defined '%s'\n", proc->procName);
- return -1;
- }
-
/*
* Create a new variable stack frame. ie. new local variables.
*/
MprVar *ejsFindObj(Ejs *ep, int state, const char *property, int flags)
{
- MprVar *vp;
MprVar *obj;
mprAssert(ep);
} else {
/* First look local, then look global */
- vp = mprGetProperty(ep->local, property, 0);
- if (vp) {
- obj = ep->local;
- } else if (mprGetProperty(ep->local, property, 0)) {
+ if (mprGetProperty(ep->local, property, 0)) {
obj = ep->local;
} else {
obj = ep->global;
/*********************************** Defines **********************************/
-#define ESP_STRING_ARGS MPR_TYPE_STRING_ARGS
-
#if BLD_FEATURE_SQUEEZE
#define ESP_TOK_INCR 1024
#define ESP_MAX_HEADER 1024