PageRenderTime 68ms CodeModel.GetById 29ms RepoModel.GetById 0ms app.codeStats 1ms

/src/Boo.Lang.Compiler/Ast/Impl/DepthFirstTransformer.cs

http://github.com/bamboo/boo
C# | 2777 lines | 2441 code | 306 blank | 30 comment | 431 complexity | bda53dda1e701d62e5544d6492add1b9 MD5 | raw file
Possible License(s): GPL-2.0

Large files files are truncated, but you can click here to view the full file

  1. #region license
  2. // Copyright (c) 2009 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;
  36. public partial class DepthFirstTransformer : IAstVisitor
  37. {
  38. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  39. public virtual void OnCompileUnit(Boo.Lang.Compiler.Ast.CompileUnit node)
  40. {
  41. if (EnterCompileUnit(node))
  42. {
  43. Visit(node.Modules);
  44. LeaveCompileUnit(node);
  45. }
  46. }
  47. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  48. public virtual bool EnterCompileUnit(Boo.Lang.Compiler.Ast.CompileUnit node)
  49. {
  50. return true;
  51. }
  52. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  53. public virtual void LeaveCompileUnit(Boo.Lang.Compiler.Ast.CompileUnit node)
  54. {
  55. }
  56. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  57. public virtual void OnTypeMemberStatement(Boo.Lang.Compiler.Ast.TypeMemberStatement node)
  58. {
  59. if (EnterTypeMemberStatement(node))
  60. {
  61. StatementModifier currentModifierValue = node.Modifier;
  62. if (null != currentModifierValue)
  63. {
  64. StatementModifier newValue = (StatementModifier)VisitNode(currentModifierValue);
  65. if (!object.ReferenceEquals(newValue, currentModifierValue))
  66. {
  67. node.Modifier = newValue;
  68. }
  69. }
  70. TypeMember currentTypeMemberValue = node.TypeMember;
  71. if (null != currentTypeMemberValue)
  72. {
  73. TypeMember newValue = (TypeMember)VisitNode(currentTypeMemberValue);
  74. if (!object.ReferenceEquals(newValue, currentTypeMemberValue))
  75. {
  76. node.TypeMember = newValue;
  77. }
  78. }
  79. LeaveTypeMemberStatement(node);
  80. }
  81. }
  82. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  83. public virtual bool EnterTypeMemberStatement(Boo.Lang.Compiler.Ast.TypeMemberStatement node)
  84. {
  85. return true;
  86. }
  87. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  88. public virtual void LeaveTypeMemberStatement(Boo.Lang.Compiler.Ast.TypeMemberStatement node)
  89. {
  90. }
  91. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  92. public virtual void OnExplicitMemberInfo(Boo.Lang.Compiler.Ast.ExplicitMemberInfo node)
  93. {
  94. if (EnterExplicitMemberInfo(node))
  95. {
  96. SimpleTypeReference currentInterfaceTypeValue = node.InterfaceType;
  97. if (null != currentInterfaceTypeValue)
  98. {
  99. SimpleTypeReference newValue = (SimpleTypeReference)VisitNode(currentInterfaceTypeValue);
  100. if (!object.ReferenceEquals(newValue, currentInterfaceTypeValue))
  101. {
  102. node.InterfaceType = newValue;
  103. }
  104. }
  105. LeaveExplicitMemberInfo(node);
  106. }
  107. }
  108. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  109. public virtual bool EnterExplicitMemberInfo(Boo.Lang.Compiler.Ast.ExplicitMemberInfo node)
  110. {
  111. return true;
  112. }
  113. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  114. public virtual void LeaveExplicitMemberInfo(Boo.Lang.Compiler.Ast.ExplicitMemberInfo node)
  115. {
  116. }
  117. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  118. public virtual void OnSimpleTypeReference(Boo.Lang.Compiler.Ast.SimpleTypeReference node)
  119. {
  120. }
  121. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  122. public virtual void OnArrayTypeReference(Boo.Lang.Compiler.Ast.ArrayTypeReference node)
  123. {
  124. if (EnterArrayTypeReference(node))
  125. {
  126. TypeReference currentElementTypeValue = node.ElementType;
  127. if (null != currentElementTypeValue)
  128. {
  129. TypeReference newValue = (TypeReference)VisitNode(currentElementTypeValue);
  130. if (!object.ReferenceEquals(newValue, currentElementTypeValue))
  131. {
  132. node.ElementType = newValue;
  133. }
  134. }
  135. IntegerLiteralExpression currentRankValue = node.Rank;
  136. if (null != currentRankValue)
  137. {
  138. IntegerLiteralExpression newValue = (IntegerLiteralExpression)VisitNode(currentRankValue);
  139. if (!object.ReferenceEquals(newValue, currentRankValue))
  140. {
  141. node.Rank = newValue;
  142. }
  143. }
  144. LeaveArrayTypeReference(node);
  145. }
  146. }
  147. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  148. public virtual bool EnterArrayTypeReference(Boo.Lang.Compiler.Ast.ArrayTypeReference node)
  149. {
  150. return true;
  151. }
  152. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  153. public virtual void LeaveArrayTypeReference(Boo.Lang.Compiler.Ast.ArrayTypeReference node)
  154. {
  155. }
  156. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  157. public virtual void OnCallableTypeReference(Boo.Lang.Compiler.Ast.CallableTypeReference node)
  158. {
  159. if (EnterCallableTypeReference(node))
  160. {
  161. Visit(node.Parameters);
  162. TypeReference currentReturnTypeValue = node.ReturnType;
  163. if (null != currentReturnTypeValue)
  164. {
  165. TypeReference newValue = (TypeReference)VisitNode(currentReturnTypeValue);
  166. if (!object.ReferenceEquals(newValue, currentReturnTypeValue))
  167. {
  168. node.ReturnType = newValue;
  169. }
  170. }
  171. LeaveCallableTypeReference(node);
  172. }
  173. }
  174. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  175. public virtual bool EnterCallableTypeReference(Boo.Lang.Compiler.Ast.CallableTypeReference node)
  176. {
  177. return true;
  178. }
  179. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  180. public virtual void LeaveCallableTypeReference(Boo.Lang.Compiler.Ast.CallableTypeReference node)
  181. {
  182. }
  183. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  184. public virtual void OnGenericTypeReference(Boo.Lang.Compiler.Ast.GenericTypeReference node)
  185. {
  186. if (EnterGenericTypeReference(node))
  187. {
  188. Visit(node.GenericArguments);
  189. LeaveGenericTypeReference(node);
  190. }
  191. }
  192. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  193. public virtual bool EnterGenericTypeReference(Boo.Lang.Compiler.Ast.GenericTypeReference node)
  194. {
  195. return true;
  196. }
  197. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  198. public virtual void LeaveGenericTypeReference(Boo.Lang.Compiler.Ast.GenericTypeReference node)
  199. {
  200. }
  201. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  202. public virtual void OnGenericTypeDefinitionReference(Boo.Lang.Compiler.Ast.GenericTypeDefinitionReference node)
  203. {
  204. }
  205. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  206. public virtual void OnCallableDefinition(Boo.Lang.Compiler.Ast.CallableDefinition node)
  207. {
  208. if (EnterCallableDefinition(node))
  209. {
  210. Visit(node.Attributes);
  211. Visit(node.Parameters);
  212. Visit(node.GenericParameters);
  213. TypeReference currentReturnTypeValue = node.ReturnType;
  214. if (null != currentReturnTypeValue)
  215. {
  216. TypeReference newValue = (TypeReference)VisitNode(currentReturnTypeValue);
  217. if (!object.ReferenceEquals(newValue, currentReturnTypeValue))
  218. {
  219. node.ReturnType = newValue;
  220. }
  221. }
  222. Visit(node.ReturnTypeAttributes);
  223. LeaveCallableDefinition(node);
  224. }
  225. }
  226. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  227. public virtual bool EnterCallableDefinition(Boo.Lang.Compiler.Ast.CallableDefinition node)
  228. {
  229. return true;
  230. }
  231. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  232. public virtual void LeaveCallableDefinition(Boo.Lang.Compiler.Ast.CallableDefinition node)
  233. {
  234. }
  235. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  236. public virtual void OnNamespaceDeclaration(Boo.Lang.Compiler.Ast.NamespaceDeclaration node)
  237. {
  238. }
  239. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  240. public virtual void OnImport(Boo.Lang.Compiler.Ast.Import node)
  241. {
  242. if (EnterImport(node))
  243. {
  244. Expression currentExpressionValue = node.Expression;
  245. if (null != currentExpressionValue)
  246. {
  247. Expression newValue = (Expression)VisitNode(currentExpressionValue);
  248. if (!object.ReferenceEquals(newValue, currentExpressionValue))
  249. {
  250. node.Expression = newValue;
  251. }
  252. }
  253. ReferenceExpression currentAssemblyReferenceValue = node.AssemblyReference;
  254. if (null != currentAssemblyReferenceValue)
  255. {
  256. ReferenceExpression newValue = (ReferenceExpression)VisitNode(currentAssemblyReferenceValue);
  257. if (!object.ReferenceEquals(newValue, currentAssemblyReferenceValue))
  258. {
  259. node.AssemblyReference = newValue;
  260. }
  261. }
  262. ReferenceExpression currentAliasValue = node.Alias;
  263. if (null != currentAliasValue)
  264. {
  265. ReferenceExpression newValue = (ReferenceExpression)VisitNode(currentAliasValue);
  266. if (!object.ReferenceEquals(newValue, currentAliasValue))
  267. {
  268. node.Alias = newValue;
  269. }
  270. }
  271. LeaveImport(node);
  272. }
  273. }
  274. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  275. public virtual bool EnterImport(Boo.Lang.Compiler.Ast.Import node)
  276. {
  277. return true;
  278. }
  279. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  280. public virtual void LeaveImport(Boo.Lang.Compiler.Ast.Import node)
  281. {
  282. }
  283. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  284. public virtual void OnModule(Boo.Lang.Compiler.Ast.Module node)
  285. {
  286. if (EnterModule(node))
  287. {
  288. Visit(node.Attributes);
  289. Visit(node.Members);
  290. Visit(node.BaseTypes);
  291. Visit(node.GenericParameters);
  292. NamespaceDeclaration currentNamespaceValue = node.Namespace;
  293. if (null != currentNamespaceValue)
  294. {
  295. NamespaceDeclaration newValue = (NamespaceDeclaration)VisitNode(currentNamespaceValue);
  296. if (!object.ReferenceEquals(newValue, currentNamespaceValue))
  297. {
  298. node.Namespace = newValue;
  299. }
  300. }
  301. Visit(node.Imports);
  302. Block currentGlobalsValue = node.Globals;
  303. if (null != currentGlobalsValue)
  304. {
  305. Block newValue = (Block)VisitNode(currentGlobalsValue);
  306. if (!object.ReferenceEquals(newValue, currentGlobalsValue))
  307. {
  308. node.Globals = newValue;
  309. }
  310. }
  311. Visit(node.AssemblyAttributes);
  312. LeaveModule(node);
  313. }
  314. }
  315. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  316. public virtual bool EnterModule(Boo.Lang.Compiler.Ast.Module node)
  317. {
  318. return true;
  319. }
  320. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  321. public virtual void LeaveModule(Boo.Lang.Compiler.Ast.Module node)
  322. {
  323. }
  324. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  325. public virtual void OnClassDefinition(Boo.Lang.Compiler.Ast.ClassDefinition node)
  326. {
  327. if (EnterClassDefinition(node))
  328. {
  329. Visit(node.Attributes);
  330. Visit(node.Members);
  331. Visit(node.BaseTypes);
  332. Visit(node.GenericParameters);
  333. LeaveClassDefinition(node);
  334. }
  335. }
  336. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  337. public virtual bool EnterClassDefinition(Boo.Lang.Compiler.Ast.ClassDefinition node)
  338. {
  339. return true;
  340. }
  341. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  342. public virtual void LeaveClassDefinition(Boo.Lang.Compiler.Ast.ClassDefinition node)
  343. {
  344. }
  345. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  346. public virtual void OnStructDefinition(Boo.Lang.Compiler.Ast.StructDefinition node)
  347. {
  348. if (EnterStructDefinition(node))
  349. {
  350. Visit(node.Attributes);
  351. Visit(node.Members);
  352. Visit(node.BaseTypes);
  353. Visit(node.GenericParameters);
  354. LeaveStructDefinition(node);
  355. }
  356. }
  357. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  358. public virtual bool EnterStructDefinition(Boo.Lang.Compiler.Ast.StructDefinition node)
  359. {
  360. return true;
  361. }
  362. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  363. public virtual void LeaveStructDefinition(Boo.Lang.Compiler.Ast.StructDefinition node)
  364. {
  365. }
  366. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  367. public virtual void OnInterfaceDefinition(Boo.Lang.Compiler.Ast.InterfaceDefinition node)
  368. {
  369. if (EnterInterfaceDefinition(node))
  370. {
  371. Visit(node.Attributes);
  372. Visit(node.Members);
  373. Visit(node.BaseTypes);
  374. Visit(node.GenericParameters);
  375. LeaveInterfaceDefinition(node);
  376. }
  377. }
  378. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  379. public virtual bool EnterInterfaceDefinition(Boo.Lang.Compiler.Ast.InterfaceDefinition node)
  380. {
  381. return true;
  382. }
  383. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  384. public virtual void LeaveInterfaceDefinition(Boo.Lang.Compiler.Ast.InterfaceDefinition node)
  385. {
  386. }
  387. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  388. public virtual void OnEnumDefinition(Boo.Lang.Compiler.Ast.EnumDefinition node)
  389. {
  390. if (EnterEnumDefinition(node))
  391. {
  392. Visit(node.Attributes);
  393. Visit(node.Members);
  394. Visit(node.BaseTypes);
  395. Visit(node.GenericParameters);
  396. LeaveEnumDefinition(node);
  397. }
  398. }
  399. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  400. public virtual bool EnterEnumDefinition(Boo.Lang.Compiler.Ast.EnumDefinition node)
  401. {
  402. return true;
  403. }
  404. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  405. public virtual void LeaveEnumDefinition(Boo.Lang.Compiler.Ast.EnumDefinition node)
  406. {
  407. }
  408. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  409. public virtual void OnEnumMember(Boo.Lang.Compiler.Ast.EnumMember node)
  410. {
  411. if (EnterEnumMember(node))
  412. {
  413. Visit(node.Attributes);
  414. Expression currentInitializerValue = node.Initializer;
  415. if (null != currentInitializerValue)
  416. {
  417. Expression newValue = (Expression)VisitNode(currentInitializerValue);
  418. if (!object.ReferenceEquals(newValue, currentInitializerValue))
  419. {
  420. node.Initializer = newValue;
  421. }
  422. }
  423. LeaveEnumMember(node);
  424. }
  425. }
  426. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  427. public virtual bool EnterEnumMember(Boo.Lang.Compiler.Ast.EnumMember node)
  428. {
  429. return true;
  430. }
  431. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  432. public virtual void LeaveEnumMember(Boo.Lang.Compiler.Ast.EnumMember node)
  433. {
  434. }
  435. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  436. public virtual void OnField(Boo.Lang.Compiler.Ast.Field node)
  437. {
  438. if (EnterField(node))
  439. {
  440. Visit(node.Attributes);
  441. TypeReference currentTypeValue = node.Type;
  442. if (null != currentTypeValue)
  443. {
  444. TypeReference newValue = (TypeReference)VisitNode(currentTypeValue);
  445. if (!object.ReferenceEquals(newValue, currentTypeValue))
  446. {
  447. node.Type = newValue;
  448. }
  449. }
  450. Expression currentInitializerValue = node.Initializer;
  451. if (null != currentInitializerValue)
  452. {
  453. Expression newValue = (Expression)VisitNode(currentInitializerValue);
  454. if (!object.ReferenceEquals(newValue, currentInitializerValue))
  455. {
  456. node.Initializer = newValue;
  457. }
  458. }
  459. LeaveField(node);
  460. }
  461. }
  462. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  463. public virtual bool EnterField(Boo.Lang.Compiler.Ast.Field node)
  464. {
  465. return true;
  466. }
  467. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  468. public virtual void LeaveField(Boo.Lang.Compiler.Ast.Field node)
  469. {
  470. }
  471. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  472. public virtual void OnProperty(Boo.Lang.Compiler.Ast.Property node)
  473. {
  474. if (EnterProperty(node))
  475. {
  476. Visit(node.Attributes);
  477. Visit(node.Parameters);
  478. Method currentGetterValue = node.Getter;
  479. if (null != currentGetterValue)
  480. {
  481. Method newValue = (Method)VisitNode(currentGetterValue);
  482. if (!object.ReferenceEquals(newValue, currentGetterValue))
  483. {
  484. node.Getter = newValue;
  485. }
  486. }
  487. Method currentSetterValue = node.Setter;
  488. if (null != currentSetterValue)
  489. {
  490. Method newValue = (Method)VisitNode(currentSetterValue);
  491. if (!object.ReferenceEquals(newValue, currentSetterValue))
  492. {
  493. node.Setter = newValue;
  494. }
  495. }
  496. TypeReference currentTypeValue = node.Type;
  497. if (null != currentTypeValue)
  498. {
  499. TypeReference newValue = (TypeReference)VisitNode(currentTypeValue);
  500. if (!object.ReferenceEquals(newValue, currentTypeValue))
  501. {
  502. node.Type = newValue;
  503. }
  504. }
  505. ExplicitMemberInfo currentExplicitInfoValue = node.ExplicitInfo;
  506. if (null != currentExplicitInfoValue)
  507. {
  508. ExplicitMemberInfo newValue = (ExplicitMemberInfo)VisitNode(currentExplicitInfoValue);
  509. if (!object.ReferenceEquals(newValue, currentExplicitInfoValue))
  510. {
  511. node.ExplicitInfo = newValue;
  512. }
  513. }
  514. LeaveProperty(node);
  515. }
  516. }
  517. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  518. public virtual bool EnterProperty(Boo.Lang.Compiler.Ast.Property node)
  519. {
  520. return true;
  521. }
  522. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  523. public virtual void LeaveProperty(Boo.Lang.Compiler.Ast.Property node)
  524. {
  525. }
  526. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  527. public virtual void OnEvent(Boo.Lang.Compiler.Ast.Event node)
  528. {
  529. if (EnterEvent(node))
  530. {
  531. Visit(node.Attributes);
  532. Method currentAddValue = node.Add;
  533. if (null != currentAddValue)
  534. {
  535. Method newValue = (Method)VisitNode(currentAddValue);
  536. if (!object.ReferenceEquals(newValue, currentAddValue))
  537. {
  538. node.Add = newValue;
  539. }
  540. }
  541. Method currentRemoveValue = node.Remove;
  542. if (null != currentRemoveValue)
  543. {
  544. Method newValue = (Method)VisitNode(currentRemoveValue);
  545. if (!object.ReferenceEquals(newValue, currentRemoveValue))
  546. {
  547. node.Remove = newValue;
  548. }
  549. }
  550. Method currentRaiseValue = node.Raise;
  551. if (null != currentRaiseValue)
  552. {
  553. Method newValue = (Method)VisitNode(currentRaiseValue);
  554. if (!object.ReferenceEquals(newValue, currentRaiseValue))
  555. {
  556. node.Raise = newValue;
  557. }
  558. }
  559. TypeReference currentTypeValue = node.Type;
  560. if (null != currentTypeValue)
  561. {
  562. TypeReference newValue = (TypeReference)VisitNode(currentTypeValue);
  563. if (!object.ReferenceEquals(newValue, currentTypeValue))
  564. {
  565. node.Type = newValue;
  566. }
  567. }
  568. LeaveEvent(node);
  569. }
  570. }
  571. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  572. public virtual bool EnterEvent(Boo.Lang.Compiler.Ast.Event node)
  573. {
  574. return true;
  575. }
  576. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  577. public virtual void LeaveEvent(Boo.Lang.Compiler.Ast.Event node)
  578. {
  579. }
  580. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  581. public virtual void OnLocal(Boo.Lang.Compiler.Ast.Local node)
  582. {
  583. }
  584. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  585. public virtual void OnBlockExpression(Boo.Lang.Compiler.Ast.BlockExpression node)
  586. {
  587. if (EnterBlockExpression(node))
  588. {
  589. Visit(node.Parameters);
  590. TypeReference currentReturnTypeValue = node.ReturnType;
  591. if (null != currentReturnTypeValue)
  592. {
  593. TypeReference newValue = (TypeReference)VisitNode(currentReturnTypeValue);
  594. if (!object.ReferenceEquals(newValue, currentReturnTypeValue))
  595. {
  596. node.ReturnType = newValue;
  597. }
  598. }
  599. Block currentBodyValue = node.Body;
  600. if (null != currentBodyValue)
  601. {
  602. Block newValue = (Block)VisitNode(currentBodyValue);
  603. if (!object.ReferenceEquals(newValue, currentBodyValue))
  604. {
  605. node.Body = newValue;
  606. }
  607. }
  608. LeaveBlockExpression(node);
  609. }
  610. }
  611. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  612. public virtual bool EnterBlockExpression(Boo.Lang.Compiler.Ast.BlockExpression node)
  613. {
  614. return true;
  615. }
  616. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  617. public virtual void LeaveBlockExpression(Boo.Lang.Compiler.Ast.BlockExpression node)
  618. {
  619. }
  620. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  621. public virtual void OnMethod(Boo.Lang.Compiler.Ast.Method node)
  622. {
  623. if (EnterMethod(node))
  624. {
  625. Visit(node.Attributes);
  626. Visit(node.Parameters);
  627. Visit(node.GenericParameters);
  628. TypeReference currentReturnTypeValue = node.ReturnType;
  629. if (null != currentReturnTypeValue)
  630. {
  631. TypeReference newValue = (TypeReference)VisitNode(currentReturnTypeValue);
  632. if (!object.ReferenceEquals(newValue, currentReturnTypeValue))
  633. {
  634. node.ReturnType = newValue;
  635. }
  636. }
  637. Visit(node.ReturnTypeAttributes);
  638. Block currentBodyValue = node.Body;
  639. if (null != currentBodyValue)
  640. {
  641. Block newValue = (Block)VisitNode(currentBodyValue);
  642. if (!object.ReferenceEquals(newValue, currentBodyValue))
  643. {
  644. node.Body = newValue;
  645. }
  646. }
  647. Visit(node.Locals);
  648. ExplicitMemberInfo currentExplicitInfoValue = node.ExplicitInfo;
  649. if (null != currentExplicitInfoValue)
  650. {
  651. ExplicitMemberInfo newValue = (ExplicitMemberInfo)VisitNode(currentExplicitInfoValue);
  652. if (!object.ReferenceEquals(newValue, currentExplicitInfoValue))
  653. {
  654. node.ExplicitInfo = newValue;
  655. }
  656. }
  657. LeaveMethod(node);
  658. }
  659. }
  660. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  661. public virtual bool EnterMethod(Boo.Lang.Compiler.Ast.Method node)
  662. {
  663. return true;
  664. }
  665. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  666. public virtual void LeaveMethod(Boo.Lang.Compiler.Ast.Method node)
  667. {
  668. }
  669. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  670. public virtual void OnConstructor(Boo.Lang.Compiler.Ast.Constructor node)
  671. {
  672. if (EnterConstructor(node))
  673. {
  674. Visit(node.Attributes);
  675. Visit(node.Parameters);
  676. Visit(node.GenericParameters);
  677. TypeReference currentReturnTypeValue = node.ReturnType;
  678. if (null != currentReturnTypeValue)
  679. {
  680. TypeReference newValue = (TypeReference)VisitNode(currentReturnTypeValue);
  681. if (!object.ReferenceEquals(newValue, currentReturnTypeValue))
  682. {
  683. node.ReturnType = newValue;
  684. }
  685. }
  686. Visit(node.ReturnTypeAttributes);
  687. Block currentBodyValue = node.Body;
  688. if (null != currentBodyValue)
  689. {
  690. Block newValue = (Block)VisitNode(currentBodyValue);
  691. if (!object.ReferenceEquals(newValue, currentBodyValue))
  692. {
  693. node.Body = newValue;
  694. }
  695. }
  696. Visit(node.Locals);
  697. ExplicitMemberInfo currentExplicitInfoValue = node.ExplicitInfo;
  698. if (null != currentExplicitInfoValue)
  699. {
  700. ExplicitMemberInfo newValue = (ExplicitMemberInfo)VisitNode(currentExplicitInfoValue);
  701. if (!object.ReferenceEquals(newValue, currentExplicitInfoValue))
  702. {
  703. node.ExplicitInfo = newValue;
  704. }
  705. }
  706. LeaveConstructor(node);
  707. }
  708. }
  709. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  710. public virtual bool EnterConstructor(Boo.Lang.Compiler.Ast.Constructor node)
  711. {
  712. return true;
  713. }
  714. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  715. public virtual void LeaveConstructor(Boo.Lang.Compiler.Ast.Constructor node)
  716. {
  717. }
  718. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  719. public virtual void OnDestructor(Boo.Lang.Compiler.Ast.Destructor node)
  720. {
  721. if (EnterDestructor(node))
  722. {
  723. Visit(node.Attributes);
  724. Visit(node.Parameters);
  725. Visit(node.GenericParameters);
  726. TypeReference currentReturnTypeValue = node.ReturnType;
  727. if (null != currentReturnTypeValue)
  728. {
  729. TypeReference newValue = (TypeReference)VisitNode(currentReturnTypeValue);
  730. if (!object.ReferenceEquals(newValue, currentReturnTypeValue))
  731. {
  732. node.ReturnType = newValue;
  733. }
  734. }
  735. Visit(node.ReturnTypeAttributes);
  736. Block currentBodyValue = node.Body;
  737. if (null != currentBodyValue)
  738. {
  739. Block newValue = (Block)VisitNode(currentBodyValue);
  740. if (!object.ReferenceEquals(newValue, currentBodyValue))
  741. {
  742. node.Body = newValue;
  743. }
  744. }
  745. Visit(node.Locals);
  746. ExplicitMemberInfo currentExplicitInfoValue = node.ExplicitInfo;
  747. if (null != currentExplicitInfoValue)
  748. {
  749. ExplicitMemberInfo newValue = (ExplicitMemberInfo)VisitNode(currentExplicitInfoValue);
  750. if (!object.ReferenceEquals(newValue, currentExplicitInfoValue))
  751. {
  752. node.ExplicitInfo = newValue;
  753. }
  754. }
  755. LeaveDestructor(node);
  756. }
  757. }
  758. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  759. public virtual bool EnterDestructor(Boo.Lang.Compiler.Ast.Destructor node)
  760. {
  761. return true;
  762. }
  763. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  764. public virtual void LeaveDestructor(Boo.Lang.Compiler.Ast.Destructor node)
  765. {
  766. }
  767. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  768. public virtual void OnParameterDeclaration(Boo.Lang.Compiler.Ast.ParameterDeclaration node)
  769. {
  770. if (EnterParameterDeclaration(node))
  771. {
  772. TypeReference currentTypeValue = node.Type;
  773. if (null != currentTypeValue)
  774. {
  775. TypeReference newValue = (TypeReference)VisitNode(currentTypeValue);
  776. if (!object.ReferenceEquals(newValue, currentTypeValue))
  777. {
  778. node.Type = newValue;
  779. }
  780. }
  781. Visit(node.Attributes);
  782. LeaveParameterDeclaration(node);
  783. }
  784. }
  785. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  786. public virtual bool EnterParameterDeclaration(Boo.Lang.Compiler.Ast.ParameterDeclaration node)
  787. {
  788. return true;
  789. }
  790. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  791. public virtual void LeaveParameterDeclaration(Boo.Lang.Compiler.Ast.ParameterDeclaration node)
  792. {
  793. }
  794. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  795. public virtual void OnGenericParameterDeclaration(Boo.Lang.Compiler.Ast.GenericParameterDeclaration node)
  796. {
  797. if (EnterGenericParameterDeclaration(node))
  798. {
  799. Visit(node.BaseTypes);
  800. LeaveGenericParameterDeclaration(node);
  801. }
  802. }
  803. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  804. public virtual bool EnterGenericParameterDeclaration(Boo.Lang.Compiler.Ast.GenericParameterDeclaration node)
  805. {
  806. return true;
  807. }
  808. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  809. public virtual void LeaveGenericParameterDeclaration(Boo.Lang.Compiler.Ast.GenericParameterDeclaration node)
  810. {
  811. }
  812. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  813. public virtual void OnDeclaration(Boo.Lang.Compiler.Ast.Declaration node)
  814. {
  815. if (EnterDeclaration(node))
  816. {
  817. TypeReference currentTypeValue = node.Type;
  818. if (null != currentTypeValue)
  819. {
  820. TypeReference newValue = (TypeReference)VisitNode(currentTypeValue);
  821. if (!object.ReferenceEquals(newValue, currentTypeValue))
  822. {
  823. node.Type = newValue;
  824. }
  825. }
  826. LeaveDeclaration(node);
  827. }
  828. }
  829. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  830. public virtual bool EnterDeclaration(Boo.Lang.Compiler.Ast.Declaration node)
  831. {
  832. return true;
  833. }
  834. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  835. public virtual void LeaveDeclaration(Boo.Lang.Compiler.Ast.Declaration node)
  836. {
  837. }
  838. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  839. public virtual void OnAttribute(Boo.Lang.Compiler.Ast.Attribute node)
  840. {
  841. if (EnterAttribute(node))
  842. {
  843. Visit(node.Arguments);
  844. Visit(node.NamedArguments);
  845. LeaveAttribute(node);
  846. }
  847. }
  848. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  849. public virtual bool EnterAttribute(Boo.Lang.Compiler.Ast.Attribute node)
  850. {
  851. return true;
  852. }
  853. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  854. public virtual void LeaveAttribute(Boo.Lang.Compiler.Ast.Attribute node)
  855. {
  856. }
  857. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  858. public virtual void OnStatementModifier(Boo.Lang.Compiler.Ast.StatementModifier node)
  859. {
  860. if (EnterStatementModifier(node))
  861. {
  862. Expression currentConditionValue = node.Condition;
  863. if (null != currentConditionValue)
  864. {
  865. Expression newValue = (Expression)VisitNode(currentConditionValue);
  866. if (!object.ReferenceEquals(newValue, currentConditionValue))
  867. {
  868. node.Condition = newValue;
  869. }
  870. }
  871. LeaveStatementModifier(node);
  872. }
  873. }
  874. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  875. public virtual bool EnterStatementModifier(Boo.Lang.Compiler.Ast.StatementModifier node)
  876. {
  877. return true;
  878. }
  879. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  880. public virtual void LeaveStatementModifier(Boo.Lang.Compiler.Ast.StatementModifier node)
  881. {
  882. }
  883. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  884. public virtual void OnGotoStatement(Boo.Lang.Compiler.Ast.GotoStatement node)
  885. {
  886. if (EnterGotoStatement(node))
  887. {
  888. StatementModifier currentModifierValue = node.Modifier;
  889. if (null != currentModifierValue)
  890. {
  891. StatementModifier newValue = (StatementModifier)VisitNode(currentModifierValue);
  892. if (!object.ReferenceEquals(newValue, currentModifierValue))
  893. {
  894. node.Modifier = newValue;
  895. }
  896. }
  897. ReferenceExpression currentLabelValue = node.Label;
  898. if (null != currentLabelValue)
  899. {
  900. ReferenceExpression newValue = (ReferenceExpression)VisitNode(currentLabelValue);
  901. if (!object.ReferenceEquals(newValue, currentLabelValue))
  902. {
  903. node.Label = newValue;
  904. }
  905. }
  906. LeaveGotoStatement(node);
  907. }
  908. }
  909. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  910. public virtual bool EnterGotoStatement(Boo.Lang.Compiler.Ast.GotoStatement node)
  911. {
  912. return true;
  913. }
  914. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  915. public virtual void LeaveGotoStatement(Boo.Lang.Compiler.Ast.GotoStatement node)
  916. {
  917. }
  918. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  919. public virtual void OnLabelStatement(Boo.Lang.Compiler.Ast.LabelStatement node)
  920. {
  921. if (EnterLabelStatement(node))
  922. {
  923. StatementModifier currentModifierValue = node.Modifier;
  924. if (null != currentModifierValue)
  925. {
  926. StatementModifier newValue = (StatementModifier)VisitNode(currentModifierValue);
  927. if (!object.ReferenceEquals(newValue, currentModifierValue))
  928. {
  929. node.Modifier = newValue;
  930. }
  931. }
  932. LeaveLabelStatement(node);
  933. }
  934. }
  935. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  936. public virtual bool EnterLabelStatement(Boo.Lang.Compiler.Ast.LabelStatement node)
  937. {
  938. return true;
  939. }
  940. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  941. public virtual void LeaveLabelStatement(Boo.Lang.Compiler.Ast.LabelStatement node)
  942. {
  943. }
  944. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  945. public virtual void OnBlock(Boo.Lang.Compiler.Ast.Block node)
  946. {
  947. if (EnterBlock(node))
  948. {
  949. StatementModifier currentModifierValue = node.Modifier;
  950. if (null != currentModifierValue)
  951. {
  952. StatementModifier newValue = (StatementModifier)VisitNode(currentModifierValue);
  953. if (!object.ReferenceEquals(newValue, currentModifierValue))
  954. {
  955. node.Modifier = newValue;
  956. }
  957. }
  958. Visit(node.Statements);
  959. LeaveBlock(node);
  960. }
  961. }
  962. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  963. public virtual bool EnterBlock(Boo.Lang.Compiler.Ast.Block node)
  964. {
  965. return true;
  966. }
  967. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  968. public virtual void LeaveBlock(Boo.Lang.Compiler.Ast.Block node)
  969. {
  970. }
  971. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  972. public virtual void OnDeclarationStatement(Boo.Lang.Compiler.Ast.DeclarationStatement node)
  973. {
  974. if (EnterDeclarationStatement(node))
  975. {
  976. StatementModifier currentModifierValue = node.Modifier;
  977. if (null != currentModifierValue)
  978. {
  979. StatementModifier newValue = (StatementModifier)VisitNode(currentModifierValue);
  980. if (!object.ReferenceEquals(newValue, currentModifierValue))
  981. {
  982. node.Modifier = newValue;
  983. }
  984. }
  985. Declaration currentDeclarationValue = node.Declaration;
  986. if (null != currentDeclarationValue)
  987. {
  988. Declaration newValue = (Declaration)VisitNode(currentDeclarationValue);
  989. if (!object.ReferenceEquals(newValue, currentDeclarationValue))
  990. {
  991. node.Declaration = newValue;
  992. }
  993. }
  994. Expression currentInitializerValue = node.Initializer;
  995. if (null != currentInitializerValue)
  996. {
  997. Expression newValue = (Expression)VisitNode(currentInitializerValue);
  998. if (!object.ReferenceEquals(newValue, currentInitializerValue))
  999. {
  1000. node.Initializer = newValue;
  1001. }
  1002. }
  1003. LeaveDeclarationStatement(node);
  1004. }
  1005. }
  1006. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1007. public virtual bool EnterDeclarationStatement(Boo.Lang.Compiler.Ast.DeclarationStatement node)
  1008. {
  1009. return true;
  1010. }
  1011. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1012. public virtual void LeaveDeclarationStatement(Boo.Lang.Compiler.Ast.DeclarationStatement node)
  1013. {
  1014. }
  1015. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1016. public virtual void OnMacroStatement(Boo.Lang.Compiler.Ast.MacroStatement node)
  1017. {
  1018. if (EnterMacroStatement(node))
  1019. {
  1020. StatementModifier currentModifierValue = node.Modifier;
  1021. if (null != currentModifierValue)
  1022. {
  1023. StatementModifier newValue = (StatementModifier)VisitNode(currentModifierValue);
  1024. if (!object.ReferenceEquals(newValue, currentModifierValue))
  1025. {
  1026. node.Modifier = newValue;
  1027. }
  1028. }
  1029. Visit(node.Arguments);
  1030. Block currentBodyValue = node.Body;
  1031. if (null != currentBodyValue)
  1032. {
  1033. Block newValue = (Block)VisitNode(currentBodyValue);
  1034. if (!object.ReferenceEquals(newValue, currentBodyValue))
  1035. {
  1036. node.Body = newValue;
  1037. }
  1038. }
  1039. LeaveMacroStatement(node);
  1040. }
  1041. }
  1042. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1043. public virtual bool EnterMacroStatement(Boo.Lang.Compiler.Ast.MacroStatement node)
  1044. {
  1045. return true;
  1046. }
  1047. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1048. public virtual void LeaveMacroStatement(Boo.Lang.Compiler.Ast.MacroStatement node)
  1049. {
  1050. }
  1051. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1052. public virtual void OnTryStatement(Boo.Lang.Compiler.Ast.TryStatement node)
  1053. {
  1054. if (EnterTryStatement(node))
  1055. {
  1056. StatementModifier currentModifierValue = node.Modifier;
  1057. if (null != currentModifierValue)
  1058. {
  1059. StatementModifier newValue = (StatementModifier)VisitNode(currentModifierValue);
  1060. if (!object.ReferenceEquals(newValue, currentModifierValue))
  1061. {
  1062. node.Modifier = newValue;
  1063. }
  1064. }
  1065. Block currentProtectedBlockValue = node.ProtectedBlock;
  1066. if (null != currentProtectedBlockValue)
  1067. {
  1068. Block newValue = (Block)VisitNode(currentProtectedBlockValue);
  1069. if (!object.ReferenceEquals(newValue, currentProtectedBlockValue))
  1070. {
  1071. node.ProtectedBlock = newValue;
  1072. }
  1073. }
  1074. Visit(node.ExceptionHandlers);
  1075. Block currentFailureBlockValue = node.FailureBlock;
  1076. if (null != currentFailureBlockValue)
  1077. {
  1078. Block newValue = (Block)VisitNode(currentFailureBlockValue);
  1079. if (!object.ReferenceEquals(newValue, currentFailureBlockValue))
  1080. {
  1081. node.FailureBlock = newValue;
  1082. }
  1083. }
  1084. Block currentEnsureBlockValue = node.EnsureBlock;
  1085. if (null != currentEnsureBlockValue)
  1086. {
  1087. Block newValue = (Block)VisitNode(currentEnsureBlockValue);
  1088. if (!object.ReferenceEquals(newValue, currentEnsureBlockValue))
  1089. {
  1090. node.EnsureBlock = newValue;
  1091. }
  1092. }
  1093. LeaveTryStatement(node);
  1094. }
  1095. }
  1096. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1097. public virtual bool EnterTryStatement(Boo.Lang.Compiler.Ast.TryStatement node)
  1098. {
  1099. return true;
  1100. }
  1101. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1102. public virtual void LeaveTryStatement(Boo.Lang.Compiler.Ast.TryStatement node)
  1103. {
  1104. }
  1105. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1106. public virtual void OnExceptionHandler(Boo.Lang.Compiler.Ast.ExceptionHandler node)
  1107. {
  1108. if (EnterExceptionHandler(node))
  1109. {
  1110. Declaration currentDeclarationValue = node.Declaration;
  1111. if (null != currentDeclarationValue)
  1112. {
  1113. Declaration newValue = (Declaration)VisitNode(currentDeclarationValue);
  1114. if (!object.ReferenceEquals(newValue, currentDeclarationValue))
  1115. {
  1116. node.Declaration = newValue;
  1117. }
  1118. }
  1119. Expression currentFilterConditionValue = node.FilterCondition;
  1120. if (null != currentFilterConditionValue)
  1121. {
  1122. Expression newValue = (Expression)VisitNode(currentFilterConditionValue);
  1123. if (!object.ReferenceEquals(newValue, currentFilterConditionValue))
  1124. {
  1125. node.FilterCondition = newValue;
  1126. }
  1127. }
  1128. Block currentBlockValue = node.Block;
  1129. if (null != currentBlockValue)
  1130. {
  1131. Block newValue = (Block)VisitNode(currentBlockValue);
  1132. if (!object.ReferenceEquals(newValue, currentBlockValue))
  1133. {
  1134. node.Block = newValue;
  1135. }
  1136. }
  1137. LeaveExceptionHandler(node);
  1138. }
  1139. }
  1140. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1141. public virtual bool EnterExceptionHandler(Boo.Lang.Compiler.Ast.ExceptionHandler node)
  1142. {
  1143. return true;
  1144. }
  1145. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1146. public virtual void LeaveExceptionHandler(Boo.Lang.Compiler.Ast.ExceptionHandler node)
  1147. {
  1148. }
  1149. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1150. public virtual void OnIfStatement(Boo.Lang.Compiler.Ast.IfStatement node)
  1151. {
  1152. if (EnterIfStatement(node))
  1153. {
  1154. StatementModifier currentModifierValue = node.Modifier;
  1155. if (null != currentModifierValue)
  1156. {
  1157. StatementModifier newValue = (StatementModifier)VisitNode(currentModifierValue);
  1158. if (!object.ReferenceEquals(newValue, currentModifierValue))
  1159. {
  1160. node.Modifier = newValue;
  1161. }
  1162. }
  1163. Expression currentConditionValue = node.Condition;
  1164. if (null != currentConditionValue)
  1165. {
  1166. Expression newValue = (Expression)VisitNode(currentConditionValue);
  1167. if (!object.ReferenceEquals(newValue, currentConditionValue))
  1168. {
  1169. node.Condition = newValue;
  1170. }
  1171. }
  1172. Block currentTrueBlockValue = node.TrueBlock;
  1173. if (null != currentTrueBlockValue)
  1174. {
  1175. Block newValue = (Block)VisitNode(currentTrueBlockValue);
  1176. if (!object.ReferenceEquals(newValue, currentTrueBlockValue))
  1177. {
  1178. node.TrueBlock = newValue;
  1179. }
  1180. }
  1181. Block currentFalseBlockValue = node.FalseBlock;
  1182. if (null != currentFalseBlockValue)
  1183. {
  1184. Block newValue = (Block)VisitNode(currentFalseBlockValue);
  1185. if (!object.ReferenceEquals(newValue, currentFalseBlockValue))
  1186. {
  1187. node.FalseBlock = newValue;
  1188. }
  1189. }
  1190. LeaveIfStatement(node);
  1191. }
  1192. }
  1193. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1194. public virtual bool EnterIfStatement(Boo.Lang.Compiler.Ast.IfStatement node)
  1195. {
  1196. return true;
  1197. }
  1198. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1199. public virtual void LeaveIfStatement(Boo.Lang.Compiler.Ast.IfStatement node)
  1200. {
  1201. }
  1202. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1203. public virtual void OnUnlessStatement(Boo.Lang.Compiler.Ast.UnlessStatement node)
  1204. {
  1205. if (EnterUnlessStatement(node))
  1206. {
  1207. StatementModifier currentModifierValue = node.Modifier;
  1208. if (null != currentModifierValue)
  1209. {
  1210. StatementModifier newValue = (StatementModifier)VisitNode(currentModifierValue);
  1211. if (!object.ReferenceEquals(newValue, currentModifierValue))
  1212. {
  1213. node.Modifier = newValue;
  1214. }
  1215. }
  1216. Expression currentConditionValue = node.Condition;
  1217. if (null != currentConditionValue)
  1218. {
  1219. Expression newValue = (Expression)VisitNode(currentConditionValue);
  1220. if (!object.ReferenceEquals(newValue, currentConditionValue))
  1221. {
  1222. node.Condition = newValue;
  1223. }
  1224. }
  1225. Block currentBlockValue = node.Block;
  1226. if (null != currentBlockValue)
  1227. {
  1228. Block newValue = (Block)VisitNode(currentBlockValue);
  1229. if (!object.ReferenceEquals(newValue, currentBlockValue))
  1230. {
  1231. node.Block = newValue;
  1232. }
  1233. }
  1234. LeaveUnlessStatement(node);
  1235. }
  1236. }
  1237. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1238. public virtual bool EnterUnlessStatement(Boo.Lang.Compiler.Ast.UnlessStatement node)
  1239. {
  1240. return true;
  1241. }
  1242. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1243. public virtual void LeaveUnlessStatement(Boo.Lang.Compiler.Ast.UnlessStatement node)
  1244. {
  1245. }
  1246. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1247. public virtual void OnForStatement(Boo.Lang.Compiler.Ast.ForStatement node)
  1248. {
  1249. if (EnterForStatement(node))
  1250. {
  1251. StatementModifier currentModifierValue = node.Modifier;
  1252. if (null != currentModifierValue)
  1253. {
  1254. StatementModifier newValue = (StatementModifier)VisitNode(currentModifierValue);
  1255. if (!object.ReferenceEquals(newValue, currentModifierValue))
  1256. {
  1257. node.Modifier = newValue;
  1258. }
  1259. }
  1260. Visit(node.Declarations);
  1261. Expression currentIteratorValue = node.Iterator;
  1262. if (null != currentIteratorValue)
  1263. {
  1264. Expression newValue = (Expression)VisitNode(currentIteratorValue);
  1265. if (!object.ReferenceEquals(newValue, currentIteratorValue))
  1266. {
  1267. node.Iterator = newValue;
  1268. }
  1269. }
  1270. Block currentBlockValue = node.Block;
  1271. if (null != currentBlockValue)
  1272. {
  1273. Block newValue = (Block)VisitNode(currentBlockValue);
  1274. if (!object.ReferenceEquals(newValue, currentBlockValue))
  1275. {
  1276. node.Block = newValue;
  1277. }
  1278. }
  1279. Block currentOrBlockValue = node.OrBlock;
  1280. if (null != currentOrBlockValue)
  1281. {
  1282. Block newValue = (Block)VisitNode(currentOrBlockValue);
  1283. if (!object.ReferenceEquals(newValue, currentOrBlockValue))
  1284. {
  1285. node.OrBlock = newValue;
  1286. }
  1287. }
  1288. Block currentThenBlockValue = node.ThenBlock;
  1289. if (null != currentThenBlockValue)
  1290. {
  1291. Block newValue = (Block)VisitNode(currentThenBlockValue);
  1292. if (!object.ReferenceEquals(newValue, currentThenBlockValue))
  1293. {
  1294. node.ThenBlock = newValue;
  1295. }
  1296. }
  1297. LeaveForStatement(node);
  1298. }
  1299. }
  1300. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1301. public virtual bool EnterForStatement(Boo.Lang.Compiler.Ast.ForStatement node)
  1302. {
  1303. return true;
  1304. }
  1305. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1306. public virtual void LeaveForStatement(Boo.Lang.Compiler.Ast.ForStatement node)
  1307. {
  1308. }
  1309. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1310. public virtual void OnWhileStatement(Boo.Lang.Compiler.Ast.WhileStatement node)
  1311. {
  1312. if (EnterWhileStatement(node))
  1313. {
  1314. StatementModifier currentModifierValue = node.Modifier;
  1315. if (null != currentModifierValue)
  1316. {
  1317. StatementModifier newValue = (StatementModifier)VisitNode(currentModifierValue);
  1318. if (!object.ReferenceEquals(newValue, currentModifierValue))
  1319. {
  1320. node.Modifier = newValue;
  1321. }
  1322. }
  1323. Expression currentConditionValue = node.Condition;
  1324. if (null != currentConditionValue)
  1325. {
  1326. Expression newValue = (Expression)VisitNode(currentConditionValue);
  1327. if (!object.ReferenceEquals(newValue, currentConditionValue))
  1328. {
  1329. node.Condition = newValue;
  1330. }
  1331. }
  1332. Block currentBlockValue = node.Block;
  1333. if (null != currentBlockValue)
  1334. {
  1335. Block newValue = (Block)VisitNode(currentBlockValue);
  1336. if (!object.ReferenceEquals(newValue, currentBlockValue))
  1337. {
  1338. node.Block = newValue;
  1339. }
  1340. }
  1341. Block currentOrBlockValue = node.OrBlock;
  1342. if (null != currentOrBlockValue)
  1343. {
  1344. Block newValue = (Block)VisitNode(currentOrBlockValue);
  1345. if (!object.ReferenceEquals(newValue, currentOrBlockValue))
  1346. {
  1347. node.OrBlock = newValue;
  1348. }
  1349. }
  1350. Block currentThenBlockValue = node.ThenBlock;
  1351. if (null != currentThenBlockValue)
  1352. {
  1353. Block newValue = (Block)VisitNode(currentThenBlockValue);
  1354. if (!object.ReferenceEquals(newValue, currentThenBlockValue))
  1355. {
  1356. node.ThenBlock = newValue;
  1357. }
  1358. }
  1359. LeaveWhileStatement(node);
  1360. }
  1361. }
  1362. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1363. public virtual bool EnterWhileStatement(Boo.Lang.Compiler.Ast.WhileStatement node)
  1364. {
  1365. return true;
  1366. }
  1367. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1368. public virtual void LeaveWhileStatement(Boo.Lang.Compiler.Ast.WhileStatement node)
  1369. {
  1370. }
  1371. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1372. public virtual void OnBreakStatement(Boo.Lang.Compiler.Ast.BreakStatement node)
  1373. {
  1374. if (EnterBreakStatement(node))
  1375. {
  1376. StatementModifier currentModifierValue = node.Modifier;
  1377. if (null != currentModifierValue)
  1378. {
  1379. StatementModifier newValue = (StatementModifier)VisitNode(currentModifierValue);
  1380. if (!object.ReferenceEquals(newValue, currentModifierValue))
  1381. {
  1382. node.Modifier = newValue;
  1383. }
  1384. }
  1385. LeaveBreakStatement(node);
  1386. }
  1387. }
  1388. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1389. public virtual bool EnterBreakStatement(Boo.Lang.Compiler.Ast.BreakStatement node)
  1390. {
  1391. return true;
  1392. }
  1393. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1394. public virtual void LeaveBreakStatement(Boo.Lang.Compiler.Ast.BreakStatement node)
  1395. {
  1396. }
  1397. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1398. public virtual void OnContinueStatement(Boo.Lang.Compiler.Ast.ContinueStatement node)
  1399. {
  1400. if (EnterContinueStatement(node))
  1401. {
  1402. StatementModifier currentModifierValue = node.Modifier;
  1403. if (null != currentModifierValue)
  1404. {
  1405. StatementModifier newValue = (StatementModifier)VisitNode(currentModifierValue);
  1406. if (!object.ReferenceEquals(newValue, currentModifierValue))
  1407. {
  1408. node.Modifier = newValue;
  1409. }
  1410. }
  1411. LeaveContinueStatement(node);
  1412. }
  1413. }
  1414. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1415. public virtual bool EnterContinueStatement(Boo.Lang.Compiler.Ast.ContinueStatement node)
  1416. {
  1417. return true;
  1418. }
  1419. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1420. public virtual void LeaveContinueStatement(Boo.Lang.Compiler.Ast.ContinueStatement node)
  1421. {
  1422. }
  1423. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1424. public virtual void OnReturnStatement(Boo.Lang.Compiler.Ast.ReturnStatement node)
  1425. {
  1426. if (EnterReturnStatement(node))
  1427. {
  1428. StatementModifier currentModifierValue = node.Modifier;
  1429. if (null != currentModifierValue)
  1430. {
  1431. StatementModifier newValue = (StatementModifier)VisitNode(currentModifierValue);
  1432. if (!object.ReferenceEquals(newValue, currentModifierValue))
  1433. {
  1434. node.Modifier = newValue;
  1435. }
  1436. }
  1437. Expression currentExpressionValue = node.Expression;
  1438. if (null != currentExpressionValue)
  1439. {
  1440. Expression newValue = (Expression)VisitNode(currentExpressionValue);
  1441. if (!object.ReferenceEquals(newValue, currentExpressionValue))
  1442. {
  1443. node.Expression = newValue;
  1444. }
  1445. }
  1446. LeaveReturnStatement(node);
  1447. }
  1448. }
  1449. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1450. public virtual bool EnterReturnStatement(Boo.Lang.Compiler.Ast.ReturnStatement node)
  1451. {
  1452. return true;
  1453. }
  1454. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1455. public virtual void LeaveReturnStatement(Boo.Lang.Compiler.Ast.ReturnStatement node)
  1456. {
  1457. }
  1458. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1459. public virtual void OnYieldStatement(Boo.Lang.Compiler.Ast.YieldStatement node)
  1460. {
  1461. if (EnterYieldStatement(node))
  1462. {
  1463. StatementModifier currentModifierValue = node.Modifier;
  1464. if (null != currentModifierValue)
  1465. {
  1466. StatementModifier newValue = (StatementModifier)VisitNode(currentModifierValue);
  1467. if (!object.ReferenceEquals(newValue, currentModifierValue))
  1468. {
  1469. node.Modifier = newValue;
  1470. }
  1471. }
  1472. Expression currentExpressionValue = node.Expression;
  1473. if (null != currentExpressionValue)
  1474. {
  1475. Expression newValue = (Expression)VisitNode(currentExpressionValue)

Large files files are truncated, but you can click here to view the full file