/[dotgnu-pnet]/pnetlib/JScript/Nodes/JNode.tc
ViewVC logotype

Diff of /pnetlib/JScript/Nodes/JNode.tc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by rweather, Tue Jan 21 22:11:49 2003 UTC revision 1.4 by t3rmin4t0r, Mon Aug 22 06:58:15 2005 UTC
# Line 327  Eval(JFunction) Line 327  Eval(JFunction)
327          FunctionObject obj = new FunctionObject          FunctionObject obj = new FunctionObject
328                  (EngineInstance.GetEngineInstance(engine).GetFunctionPrototype(),                  (EngineInstance.GetEngineInstance(engine).GetFunctionPrototype(),
329                   this, scope);                   this, scope);
330            
331          // Add the function to the scope.          // javascript allows for anonymous functions
332          if(scope is IVariableAccess)          if(name != null)
         {  
                 ((IVariableAccess)scope).SetVariable(name, obj);  
         }  
         else  
333          {          {
334                  scope.Put(name, obj);                  // Add the function to the scope.
335                    if(scope is IVariableAccess)
336                    {
337                            ((IVariableAccess)scope).SetVariable(name, obj);
338                    }
339                    else
340                    {
341                            scope.Put(name, obj);
342                    }
343          }          }
344    
345          // Nothing else to do.          // Return compiled function object
346          return Empty.Value;          return obj;
347  }  }
348    
349  // Evaluate a formal parameter list.  // Evaluate a formal parameter list.

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26