Beispiel #1
0
        private void DefineParameters()
        {
            if (FunctionObject.ParameterDeclarations != null)
            {
                // for each parameter...
                foreach (ParameterDeclaration parameter in FunctionObject.ParameterDeclarations)
                {
                    // see if it's already defined
                    var argumentField = this[parameter.Name];
                    if (argumentField == null)
                    {
                        // not already defined -- create a field now
                        argumentField = new JSArgumentField(FieldType.Argument, parameter.Name, parameter.Position);

                        this.AddField(argumentField);
                    }

                    // make the parameter reference the field and the field reference
                    // the parameter as its declaration
                    parameter.VariableField = argumentField;
                }
            }
        }
Beispiel #2
0
        private void DefineParameters()
        {
            if (FunctionObject.ParameterDeclarations != null)
            {
                // for each parameter...
                foreach (ParameterDeclaration parameter in FunctionObject.ParameterDeclarations)
                {
                    // see if it's already defined
                    var argumentField = this[parameter.Name];
                    if (argumentField == null)
                    {
                        // not already defined -- create a field now
                        argumentField = new JSArgumentField(FieldType.Argument, parameter.Name, parameter.Position);

                        this.AddField(argumentField);
                    }

                    // make the parameter reference the field and the field reference
                    // the parameter as its declaration
                    parameter.VariableField = argumentField;
                }
            }
        }