PageRenderTime 57ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 1ms

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

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

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