PageRenderTime 30ms CodeModel.GetById 31ms 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
  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. {
  1478. StatementModifier newValue = (StatementModifier)VisitNode(currentModifierValue);
  1479. if (!object.ReferenceEquals(newValue, currentModifierValue))
  1480. {
  1481. node.Modifier = newValue;
  1482. }
  1483. }
  1484. Visit(node.Declarations);
  1485. Expression currentExpressionValue = node.Expression;
  1486. if (null != currentExpressionValue)
  1487. {
  1488. Expression newValue = (Expression)VisitNode(currentExpressionValue);
  1489. if (!object.ReferenceEquals(newValue, currentExpressionValue))
  1490. {
  1491. node.Expression = newValue;
  1492. }
  1493. }
  1494. LeaveUnpackStatement(node);
  1495. }
  1496. }
  1497. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1498. public virtual bool EnterUnpackStatement(Boo.Lang.Compiler.Ast.UnpackStatement node)
  1499. {
  1500. return true;
  1501. }
  1502. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1503. public virtual void LeaveUnpackStatement(Boo.Lang.Compiler.Ast.UnpackStatement node)
  1504. {
  1505. }
  1506. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1507. public virtual void OnExpressionStatement(Boo.Lang.Compiler.Ast.ExpressionStatement node)
  1508. {
  1509. if (EnterExpressionStatement(node))
  1510. {
  1511. StatementModifier currentModifierValue = node.Modifier;
  1512. if (null != currentModifierValue)
  1513. {
  1514. StatementModifier newValue = (StatementModifier)VisitNode(currentModifierValue);
  1515. if (!object.ReferenceEquals(newValue, currentModifierValue))
  1516. {
  1517. node.Modifier = newValue;
  1518. }
  1519. }
  1520. Expression currentExpressionValue = node.Expression;
  1521. if (null != currentExpressionValue)
  1522. {
  1523. Expression newValue = (Expression)VisitNode(currentExpressionValue);
  1524. if (!object.ReferenceEquals(newValue, currentExpressionValue))
  1525. {
  1526. node.Expression = newValue;
  1527. }
  1528. }
  1529. LeaveExpressionStatement(node);
  1530. }
  1531. }
  1532. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1533. public virtual bool EnterExpressionStatement(Boo.Lang.Compiler.Ast.ExpressionStatement node)
  1534. {
  1535. return true;
  1536. }
  1537. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1538. public virtual void LeaveExpressionStatement(Boo.Lang.Compiler.Ast.ExpressionStatement node)
  1539. {
  1540. }
  1541. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1542. public virtual void OnOmittedExpression(Boo.Lang.Compiler.Ast.OmittedExpression node)
  1543. {
  1544. }
  1545. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1546. public virtual void OnExpressionPair(Boo.Lang.Compiler.Ast.ExpressionPair node)
  1547. {
  1548. if (EnterExpressionPair(node))
  1549. {
  1550. Expression currentFirstValue = node.First;
  1551. if (null != currentFirstValue)
  1552. {
  1553. Expression newValue = (Expression)VisitNode(currentFirstValue);
  1554. if (!object.ReferenceEquals(newValue, currentFirstValue))
  1555. {
  1556. node.First = newValue;
  1557. }
  1558. }
  1559. Expression currentSecondValue = node.Second;
  1560. if (null != currentSecondValue)
  1561. {
  1562. Expression newValue = (Expression)VisitNode(currentSecondValue);
  1563. if (!object.ReferenceEquals(newValue, currentSecondValue))
  1564. {
  1565. node.Second = newValue;
  1566. }
  1567. }
  1568. LeaveExpressionPair(node);
  1569. }
  1570. }
  1571. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1572. public virtual bool EnterExpressionPair(Boo.Lang.Compiler.Ast.ExpressionPair node)
  1573. {
  1574. return true;
  1575. }
  1576. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1577. public virtual void LeaveExpressionPair(Boo.Lang.Compiler.Ast.ExpressionPair node)
  1578. {
  1579. }
  1580. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1581. public virtual void OnMethodInvocationExpression(Boo.Lang.Compiler.Ast.MethodInvocationExpression node)
  1582. {
  1583. if (EnterMethodInvocationExpression(node))
  1584. {
  1585. Expression currentTargetValue = node.Target;
  1586. if (null != currentTargetValue)
  1587. {
  1588. Expression newValue = (Expression)VisitNode(currentTargetValue);
  1589. if (!object.ReferenceEquals(newValue, currentTargetValue))
  1590. {
  1591. node.Target = newValue;
  1592. }
  1593. }
  1594. Visit(node.Arguments);
  1595. Visit(node.NamedArguments);
  1596. LeaveMethodInvocationExpression(node);
  1597. }
  1598. }
  1599. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1600. public virtual bool EnterMethodInvocationExpression(Boo.Lang.Compiler.Ast.MethodInvocationExpression node)
  1601. {
  1602. return true;
  1603. }
  1604. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1605. public virtual void LeaveMethodInvocationExpression(Boo.Lang.Compiler.Ast.MethodInvocationExpression node)
  1606. {
  1607. }
  1608. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1609. public virtual void OnUnaryExpression(Boo.Lang.Compiler.Ast.UnaryExpression node)
  1610. {
  1611. if (EnterUnaryExpression(node))
  1612. {
  1613. Expression currentOperandValue = node.Operand;
  1614. if (null != currentOperandValue)
  1615. {
  1616. Expression newValue = (Expression)VisitNode(currentOperandValue);
  1617. if (!object.ReferenceEquals(newValue, currentOperandValue))
  1618. {
  1619. node.Operand = newValue;
  1620. }
  1621. }
  1622. LeaveUnaryExpression(node);
  1623. }
  1624. }
  1625. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1626. public virtual bool EnterUnaryExpression(Boo.Lang.Compiler.Ast.UnaryExpression node)
  1627. {
  1628. return true;
  1629. }
  1630. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1631. public virtual void LeaveUnaryExpression(Boo.Lang.Compiler.Ast.UnaryExpression node)
  1632. {
  1633. }
  1634. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1635. public virtual void OnBinaryExpression(Boo.Lang.Compiler.Ast.BinaryExpression node)
  1636. {
  1637. if (EnterBinaryExpression(node))
  1638. {
  1639. Expression currentLeftValue = node.Left;
  1640. if (null != currentLeftValue)
  1641. {
  1642. Expression newValue = (Expression)VisitNode(currentLeftValue);
  1643. if (!object.ReferenceEquals(newValue, currentLeftValue))
  1644. {
  1645. node.Left = newValue;
  1646. }
  1647. }
  1648. Expression currentRightValue = node.Right;
  1649. if (null != currentRightValue)
  1650. {
  1651. Expression newValue = (Expression)VisitNode(currentRightValue);
  1652. if (!object.ReferenceEquals(newValue, currentRightValue))
  1653. {
  1654. node.Right = newValue;
  1655. }
  1656. }
  1657. LeaveBinaryExpression(node);
  1658. }
  1659. }
  1660. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1661. public virtual bool EnterBinaryExpression(Boo.Lang.Compiler.Ast.BinaryExpression node)
  1662. {
  1663. return true;
  1664. }
  1665. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1666. public virtual void LeaveBinaryExpression(Boo.Lang.Compiler.Ast.BinaryExpression node)
  1667. {
  1668. }
  1669. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1670. public virtual void OnConditionalExpression(Boo.Lang.Compiler.Ast.ConditionalExpression node)
  1671. {
  1672. if (EnterConditionalExpression(node))
  1673. {
  1674. Expression currentConditionValue = node.Condition;
  1675. if (null != currentConditionValue)
  1676. {
  1677. Expression newValue = (Expression)VisitNode(currentConditionValue);
  1678. if (!object.ReferenceEquals(newValue, currentConditionValue))
  1679. {
  1680. node.Condition = newValue;
  1681. }
  1682. }
  1683. Expression currentTrueValueValue = node.TrueValue;
  1684. if (null != currentTrueValueValue)
  1685. {
  1686. Expression newValue = (Expression)VisitNode(currentTrueValueValue);
  1687. if (!object.ReferenceEquals(newValue, currentTrueValueValue))
  1688. {
  1689. node.TrueValue = newValue;
  1690. }
  1691. }
  1692. Expression currentFalseValueValue = node.FalseValue;
  1693. if (null != currentFalseValueValue)
  1694. {
  1695. Expression newValue = (Expression)VisitNode(currentFalseValueValue);
  1696. if (!object.ReferenceEquals(newValue, currentFalseValueValue))
  1697. {
  1698. node.FalseValue = newValue;
  1699. }
  1700. }
  1701. LeaveConditionalExpression(node);
  1702. }
  1703. }
  1704. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1705. public virtual bool EnterConditionalExpression(Boo.Lang.Compiler.Ast.ConditionalExpression node)
  1706. {
  1707. return true;
  1708. }
  1709. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1710. public virtual void LeaveConditionalExpression(Boo.Lang.Compiler.Ast.ConditionalExpression node)
  1711. {
  1712. }
  1713. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1714. public virtual void OnReferenceExpression(Boo.Lang.Compiler.Ast.ReferenceExpression node)
  1715. {
  1716. }
  1717. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1718. public virtual void OnMemberReferenceExpression(Boo.Lang.Compiler.Ast.MemberReferenceExpression node)
  1719. {
  1720. if (EnterMemberReferenceExpression(node))
  1721. {
  1722. Expression currentTargetValue = node.Target;
  1723. if (null != currentTargetValue)
  1724. {
  1725. Expression newValue = (Expression)VisitNode(currentTargetValue);
  1726. if (!object.ReferenceEquals(newValue, currentTargetValue))
  1727. {
  1728. node.Target = newValue;
  1729. }
  1730. }
  1731. LeaveMemberReferenceExpression(node);
  1732. }
  1733. }
  1734. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1735. public virtual bool EnterMemberReferenceExpression(Boo.Lang.Compiler.Ast.MemberReferenceExpression node)
  1736. {
  1737. return true;
  1738. }
  1739. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1740. public virtual void LeaveMemberReferenceExpression(Boo.Lang.Compiler.Ast.MemberReferenceExpression node)
  1741. {
  1742. }
  1743. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1744. public virtual void OnGenericReferenceExpression(Boo.Lang.Compiler.Ast.GenericReferenceExpression node)
  1745. {
  1746. if (EnterGenericReferenceExpression(node))
  1747. {
  1748. Expression currentTargetValue = node.Target;
  1749. if (null != currentTargetValue)
  1750. {
  1751. Expression newValue = (Expression)VisitNode(currentTargetValue);
  1752. if (!object.ReferenceEquals(newValue, currentTargetValue))
  1753. {
  1754. node.Target = newValue;
  1755. }
  1756. }
  1757. Visit(node.GenericArguments);
  1758. LeaveGenericReferenceExpression(node);
  1759. }
  1760. }
  1761. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1762. public virtual bool EnterGenericReferenceExpression(Boo.Lang.Compiler.Ast.GenericReferenceExpression node)
  1763. {
  1764. return true;
  1765. }
  1766. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1767. public virtual void LeaveGenericReferenceExpression(Boo.Lang.Compiler.Ast.GenericReferenceExpression node)
  1768. {
  1769. }
  1770. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1771. public virtual void OnQuasiquoteExpression(Boo.Lang.Compiler.Ast.QuasiquoteExpression node)
  1772. {
  1773. }
  1774. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1775. public virtual void OnStringLiteralExpression(Boo.Lang.Compiler.Ast.StringLiteralExpression node)
  1776. {
  1777. }
  1778. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1779. public virtual void OnCharLiteralExpression(Boo.Lang.Compiler.Ast.CharLiteralExpression node)
  1780. {
  1781. }
  1782. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1783. public virtual void OnTimeSpanLiteralExpression(Boo.Lang.Compiler.Ast.TimeSpanLiteralExpression node)
  1784. {
  1785. }
  1786. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1787. public virtual void OnIntegerLiteralExpression(Boo.Lang.Compiler.Ast.IntegerLiteralExpression node)
  1788. {
  1789. }
  1790. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1791. public virtual void OnDoubleLiteralExpression(Boo.Lang.Compiler.Ast.DoubleLiteralExpression node)
  1792. {
  1793. }
  1794. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1795. public virtual void OnNullLiteralExpression(Boo.Lang.Compiler.Ast.NullLiteralExpression node)
  1796. {
  1797. }
  1798. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1799. public virtual void OnSelfLiteralExpression(Boo.Lang.Compiler.Ast.SelfLiteralExpression node)
  1800. {
  1801. }
  1802. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1803. public virtual void OnSuperLiteralExpression(Boo.Lang.Compiler.Ast.SuperLiteralExpression node)
  1804. {
  1805. }
  1806. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1807. public virtual void OnBoolLiteralExpression(Boo.Lang.Compiler.Ast.BoolLiteralExpression node)
  1808. {
  1809. }
  1810. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1811. public virtual void OnRELiteralExpression(Boo.Lang.Compiler.Ast.RELiteralExpression node)
  1812. {
  1813. }
  1814. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1815. public virtual void OnSpliceExpression(Boo.Lang.Compiler.Ast.SpliceExpression node)
  1816. {
  1817. if (EnterSpliceExpression(node))
  1818. {
  1819. Expression currentExpressionValue = node.Expression;
  1820. if (null != currentExpressionValue)
  1821. {
  1822. Expression newValue = (Expression)VisitNode(currentExpressionValue);
  1823. if (!object.ReferenceEquals(newValue, currentExpressionValue))
  1824. {
  1825. node.Expression = newValue;
  1826. }
  1827. }
  1828. LeaveSpliceExpression(node);
  1829. }
  1830. }
  1831. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1832. public virtual bool EnterSpliceExpression(Boo.Lang.Compiler.Ast.SpliceExpression node)
  1833. {
  1834. return true;
  1835. }
  1836. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1837. public virtual void LeaveSpliceExpression(Boo.Lang.Compiler.Ast.SpliceExpression node)
  1838. {
  1839. }
  1840. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1841. public virtual void OnSpliceTypeReference(Boo.Lang.Compiler.Ast.SpliceTypeReference node)
  1842. {
  1843. if (EnterSpliceTypeReference(node))
  1844. {
  1845. Expression currentExpressionValue = node.Expression;
  1846. if (null != currentExpressionValue)
  1847. {
  1848. Expression newValue = (Expression)VisitNode(currentExpressionValue);
  1849. if (!object.ReferenceEquals(newValue, currentExpressionValue))
  1850. {
  1851. node.Expression = newValue;
  1852. }
  1853. }
  1854. LeaveSpliceTypeReference(node);
  1855. }
  1856. }
  1857. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1858. public virtual bool EnterSpliceTypeReference(Boo.Lang.Compiler.Ast.SpliceTypeReference node)
  1859. {
  1860. return true;
  1861. }
  1862. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1863. public virtual void LeaveSpliceTypeReference(Boo.Lang.Compiler.Ast.SpliceTypeReference node)
  1864. {
  1865. }
  1866. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1867. public virtual void OnSpliceMemberReferenceExpression(Boo.Lang.Compiler.Ast.SpliceMemberReferenceExpression node)
  1868. {
  1869. if (EnterSpliceMemberReferenceExpression(node))
  1870. {
  1871. Expression currentTargetValue = node.Target;
  1872. if (null != currentTargetValue)
  1873. {
  1874. Expression newValue = (Expression)VisitNode(currentTargetValue);
  1875. if (!object.ReferenceEquals(newValue, currentTargetValue))
  1876. {
  1877. node.Target = newValue;
  1878. }
  1879. }
  1880. Expression currentNameExpressionValue = node.NameExpression;
  1881. if (null != currentNameExpressionValue)
  1882. {
  1883. Expression newValue = (Expression)VisitNode(currentNameExpressionValue);
  1884. if (!object.ReferenceEquals(newValue, currentNameExpressionValue))
  1885. {
  1886. node.NameExpression = newValue;
  1887. }
  1888. }
  1889. LeaveSpliceMemberReferenceExpression(node);
  1890. }
  1891. }
  1892. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1893. public virtual bool EnterSpliceMemberReferenceExpression(Boo.Lang.Compiler.Ast.SpliceMemberReferenceExpression node)
  1894. {
  1895. return true;
  1896. }
  1897. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1898. public virtual void LeaveSpliceMemberReferenceExpression(Boo.Lang.Compiler.Ast.SpliceMemberReferenceExpression node)
  1899. {
  1900. }
  1901. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1902. public virtual void OnSpliceTypeMember(Boo.Lang.Compiler.Ast.SpliceTypeMember node)
  1903. {
  1904. if (EnterSpliceTypeMember(node))
  1905. {
  1906. Visit(node.Attributes);
  1907. TypeMember currentTypeMemberValue = node.TypeMember;
  1908. if (null != currentTypeMemberValue)
  1909. {
  1910. TypeMember newValue = (TypeMember)VisitNode(currentTypeMemberValue);
  1911. if (!object.ReferenceEquals(newValue, currentTypeMemberValue))
  1912. {
  1913. node.TypeMember = newValue;
  1914. }
  1915. }
  1916. Expression currentNameExpressionValue = node.NameExpression;
  1917. if (null != currentNameExpressionValue)
  1918. {
  1919. Expression newValue = (Expression)VisitNode(currentNameExpressionValue);
  1920. if (!object.ReferenceEquals(newValue, currentNameExpressionValue))
  1921. {
  1922. node.NameExpression = newValue;
  1923. }
  1924. }
  1925. LeaveSpliceTypeMember(node);
  1926. }
  1927. }
  1928. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1929. public virtual bool EnterSpliceTypeMember(Boo.Lang.Compiler.Ast.SpliceTypeMember node)
  1930. {
  1931. return true;
  1932. }
  1933. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1934. public virtual void LeaveSpliceTypeMember(Boo.Lang.Compiler.Ast.SpliceTypeMember node)
  1935. {
  1936. }
  1937. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1938. public virtual void OnSpliceParameterDeclaration(Boo.Lang.Compiler.Ast.SpliceParameterDeclaration node)
  1939. {
  1940. if (EnterSpliceParameterDeclaration(node))
  1941. {
  1942. TypeReference currentTypeValue = node.Type;
  1943. if (null != currentTypeValue)
  1944. {
  1945. TypeReference newValue = (TypeReference)VisitNode(currentTypeValue);
  1946. if (!object.ReferenceEquals(newValue, currentTypeValue))
  1947. {
  1948. node.Type = newValue;
  1949. }
  1950. }
  1951. Visit(node.Attributes);
  1952. ParameterDeclaration currentParameterDeclarationValue = node.ParameterDeclaration;
  1953. if (null != currentParameterDeclarationValue)
  1954. {
  1955. ParameterDeclaration newValue = (ParameterDeclaration)VisitNode(currentParameterDeclarationValue);
  1956. if (!object.ReferenceEquals(newValue, currentParameterDeclarationValue))
  1957. {
  1958. node.ParameterDeclaration = newValue;
  1959. }
  1960. }
  1961. Expression currentNameExpressionValue = node.NameExpression;
  1962. if (null != currentNameExpressionValue)
  1963. {
  1964. Expression newValue = (Expression)VisitNode(currentNameExpressionValue);
  1965. if (!object.ReferenceEquals(newValue, currentNameExpressionValue))
  1966. {
  1967. node.NameExpression = newValue;
  1968. }
  1969. }
  1970. LeaveSpliceParameterDeclaration(node);
  1971. }
  1972. }
  1973. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1974. public virtual bool EnterSpliceParameterDeclaration(Boo.Lang.Compiler.Ast.SpliceParameterDeclaration node)
  1975. {
  1976. return true;
  1977. }
  1978. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1979. public virtual void LeaveSpliceParameterDeclaration(Boo.Lang.Compiler.Ast.SpliceParameterDeclaration node)
  1980. {
  1981. }
  1982. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1983. public virtual void OnExpressionInterpolationExpression(Boo.Lang.Compiler.Ast.ExpressionInterpolationExpression node)
  1984. {
  1985. if (EnterExpressionInterpolationExpression(node))
  1986. {
  1987. Visit(node.Expressions);
  1988. LeaveExpressionInterpolationExpression(node);
  1989. }
  1990. }
  1991. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1992. public virtual bool EnterExpressionInterpolationExpression(Boo.Lang.Compiler.Ast.ExpressionInterpolationExpression node)
  1993. {
  1994. return true;
  1995. }
  1996. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  1997. public virtual void LeaveExpressionInterpolationExpression(Boo.Lang.Compiler.Ast.ExpressionInterpolationExpression node)
  1998. {
  1999. }
  2000. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2001. public virtual void OnHashLiteralExpression(Boo.Lang.Compiler.Ast.HashLiteralExpression node)
  2002. {
  2003. if (EnterHashLiteralExpression(node))
  2004. {
  2005. Visit(node.Items);
  2006. LeaveHashLiteralExpression(node);
  2007. }
  2008. }
  2009. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2010. public virtual bool EnterHashLiteralExpression(Boo.Lang.Compiler.Ast.HashLiteralExpression node)
  2011. {
  2012. return true;
  2013. }
  2014. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2015. public virtual void LeaveHashLiteralExpression(Boo.Lang.Compiler.Ast.HashLiteralExpression node)
  2016. {
  2017. }
  2018. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2019. public virtual void OnListLiteralExpression(Boo.Lang.Compiler.Ast.ListLiteralExpression node)
  2020. {
  2021. if (EnterListLiteralExpression(node))
  2022. {
  2023. Visit(node.Items);
  2024. LeaveListLiteralExpression(node);
  2025. }
  2026. }
  2027. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2028. public virtual bool EnterListLiteralExpression(Boo.Lang.Compiler.Ast.ListLiteralExpression node)
  2029. {
  2030. return true;
  2031. }
  2032. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2033. public virtual void LeaveListLiteralExpression(Boo.Lang.Compiler.Ast.ListLiteralExpression node)
  2034. {
  2035. }
  2036. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2037. public virtual void OnArrayLiteralExpression(Boo.Lang.Compiler.Ast.ArrayLiteralExpression node)
  2038. {
  2039. if (EnterArrayLiteralExpression(node))
  2040. {
  2041. Visit(node.Items);
  2042. ArrayTypeReference currentTypeValue = node.Type;
  2043. if (null != currentTypeValue)
  2044. {
  2045. ArrayTypeReference newValue = (ArrayTypeReference)VisitNode(currentTypeValue);
  2046. if (!object.ReferenceEquals(newValue, currentTypeValue))
  2047. {
  2048. node.Type = newValue;
  2049. }
  2050. }
  2051. LeaveArrayLiteralExpression(node);
  2052. }
  2053. }
  2054. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2055. public virtual bool EnterArrayLiteralExpression(Boo.Lang.Compiler.Ast.ArrayLiteralExpression node)
  2056. {
  2057. return true;
  2058. }
  2059. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2060. public virtual void LeaveArrayLiteralExpression(Boo.Lang.Compiler.Ast.ArrayLiteralExpression node)
  2061. {
  2062. }
  2063. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2064. public virtual void OnGeneratorExpression(Boo.Lang.Compiler.Ast.GeneratorExpression node)
  2065. {
  2066. if (EnterGeneratorExpression(node))
  2067. {
  2068. Expression currentExpressionValue = node.Expression;
  2069. if (null != currentExpressionValue)
  2070. {
  2071. Expression newValue = (Expression)VisitNode(currentExpressionValue);
  2072. if (!object.ReferenceEquals(newValue, currentExpressionValue))
  2073. {
  2074. node.Expression = newValue;
  2075. }
  2076. }
  2077. Visit(node.Declarations);
  2078. Expression currentIteratorValue = node.Iterator;
  2079. if (null != currentIteratorValue)
  2080. {
  2081. Expression newValue = (Expression)VisitNode(currentIteratorValue);
  2082. if (!object.ReferenceEquals(newValue, currentIteratorValue))
  2083. {
  2084. node.Iterator = newValue;
  2085. }
  2086. }
  2087. StatementModifier currentFilterValue = node.Filter;
  2088. if (null != currentFilterValue)
  2089. {
  2090. StatementModifier newValue = (StatementModifier)VisitNode(currentFilterValue);
  2091. if (!object.ReferenceEquals(newValue, currentFilterValue))
  2092. {
  2093. node.Filter = newValue;
  2094. }
  2095. }
  2096. LeaveGeneratorExpression(node);
  2097. }
  2098. }
  2099. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2100. public virtual bool EnterGeneratorExpression(Boo.Lang.Compiler.Ast.GeneratorExpression node)
  2101. {
  2102. return true;
  2103. }
  2104. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2105. public virtual void LeaveGeneratorExpression(Boo.Lang.Compiler.Ast.GeneratorExpression node)
  2106. {
  2107. }
  2108. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2109. public virtual void OnExtendedGeneratorExpression(Boo.Lang.Compiler.Ast.ExtendedGeneratorExpression node)
  2110. {
  2111. if (EnterExtendedGeneratorExpression(node))
  2112. {
  2113. Visit(node.Items);
  2114. LeaveExtendedGeneratorExpression(node);
  2115. }
  2116. }
  2117. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2118. public virtual bool EnterExtendedGeneratorExpression(Boo.Lang.Compiler.Ast.ExtendedGeneratorExpression node)
  2119. {
  2120. return true;
  2121. }
  2122. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2123. public virtual void LeaveExtendedGeneratorExpression(Boo.Lang.Compiler.Ast.ExtendedGeneratorExpression node)
  2124. {
  2125. }
  2126. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2127. public virtual void OnSlice(Boo.Lang.Compiler.Ast.Slice node)
  2128. {
  2129. if (EnterSlice(node))
  2130. {
  2131. Expression currentBeginValue = node.Begin;
  2132. if (null != currentBeginValue)
  2133. {
  2134. Expression newValue = (Expression)VisitNode(currentBeginValue);
  2135. if (!object.ReferenceEquals(newValue, currentBeginValue))
  2136. {
  2137. node.Begin = newValue;
  2138. }
  2139. }
  2140. Expression currentEndValue = node.End;
  2141. if (null != currentEndValue)
  2142. {
  2143. Expression newValue = (Expression)VisitNode(currentEndValue);
  2144. if (!object.ReferenceEquals(newValue, currentEndValue))
  2145. {
  2146. node.End = newValue;
  2147. }
  2148. }
  2149. Expression currentStepValue = node.Step;
  2150. if (null != currentStepValue)
  2151. {
  2152. Expression newValue = (Expression)VisitNode(currentStepValue);
  2153. if (!object.ReferenceEquals(newValue, currentStepValue))
  2154. {
  2155. node.Step = newValue;
  2156. }
  2157. }
  2158. LeaveSlice(node);
  2159. }
  2160. }
  2161. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2162. public virtual bool EnterSlice(Boo.Lang.Compiler.Ast.Slice node)
  2163. {
  2164. return true;
  2165. }
  2166. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2167. public virtual void LeaveSlice(Boo.Lang.Compiler.Ast.Slice node)
  2168. {
  2169. }
  2170. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2171. public virtual void OnSlicingExpression(Boo.Lang.Compiler.Ast.SlicingExpression node)
  2172. {
  2173. if (EnterSlicingExpression(node))
  2174. {
  2175. Expression currentTargetValue = node.Target;
  2176. if (null != currentTargetValue)
  2177. {
  2178. Expression newValue = (Expression)VisitNode(currentTargetValue);
  2179. if (!object.ReferenceEquals(newValue, currentTargetValue))
  2180. {
  2181. node.Target = newValue;
  2182. }
  2183. }
  2184. Visit(node.Indices);
  2185. LeaveSlicingExpression(node);
  2186. }
  2187. }
  2188. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2189. public virtual bool EnterSlicingExpression(Boo.Lang.Compiler.Ast.SlicingExpression node)
  2190. {
  2191. return true;
  2192. }
  2193. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2194. public virtual void LeaveSlicingExpression(Boo.Lang.Compiler.Ast.SlicingExpression node)
  2195. {
  2196. }
  2197. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2198. public virtual void OnTryCastExpression(Boo.Lang.Compiler.Ast.TryCastExpression node)
  2199. {
  2200. if (EnterTryCastExpression(node))
  2201. {
  2202. Expression currentTargetValue = node.Target;
  2203. if (null != currentTargetValue)
  2204. {
  2205. Expression newValue = (Expression)VisitNode(currentTargetValue);
  2206. if (!object.ReferenceEquals(newValue, currentTargetValue))
  2207. {
  2208. node.Target = newValue;
  2209. }
  2210. }
  2211. TypeReference currentTypeValue = node.Type;
  2212. if (null != currentTypeValue)
  2213. {
  2214. TypeReference newValue = (TypeReference)VisitNode(currentTypeValue);
  2215. if (!object.ReferenceEquals(newValue, currentTypeValue))
  2216. {
  2217. node.Type = newValue;
  2218. }
  2219. }
  2220. LeaveTryCastExpression(node);
  2221. }
  2222. }
  2223. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2224. public virtual bool EnterTryCastExpression(Boo.Lang.Compiler.Ast.TryCastExpression node)
  2225. {
  2226. return true;
  2227. }
  2228. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2229. public virtual void LeaveTryCastExpression(Boo.Lang.Compiler.Ast.TryCastExpression node)
  2230. {
  2231. }
  2232. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2233. public virtual void OnCastExpression(Boo.Lang.Compiler.Ast.CastExpression node)
  2234. {
  2235. if (EnterCastExpression(node))
  2236. {
  2237. Expression currentTargetValue = node.Target;
  2238. if (null != currentTargetValue)
  2239. {
  2240. Expression newValue = (Expression)VisitNode(currentTargetValue);
  2241. if (!object.ReferenceEquals(newValue, currentTargetValue))
  2242. {
  2243. node.Target = newValue;
  2244. }
  2245. }
  2246. TypeReference currentTypeValue = node.Type;
  2247. if (null != currentTypeValue)
  2248. {
  2249. TypeReference newValue = (TypeReference)VisitNode(currentTypeValue);
  2250. if (!object.ReferenceEquals(newValue, currentTypeValue))
  2251. {
  2252. node.Type = newValue;
  2253. }
  2254. }
  2255. LeaveCastExpression(node);
  2256. }
  2257. }
  2258. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2259. public virtual bool EnterCastExpression(Boo.Lang.Compiler.Ast.CastExpression node)
  2260. {
  2261. return true;
  2262. }
  2263. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2264. public virtual void LeaveCastExpression(Boo.Lang.Compiler.Ast.CastExpression node)
  2265. {
  2266. }
  2267. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2268. public virtual void OnTypeofExpression(Boo.Lang.Compiler.Ast.TypeofExpression node)
  2269. {
  2270. if (EnterTypeofExpression(node))
  2271. {
  2272. TypeReference currentTypeValue = node.Type;
  2273. if (null != currentTypeValue)
  2274. {
  2275. TypeReference newValue = (TypeReference)VisitNode(currentTypeValue);
  2276. if (!object.ReferenceEquals(newValue, currentTypeValue))
  2277. {
  2278. node.Type = newValue;
  2279. }
  2280. }
  2281. LeaveTypeofExpression(node);
  2282. }
  2283. }
  2284. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2285. public virtual bool EnterTypeofExpression(Boo.Lang.Compiler.Ast.TypeofExpression node)
  2286. {
  2287. return true;
  2288. }
  2289. [System.CodeDom.Compiler.GeneratedCodeAttribute("astgen.boo", "1")]
  2290. public virtual void LeaveTypeofExpression(Boo.Lang.Compiler.Ast.TypeofExpression node)
  2291. {
  2292. }
  2293. }
  2294. }