PageRenderTime 49ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/Dependencies/boo/src/Boo.Lang.Compiler/Ast/Impl/TypeMemberImpl.cs

https://github.com/w4x/boolangstudio
C# | 185 lines | 124 code | 31 blank | 30 comment | 25 complexity | 56c986fa270a074816c8cf24b1f702c7 MD5 | raw file
Possible License(s): GPL-2.0
  1. #region license
  2. // Copyright (c) 2003, 2004, 2005 Rodrigo B. de Oliveira (rbo@acm.org)
  3. // All rights reserved.
  4. //
  5. // Redistribution and use in source and binary forms, with or without modification,
  6. // are permitted provided that the following conditions are met:
  7. //
  8. // * Redistributions of source code must retain the above copyright notice,
  9. // this list of conditions and the following disclaimer.
  10. // * Redistributions in binary form must reproduce the above copyright notice,
  11. // this list of conditions and the following disclaimer in the documentation
  12. // and/or other materials provided with the distribution.
  13. // * Neither the name of Rodrigo B. de Oliveira nor the names of its
  14. // contributors may be used to endorse or promote products derived from this
  15. // software without specific prior written permission.
  16. //
  17. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  18. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  19. // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  20. // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
  21. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  23. // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  24. // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  25. // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  26. // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. #endregion
  28. //
  29. // DO NOT EDIT THIS FILE!
  30. //
  31. // This file was generated automatically by astgen.boo.
  32. //
  33. namespace Boo.Lang.Compiler.Ast
  34. {
  35. using System.Collections;
  36. using System.Runtime.Serialization;
  37. [System.Serializable]
  38. public abstract partial class TypeMember : Node, INodeWithAttributes
  39. {
  40. protected TypeMemberModifiers _modifiers;
  41. protected string _name;
  42. protected AttributeCollection _attributes;
  43. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  44. new public TypeMember CloneNode()
  45. {
  46. return Clone() as TypeMember;
  47. }
  48. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  49. override public bool Matches(Node node)
  50. {
  51. TypeMember other = node as TypeMember;
  52. if (null == other) return false;
  53. if (_modifiers != other._modifiers) return NoMatch("TypeMember._modifiers");
  54. if (_name != other._name) return NoMatch("TypeMember._name");
  55. if (!Node.AllMatch(_attributes, other._attributes)) return NoMatch("TypeMember._attributes");
  56. return true;
  57. }
  58. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  59. override public bool Replace(Node existing, Node newNode)
  60. {
  61. if (base.Replace(existing, newNode))
  62. {
  63. return true;
  64. }
  65. if (_attributes != null)
  66. {
  67. Attribute item = existing as Attribute;
  68. if (null != item)
  69. {
  70. Attribute newItem = (Attribute)newNode;
  71. if (_attributes.Replace(item, newItem))
  72. {
  73. return true;
  74. }
  75. }
  76. }
  77. return false;
  78. }
  79. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  80. override public object Clone()
  81. {
  82. TypeMember clone = (TypeMember)FormatterServices.GetUninitializedObject(typeof(TypeMember));
  83. clone._lexicalInfo = _lexicalInfo;
  84. clone._endSourceLocation = _endSourceLocation;
  85. clone._documentation = _documentation;
  86. if (_annotations != null) clone._annotations = (Hashtable)_annotations.Clone();
  87. clone._modifiers = _modifiers;
  88. clone._name = _name;
  89. if (null != _attributes)
  90. {
  91. clone._attributes = _attributes.Clone() as AttributeCollection;
  92. clone._attributes.InitializeParent(clone);
  93. }
  94. return clone;
  95. }
  96. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  97. override internal void ClearTypeSystemBindings()
  98. {
  99. _annotations = null;
  100. if (null != _attributes)
  101. {
  102. _attributes.ClearTypeSystemBindings();
  103. }
  104. }
  105. [System.Xml.Serialization.XmlAttribute,
  106. System.ComponentModel.DefaultValue(TypeMemberModifiers.None)]
  107. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  108. public TypeMemberModifiers Modifiers
  109. {
  110. get
  111. {
  112. return _modifiers;
  113. }
  114. set
  115. {
  116. _modifiers = value;
  117. }
  118. }
  119. [System.Xml.Serialization.XmlAttribute]
  120. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  121. public string Name
  122. {
  123. get
  124. {
  125. return _name;
  126. }
  127. set
  128. {
  129. _name = value;
  130. }
  131. }
  132. [System.Xml.Serialization.XmlElement]
  133. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  134. public AttributeCollection Attributes
  135. {
  136. get
  137. {
  138. if (_attributes == null) _attributes = new AttributeCollection(this);
  139. return _attributes;
  140. }
  141. set
  142. {
  143. if (_attributes != value)
  144. {
  145. _attributes = value;
  146. if (null != _attributes)
  147. {
  148. _attributes.InitializeParent(this);
  149. }
  150. }
  151. }
  152. }
  153. }
  154. }