Microsoft.JScript.FunctionExpression.FunctionExpression C# (CSharp) Method

FunctionExpression() private method

private FunctionExpression ( Context context, AST id, ParameterDeclaration formal_parameters, TypeExpression return_type, Block body, FunctionScope own_scope, FieldAttributes attributes ) : Microsoft.JScript.Vsa
context Context
id AST
formal_parameters ParameterDeclaration
return_type TypeExpression
body Block
own_scope FunctionScope
attributes FieldAttributes
return Microsoft.JScript.Vsa
      internal FunctionExpression(Context context, AST id, ParameterDeclaration[] formal_parameters, TypeExpression return_type, Block body, FunctionScope own_scope, FieldAttributes attributes)
        : base(context){
        if (attributes != (FieldAttributes)0){
          this.context.HandleError(JSError.SyntaxError);
          attributes = (FieldAttributes)0;
        }
        ScriptObject enclosingScope = Globals.ScopeStack.Peek();
        this.name = id.ToString();
        if (this.name.Length == 0)
          this.name = "anonymous "+(uniqueNumber++).ToString(CultureInfo.InvariantCulture);
        else
          this.AddNameTo(enclosingScope);
        this.func = new FunctionObject(this.name, formal_parameters, return_type, body, own_scope, enclosingScope, this.context, MethodAttributes.Static|MethodAttributes.Public);
      }