PageRenderTime 35ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 1ms

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

https://github.com/w4x/boolangstudio
C# | 229 lines | 173 code | 26 blank | 30 comment | 48 complexity | 0adbcb1508657e61b090709f9d8d720f 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 partial class SpliceParameterDeclaration : ParameterDeclaration
  39. {
  40. protected ParameterDeclaration _parameterDeclaration;
  41. protected Expression _nameExpression;
  42. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  43. new public SpliceParameterDeclaration CloneNode()
  44. {
  45. return Clone() as SpliceParameterDeclaration;
  46. }
  47. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  48. override public NodeType NodeType
  49. {
  50. get
  51. {
  52. return NodeType.SpliceParameterDeclaration;
  53. }
  54. }
  55. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  56. override public void Accept(IAstVisitor visitor)
  57. {
  58. visitor.OnSpliceParameterDeclaration(this);
  59. }
  60. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  61. override public bool Matches(Node node)
  62. {
  63. SpliceParameterDeclaration other = node as SpliceParameterDeclaration;
  64. if (null == other) return false;
  65. if (_name != other._name) return NoMatch("SpliceParameterDeclaration._name");
  66. if (!Node.Matches(_type, other._type)) return NoMatch("SpliceParameterDeclaration._type");
  67. if (_modifiers != other._modifiers) return NoMatch("SpliceParameterDeclaration._modifiers");
  68. if (!Node.AllMatch(_attributes, other._attributes)) return NoMatch("SpliceParameterDeclaration._attributes");
  69. if (!Node.Matches(_parameterDeclaration, other._parameterDeclaration)) return NoMatch("SpliceParameterDeclaration._parameterDeclaration");
  70. if (!Node.Matches(_nameExpression, other._nameExpression)) return NoMatch("SpliceParameterDeclaration._nameExpression");
  71. return true;
  72. }
  73. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  74. override public bool Replace(Node existing, Node newNode)
  75. {
  76. if (base.Replace(existing, newNode))
  77. {
  78. return true;
  79. }
  80. if (_type == existing)
  81. {
  82. this.Type = (TypeReference)newNode;
  83. return true;
  84. }
  85. if (_attributes != null)
  86. {
  87. Attribute item = existing as Attribute;
  88. if (null != item)
  89. {
  90. Attribute newItem = (Attribute)newNode;
  91. if (_attributes.Replace(item, newItem))
  92. {
  93. return true;
  94. }
  95. }
  96. }
  97. if (_parameterDeclaration == existing)
  98. {
  99. this.ParameterDeclaration = (ParameterDeclaration)newNode;
  100. return true;
  101. }
  102. if (_nameExpression == existing)
  103. {
  104. this.NameExpression = (Expression)newNode;
  105. return true;
  106. }
  107. return false;
  108. }
  109. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  110. override public object Clone()
  111. {
  112. SpliceParameterDeclaration clone = (SpliceParameterDeclaration)FormatterServices.GetUninitializedObject(typeof(SpliceParameterDeclaration));
  113. clone._lexicalInfo = _lexicalInfo;
  114. clone._endSourceLocation = _endSourceLocation;
  115. clone._documentation = _documentation;
  116. if (_annotations != null) clone._annotations = (Hashtable)_annotations.Clone();
  117. clone._name = _name;
  118. if (null != _type)
  119. {
  120. clone._type = _type.Clone() as TypeReference;
  121. clone._type.InitializeParent(clone);
  122. }
  123. clone._modifiers = _modifiers;
  124. if (null != _attributes)
  125. {
  126. clone._attributes = _attributes.Clone() as AttributeCollection;
  127. clone._attributes.InitializeParent(clone);
  128. }
  129. if (null != _parameterDeclaration)
  130. {
  131. clone._parameterDeclaration = _parameterDeclaration.Clone() as ParameterDeclaration;
  132. clone._parameterDeclaration.InitializeParent(clone);
  133. }
  134. if (null != _nameExpression)
  135. {
  136. clone._nameExpression = _nameExpression.Clone() as Expression;
  137. clone._nameExpression.InitializeParent(clone);
  138. }
  139. return clone;
  140. }
  141. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  142. override internal void ClearTypeSystemBindings()
  143. {
  144. _annotations = null;
  145. if (null != _type)
  146. {
  147. _type.ClearTypeSystemBindings();
  148. }
  149. if (null != _attributes)
  150. {
  151. _attributes.ClearTypeSystemBindings();
  152. }
  153. if (null != _parameterDeclaration)
  154. {
  155. _parameterDeclaration.ClearTypeSystemBindings();
  156. }
  157. if (null != _nameExpression)
  158. {
  159. _nameExpression.ClearTypeSystemBindings();
  160. }
  161. }
  162. [System.Xml.Serialization.XmlElement]
  163. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  164. public ParameterDeclaration ParameterDeclaration
  165. {
  166. get
  167. {
  168. return _parameterDeclaration;
  169. }
  170. set
  171. {
  172. if (_parameterDeclaration != value)
  173. {
  174. _parameterDeclaration = value;
  175. if (null != _parameterDeclaration)
  176. {
  177. _parameterDeclaration.InitializeParent(this);
  178. }
  179. }
  180. }
  181. }
  182. [System.Xml.Serialization.XmlElement]
  183. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  184. public Expression NameExpression
  185. {
  186. get
  187. {
  188. return _nameExpression;
  189. }
  190. set
  191. {
  192. if (_nameExpression != value)
  193. {
  194. _nameExpression = value;
  195. if (null != _nameExpression)
  196. {
  197. _nameExpression.InitializeParent(this);
  198. }
  199. }
  200. }
  201. }
  202. }
  203. }