public void AddLocalVariablesAsFields(BooClassBuilder builder) { Field field; foreach (Local local in this.CurrentMethodNode.get_Locals()) { InternalLocal entity = this.GetEntity(local); if (!entity.get_IsPrivateScope()) { field = builder.AddPublicField(entity.get_Name(), entity.get_Type()); this.SetEvaluationContextField(local, (InternalField) this.GetEntity(field)); } } foreach (ParameterDeclaration declaration in this.CurrentMethodNode.get_Parameters()) { InternalParameter parameter = this.GetEntity(declaration); field = builder.AddPublicField(parameter.get_Name(), parameter.get_Type()); this.SetEvaluationContextField(declaration, (InternalField) this.GetEntity(field)); } }
public void AddLocalVariablesAsFields(BooClassBuilder builder) { Field field; foreach (Local local in this.CurrentMethodNode.Locals) { InternalLocal entity = (InternalLocal)this.GetEntity(local); if (!entity.IsPrivateScope) { field = builder.AddPublicField(entity.Name, entity.Type); this.SetEvaluationContextField(local, (InternalField)this.GetEntity(field)); } } foreach (ParameterDeclaration declaration in this.CurrentMethodNode.Parameters) { InternalParameter parameter = (InternalParameter)this.GetEntity(declaration); field = builder.AddPublicField(parameter.Name, parameter.Type); this.SetEvaluationContextField(declaration, (InternalField)this.GetEntity(field)); } }