internal override AST PartiallyEvaluate() { AST lhref = this.lhside.PartiallyEvaluateAsReference(); this.lhside = lhref; this.rhside = this.rhside.PartiallyEvaluate(); lhref.SetPartialValue(this.rhside); return(this); }
internal override AST PartiallyEvaluate() { AST ast = this.lhside.PartiallyEvaluateAsReference(); this.lhside = ast; this.rhside = this.rhside.PartiallyEvaluate(); ast.SetPartialValue(this.rhside); return(this); }
internal override AST PartiallyEvaluate() { AST id = this.identifier = (Lookup)this.identifier.PartiallyEvaluateAsReference(); if (this.type != null) { this.field.type = this.type = (TypeExpression)this.type.PartiallyEvaluate(); } else if (this.initializer == null && !(this.field is JSLocalField) && this.field.value is Missing) { id.context.HandleError(JSError.VariableLeftUninitialized); this.field.type = this.type = new TypeExpression(new ConstantWrapper(Typeob.Object, id.context)); } if (this.initializer != null) { if (this.field.IsStatic) { ScriptObject scope = this.Engine.ScriptObjectStackTop(); ClassScope cscope = null; while (scope != null && (cscope = scope as ClassScope) == null) { scope = scope.GetParent(); } if (cscope != null) { cscope.inStaticInitializerCode = true; } this.initializer = this.initializer.PartiallyEvaluate(); if (cscope != null) { cscope.inStaticInitializerCode = false; } } else { this.initializer = this.initializer.PartiallyEvaluate(); } id.SetPartialValue(this.initializer); } // deal with custom attributes if (this.field != null && this.field.customAttributes != null) { this.field.customAttributes.PartiallyEvaluate(); } return(this); }
internal override AST PartiallyEvaluate() { AST ast = this.identifier = (Lookup)this.identifier.PartiallyEvaluateAsReference(); if (this.type != null) { this.field.type = this.type = (TypeExpression)this.type.PartiallyEvaluate(); } else if (((this.initializer == null) && !(this.field is JSLocalField)) && (this.field.value is Microsoft.JScript.Missing)) { ast.context.HandleError(JSError.VariableLeftUninitialized); this.field.type = this.type = new TypeExpression(new ConstantWrapper(Typeob.Object, ast.context)); } if (this.initializer != null) { if (this.field.IsStatic) { ScriptObject parent = base.Engine.ScriptObjectStackTop(); ClassScope scope = null; while ((parent != null) && ((scope = parent as ClassScope) == null)) { parent = parent.GetParent(); } if (scope != null) { scope.inStaticInitializerCode = true; } this.initializer = this.initializer.PartiallyEvaluate(); if (scope != null) { scope.inStaticInitializerCode = false; } } else { this.initializer = this.initializer.PartiallyEvaluate(); } ast.SetPartialValue(this.initializer); } if ((this.field != null) && (this.field.customAttributes != null)) { this.field.customAttributes.PartiallyEvaluate(); } return(this); }