PageRenderTime 48ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

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

https://github.com/w4x/boolangstudio
C# | 257 lines | 189 code | 38 blank | 30 comment | 42 complexity | c7f43b661a59fe806282f27971fb8457 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 ExceptionHandler : Node
  39. {
  40. protected Declaration _declaration;
  41. protected Expression _filterCondition;
  42. protected ExceptionHandlerFlags _flags;
  43. protected Block _block;
  44. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  45. new public ExceptionHandler CloneNode()
  46. {
  47. return Clone() as ExceptionHandler;
  48. }
  49. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  50. override public NodeType NodeType
  51. {
  52. get
  53. {
  54. return NodeType.ExceptionHandler;
  55. }
  56. }
  57. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  58. override public void Accept(IAstVisitor visitor)
  59. {
  60. visitor.OnExceptionHandler(this);
  61. }
  62. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  63. override public bool Matches(Node node)
  64. {
  65. ExceptionHandler other = node as ExceptionHandler;
  66. if (null == other) return false;
  67. if (!Node.Matches(_declaration, other._declaration)) return NoMatch("ExceptionHandler._declaration");
  68. if (!Node.Matches(_filterCondition, other._filterCondition)) return NoMatch("ExceptionHandler._filterCondition");
  69. if (_flags != other._flags) return NoMatch("ExceptionHandler._flags");
  70. if (!Node.Matches(_block, other._block)) return NoMatch("ExceptionHandler._block");
  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 (_declaration == existing)
  81. {
  82. this.Declaration = (Declaration)newNode;
  83. return true;
  84. }
  85. if (_filterCondition == existing)
  86. {
  87. this.FilterCondition = (Expression)newNode;
  88. return true;
  89. }
  90. if (_block == existing)
  91. {
  92. this.Block = (Block)newNode;
  93. return true;
  94. }
  95. return false;
  96. }
  97. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  98. override public object Clone()
  99. {
  100. ExceptionHandler clone = (ExceptionHandler)FormatterServices.GetUninitializedObject(typeof(ExceptionHandler));
  101. clone._lexicalInfo = _lexicalInfo;
  102. clone._endSourceLocation = _endSourceLocation;
  103. clone._documentation = _documentation;
  104. if (_annotations != null) clone._annotations = (Hashtable)_annotations.Clone();
  105. if (null != _declaration)
  106. {
  107. clone._declaration = _declaration.Clone() as Declaration;
  108. clone._declaration.InitializeParent(clone);
  109. }
  110. if (null != _filterCondition)
  111. {
  112. clone._filterCondition = _filterCondition.Clone() as Expression;
  113. clone._filterCondition.InitializeParent(clone);
  114. }
  115. clone._flags = _flags;
  116. if (null != _block)
  117. {
  118. clone._block = _block.Clone() as Block;
  119. clone._block.InitializeParent(clone);
  120. }
  121. return clone;
  122. }
  123. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  124. override internal void ClearTypeSystemBindings()
  125. {
  126. _annotations = null;
  127. if (null != _declaration)
  128. {
  129. _declaration.ClearTypeSystemBindings();
  130. }
  131. if (null != _filterCondition)
  132. {
  133. _filterCondition.ClearTypeSystemBindings();
  134. }
  135. if (null != _block)
  136. {
  137. _block.ClearTypeSystemBindings();
  138. }
  139. }
  140. [System.Xml.Serialization.XmlElement]
  141. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  142. public Declaration Declaration
  143. {
  144. get
  145. {
  146. return _declaration;
  147. }
  148. set
  149. {
  150. if (_declaration != value)
  151. {
  152. _declaration = value;
  153. if (null != _declaration)
  154. {
  155. _declaration.InitializeParent(this);
  156. }
  157. }
  158. }
  159. }
  160. [System.Xml.Serialization.XmlElement]
  161. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  162. public Expression FilterCondition
  163. {
  164. get
  165. {
  166. return _filterCondition;
  167. }
  168. set
  169. {
  170. if (_filterCondition != value)
  171. {
  172. _filterCondition = value;
  173. if (null != _filterCondition)
  174. {
  175. _filterCondition.InitializeParent(this);
  176. }
  177. }
  178. }
  179. }
  180. [System.Xml.Serialization.XmlElement]
  181. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  182. public ExceptionHandlerFlags Flags
  183. {
  184. get
  185. {
  186. return _flags;
  187. }
  188. set
  189. {
  190. _flags = value;
  191. }
  192. }
  193. [System.Xml.Serialization.XmlElement]
  194. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  195. public Block Block
  196. {
  197. get
  198. {
  199. if (_block == null)
  200. {
  201. _block = new Block();
  202. _block.InitializeParent(this);
  203. }
  204. return _block;
  205. }
  206. set
  207. {
  208. if (_block != value)
  209. {
  210. _block = value;
  211. if (null != _block)
  212. {
  213. _block.InitializeParent(this);
  214. }
  215. }
  216. }
  217. }
  218. }
  219. }