public ClassBuilder(string superClassName) { this.superClassName = superClassName; variables = new List <string>(); initializedVariables = new Hash <string, Value>(); methods = new Hash <string, Closure>(); multiMethods = new Hash <string, MultiClosure> { NewValue = m => new MultiClosure(), AutoAddDefault = true }; scope = new Hash <string, Class.ScopeType> { DefaultValue = Class.ScopeType.Object }; objectVisibility = new Hash <string, Class.VisibilityType> { DefaultValue = Class.VisibilityType.Public }; classVisibility = new Hash <string, Class.VisibilityType> { DefaultValue = Class.VisibilityType.Public }; currentScope = Class.ScopeType.Object; currentVisiblity = new Stack <Class.VisibilityType>(); currentVisiblity.Push(Class.VisibilityType.Public); delegates = new Hash <string, string>(); abstractMessages = new Hash <string, bool>(); variableCases = new Hash <string, Block>(); }
public void SetToObjectScope() { currentScope = Class.ScopeType.Object; }
public void SetToClassScope() { currentScope = Class.ScopeType.Class; }
public void ToggleScope() { currentScope = currentScope == Class.ScopeType.Object ? Class.ScopeType.Class : Class.ScopeType.Object; }