brighterscript 0.72.1 → 0.72.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (313) hide show
  1. package/README.md +7 -2
  2. package/dist/LanguageServer.d.ts +2 -1
  3. package/dist/LanguageServer.js +12 -0
  4. package/dist/LanguageServer.js.map +1 -1
  5. package/dist/Program.d.ts +5 -1
  6. package/dist/Program.js +20 -0
  7. package/dist/Program.js.map +1 -1
  8. package/dist/bscPlugin/BscPlugin.d.ts +2 -1
  9. package/dist/bscPlugin/BscPlugin.js +4 -0
  10. package/dist/bscPlugin/BscPlugin.js.map +1 -1
  11. package/dist/bscPlugin/inlayHints/InlayHintProcessor.d.ts +23 -0
  12. package/dist/bscPlugin/inlayHints/InlayHintProcessor.js +183 -0
  13. package/dist/bscPlugin/inlayHints/InlayHintProcessor.js.map +1 -0
  14. package/dist/interfaces.d.ts +34 -1
  15. package/dist/lsp/LspProject.d.ts +8 -1
  16. package/dist/lsp/Project.d.ts +5 -1
  17. package/dist/lsp/Project.js +6 -0
  18. package/dist/lsp/Project.js.map +1 -1
  19. package/dist/lsp/ProjectManager.d.ts +5 -1
  20. package/dist/lsp/ProjectManager.js +12 -0
  21. package/dist/lsp/ProjectManager.js.map +1 -1
  22. package/dist/lsp/worker/WorkerThreadProject.d.ts +5 -1
  23. package/dist/lsp/worker/WorkerThreadProject.js +3 -0
  24. package/dist/lsp/worker/WorkerThreadProject.js.map +1 -1
  25. package/package.json +18 -14
  26. package/dist/astUtils/AstEditor.spec.d.ts +0 -1
  27. package/dist/astUtils/AstEditor.spec.js +0 -254
  28. package/dist/astUtils/AstEditor.spec.js.map +0 -1
  29. package/dist/astUtils/creators.spec.d.ts +0 -1
  30. package/dist/astUtils/creators.spec.js +0 -21
  31. package/dist/astUtils/creators.spec.js.map +0 -1
  32. package/dist/astUtils/reflection.spec.d.ts +0 -1
  33. package/dist/astUtils/reflection.spec.js +0 -308
  34. package/dist/astUtils/reflection.spec.js.map +0 -1
  35. package/dist/astUtils/stackedVisitor.spec.d.ts +0 -1
  36. package/dist/astUtils/stackedVisitor.spec.js +0 -79
  37. package/dist/astUtils/stackedVisitor.spec.js.map +0 -1
  38. package/dist/astUtils/visitors.spec.d.ts +0 -1
  39. package/dist/astUtils/visitors.spec.js +0 -1197
  40. package/dist/astUtils/visitors.spec.js.map +0 -1
  41. package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.d.ts +0 -1
  42. package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js +0 -1237
  43. package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js.map +0 -1
  44. package/dist/bscPlugin/definition/DefinitionProvider.spec.d.ts +0 -1
  45. package/dist/bscPlugin/definition/DefinitionProvider.spec.js +0 -171
  46. package/dist/bscPlugin/definition/DefinitionProvider.spec.js.map +0 -1
  47. package/dist/bscPlugin/hover/HoverProcessor.spec.d.ts +0 -1
  48. package/dist/bscPlugin/hover/HoverProcessor.spec.js +0 -201
  49. package/dist/bscPlugin/hover/HoverProcessor.spec.js.map +0 -1
  50. package/dist/bscPlugin/references/ReferencesProvider.spec.d.ts +0 -1
  51. package/dist/bscPlugin/references/ReferencesProvider.spec.js +0 -51
  52. package/dist/bscPlugin/references/ReferencesProvider.spec.js.map +0 -1
  53. package/dist/bscPlugin/selectionRanges/SelectionRangesProcessor.spec.d.ts +0 -1
  54. package/dist/bscPlugin/selectionRanges/SelectionRangesProcessor.spec.js +0 -298
  55. package/dist/bscPlugin/selectionRanges/SelectionRangesProcessor.spec.js.map +0 -1
  56. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.d.ts +0 -1
  57. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js +0 -399
  58. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js.map +0 -1
  59. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.spec.d.ts +0 -1
  60. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.spec.js +0 -290
  61. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.spec.js.map +0 -1
  62. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.spec.d.ts +0 -1
  63. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.spec.js +0 -245
  64. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.spec.js.map +0 -1
  65. package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.spec.d.ts +0 -1
  66. package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.spec.js +0 -46
  67. package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.spec.js.map +0 -1
  68. package/dist/bscPlugin/validation/BrsFileValidator.spec.d.ts +0 -1
  69. package/dist/bscPlugin/validation/BrsFileValidator.spec.js +0 -702
  70. package/dist/bscPlugin/validation/BrsFileValidator.spec.js.map +0 -1
  71. package/dist/common/Sequencer.spec.d.ts +0 -1
  72. package/dist/common/Sequencer.spec.js +0 -75
  73. package/dist/common/Sequencer.spec.js.map +0 -1
  74. package/dist/files/BrsFile.Class.spec.d.ts +0 -1
  75. package/dist/files/BrsFile.Class.spec.js +0 -1805
  76. package/dist/files/BrsFile.Class.spec.js.map +0 -1
  77. package/dist/files/BrsFile.spec.d.ts +0 -1
  78. package/dist/files/BrsFile.spec.js +0 -4611
  79. package/dist/files/BrsFile.spec.js.map +0 -1
  80. package/dist/files/XmlFile.spec.d.ts +0 -1
  81. package/dist/files/XmlFile.spec.js +0 -1219
  82. package/dist/files/XmlFile.spec.js.map +0 -1
  83. package/dist/files/tests/imports.spec.d.ts +0 -1
  84. package/dist/files/tests/imports.spec.js +0 -241
  85. package/dist/files/tests/imports.spec.js.map +0 -1
  86. package/dist/files/tests/optionalChaning.spec.d.ts +0 -1
  87. package/dist/files/tests/optionalChaning.spec.js +0 -152
  88. package/dist/files/tests/optionalChaning.spec.js.map +0 -1
  89. package/dist/lexer/Character.spec.d.ts +0 -1
  90. package/dist/lexer/Character.spec.js +0 -27
  91. package/dist/lexer/Character.spec.js.map +0 -1
  92. package/dist/lexer/Lexer.spec.d.ts +0 -1
  93. package/dist/lexer/Lexer.spec.js +0 -1300
  94. package/dist/lexer/Lexer.spec.js.map +0 -1
  95. package/dist/lsp/ActionQueue.spec.d.ts +0 -1
  96. package/dist/lsp/ActionQueue.spec.js +0 -80
  97. package/dist/lsp/ActionQueue.spec.js.map +0 -1
  98. package/dist/lsp/DocumentManager.spec.d.ts +0 -1
  99. package/dist/lsp/DocumentManager.spec.js +0 -103
  100. package/dist/lsp/DocumentManager.spec.js.map +0 -1
  101. package/dist/lsp/PathFilterer.spec.d.ts +0 -1
  102. package/dist/lsp/PathFilterer.spec.js +0 -182
  103. package/dist/lsp/PathFilterer.spec.js.map +0 -1
  104. package/dist/lsp/Project.spec.d.ts +0 -1
  105. package/dist/lsp/Project.spec.js +0 -400
  106. package/dist/lsp/Project.spec.js.map +0 -1
  107. package/dist/lsp/ProjectManager.spec.d.ts +0 -1
  108. package/dist/lsp/ProjectManager.spec.js +0 -1183
  109. package/dist/lsp/ProjectManager.spec.js.map +0 -1
  110. package/dist/lsp/worker/MessageHandler.spec.d.ts +0 -1
  111. package/dist/lsp/worker/MessageHandler.spec.js +0 -64
  112. package/dist/lsp/worker/MessageHandler.spec.js.map +0 -1
  113. package/dist/lsp/worker/WorkerPool.spec.d.ts +0 -1
  114. package/dist/lsp/worker/WorkerPool.spec.js +0 -59
  115. package/dist/lsp/worker/WorkerPool.spec.js.map +0 -1
  116. package/dist/lsp/worker/WorkerThreadProject.spec.d.ts +0 -2
  117. package/dist/lsp/worker/WorkerThreadProject.spec.js +0 -72
  118. package/dist/lsp/worker/WorkerThreadProject.spec.js.map +0 -1
  119. package/dist/parser/AstNode.spec.d.ts +0 -1
  120. package/dist/parser/AstNode.spec.js +0 -1452
  121. package/dist/parser/AstNode.spec.js.map +0 -1
  122. package/dist/parser/Expression.spec.d.ts +0 -1
  123. package/dist/parser/Expression.spec.js +0 -40
  124. package/dist/parser/Expression.spec.js.map +0 -1
  125. package/dist/parser/Parser.Class.spec.d.ts +0 -1
  126. package/dist/parser/Parser.Class.spec.js +0 -495
  127. package/dist/parser/Parser.Class.spec.js.map +0 -1
  128. package/dist/parser/Parser.spec.d.ts +0 -4
  129. package/dist/parser/Parser.spec.js +0 -1985
  130. package/dist/parser/Parser.spec.js.map +0 -1
  131. package/dist/parser/SGParser.spec.d.ts +0 -1
  132. package/dist/parser/SGParser.spec.js +0 -131
  133. package/dist/parser/SGParser.spec.js.map +0 -1
  134. package/dist/parser/Statement.spec.d.ts +0 -1
  135. package/dist/parser/Statement.spec.js +0 -118
  136. package/dist/parser/Statement.spec.js.map +0 -1
  137. package/dist/parser/tests/Parser.spec.d.ts +0 -19
  138. package/dist/parser/tests/Parser.spec.js +0 -38
  139. package/dist/parser/tests/Parser.spec.js.map +0 -1
  140. package/dist/parser/tests/controlFlow/For.spec.d.ts +0 -1
  141. package/dist/parser/tests/controlFlow/For.spec.js +0 -208
  142. package/dist/parser/tests/controlFlow/For.spec.js.map +0 -1
  143. package/dist/parser/tests/controlFlow/ForEach.spec.d.ts +0 -1
  144. package/dist/parser/tests/controlFlow/ForEach.spec.js +0 -143
  145. package/dist/parser/tests/controlFlow/ForEach.spec.js.map +0 -1
  146. package/dist/parser/tests/controlFlow/If.spec.d.ts +0 -1
  147. package/dist/parser/tests/controlFlow/If.spec.js +0 -570
  148. package/dist/parser/tests/controlFlow/If.spec.js.map +0 -1
  149. package/dist/parser/tests/controlFlow/While.spec.d.ts +0 -1
  150. package/dist/parser/tests/controlFlow/While.spec.js +0 -156
  151. package/dist/parser/tests/controlFlow/While.spec.js.map +0 -1
  152. package/dist/parser/tests/expression/Additive.spec.d.ts +0 -1
  153. package/dist/parser/tests/expression/Additive.spec.js +0 -99
  154. package/dist/parser/tests/expression/Additive.spec.js.map +0 -1
  155. package/dist/parser/tests/expression/ArrayLiterals.spec.d.ts +0 -1
  156. package/dist/parser/tests/expression/ArrayLiterals.spec.js +0 -291
  157. package/dist/parser/tests/expression/ArrayLiterals.spec.js.map +0 -1
  158. package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.d.ts +0 -1
  159. package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js +0 -401
  160. package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js.map +0 -1
  161. package/dist/parser/tests/expression/Boolean.spec.d.ts +0 -1
  162. package/dist/parser/tests/expression/Boolean.spec.js +0 -83
  163. package/dist/parser/tests/expression/Boolean.spec.js.map +0 -1
  164. package/dist/parser/tests/expression/Call.spec.d.ts +0 -1
  165. package/dist/parser/tests/expression/Call.spec.js +0 -242
  166. package/dist/parser/tests/expression/Call.spec.js.map +0 -1
  167. package/dist/parser/tests/expression/Exponential.spec.d.ts +0 -1
  168. package/dist/parser/tests/expression/Exponential.spec.js +0 -37
  169. package/dist/parser/tests/expression/Exponential.spec.js.map +0 -1
  170. package/dist/parser/tests/expression/Function.spec.d.ts +0 -1
  171. package/dist/parser/tests/expression/Function.spec.js +0 -403
  172. package/dist/parser/tests/expression/Function.spec.js.map +0 -1
  173. package/dist/parser/tests/expression/Indexing.spec.d.ts +0 -1
  174. package/dist/parser/tests/expression/Indexing.spec.js +0 -289
  175. package/dist/parser/tests/expression/Indexing.spec.js.map +0 -1
  176. package/dist/parser/tests/expression/Multiplicative.spec.d.ts +0 -1
  177. package/dist/parser/tests/expression/Multiplicative.spec.js +0 -67
  178. package/dist/parser/tests/expression/Multiplicative.spec.js.map +0 -1
  179. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.d.ts +0 -1
  180. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js +0 -346
  181. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js.map +0 -1
  182. package/dist/parser/tests/expression/PrefixUnary.spec.d.ts +0 -1
  183. package/dist/parser/tests/expression/PrefixUnary.spec.js +0 -105
  184. package/dist/parser/tests/expression/PrefixUnary.spec.js.map +0 -1
  185. package/dist/parser/tests/expression/Primary.spec.d.ts +0 -1
  186. package/dist/parser/tests/expression/Primary.spec.js +0 -149
  187. package/dist/parser/tests/expression/Primary.spec.js.map +0 -1
  188. package/dist/parser/tests/expression/RegexLiteralExpression.spec.d.ts +0 -1
  189. package/dist/parser/tests/expression/RegexLiteralExpression.spec.js +0 -171
  190. package/dist/parser/tests/expression/RegexLiteralExpression.spec.js.map +0 -1
  191. package/dist/parser/tests/expression/Relational.spec.d.ts +0 -1
  192. package/dist/parser/tests/expression/Relational.spec.js +0 -83
  193. package/dist/parser/tests/expression/Relational.spec.js.map +0 -1
  194. package/dist/parser/tests/expression/SourceLiteralExpression.spec.d.ts +0 -1
  195. package/dist/parser/tests/expression/SourceLiteralExpression.spec.js +0 -201
  196. package/dist/parser/tests/expression/SourceLiteralExpression.spec.js.map +0 -1
  197. package/dist/parser/tests/expression/TemplateStringExpression.spec.d.ts +0 -1
  198. package/dist/parser/tests/expression/TemplateStringExpression.spec.js +0 -389
  199. package/dist/parser/tests/expression/TemplateStringExpression.spec.js.map +0 -1
  200. package/dist/parser/tests/expression/TernaryExpression.spec.d.ts +0 -1
  201. package/dist/parser/tests/expression/TernaryExpression.spec.js +0 -876
  202. package/dist/parser/tests/expression/TernaryExpression.spec.js.map +0 -1
  203. package/dist/parser/tests/expression/UnaryExpression.spec.d.ts +0 -1
  204. package/dist/parser/tests/expression/UnaryExpression.spec.js +0 -52
  205. package/dist/parser/tests/expression/UnaryExpression.spec.js.map +0 -1
  206. package/dist/parser/tests/statement/AssignmentOperators.spec.d.ts +0 -1
  207. package/dist/parser/tests/statement/AssignmentOperators.spec.js +0 -79
  208. package/dist/parser/tests/statement/AssignmentOperators.spec.js.map +0 -1
  209. package/dist/parser/tests/statement/ConstStatement.spec.d.ts +0 -1
  210. package/dist/parser/tests/statement/ConstStatement.spec.js +0 -708
  211. package/dist/parser/tests/statement/ConstStatement.spec.js.map +0 -1
  212. package/dist/parser/tests/statement/Continue.spec.d.ts +0 -1
  213. package/dist/parser/tests/statement/Continue.spec.js +0 -119
  214. package/dist/parser/tests/statement/Continue.spec.js.map +0 -1
  215. package/dist/parser/tests/statement/Declaration.spec.d.ts +0 -1
  216. package/dist/parser/tests/statement/Declaration.spec.js +0 -108
  217. package/dist/parser/tests/statement/Declaration.spec.js.map +0 -1
  218. package/dist/parser/tests/statement/Dim.spec.d.ts +0 -1
  219. package/dist/parser/tests/statement/Dim.spec.js +0 -73
  220. package/dist/parser/tests/statement/Dim.spec.js.map +0 -1
  221. package/dist/parser/tests/statement/Enum.spec.d.ts +0 -1
  222. package/dist/parser/tests/statement/Enum.spec.js +0 -1307
  223. package/dist/parser/tests/statement/Enum.spec.js.map +0 -1
  224. package/dist/parser/tests/statement/For.spec.d.ts +0 -1
  225. package/dist/parser/tests/statement/For.spec.js +0 -45
  226. package/dist/parser/tests/statement/For.spec.js.map +0 -1
  227. package/dist/parser/tests/statement/ForEach.spec.d.ts +0 -1
  228. package/dist/parser/tests/statement/ForEach.spec.js +0 -36
  229. package/dist/parser/tests/statement/ForEach.spec.js.map +0 -1
  230. package/dist/parser/tests/statement/Function.spec.d.ts +0 -1
  231. package/dist/parser/tests/statement/Function.spec.js +0 -342
  232. package/dist/parser/tests/statement/Function.spec.js.map +0 -1
  233. package/dist/parser/tests/statement/Goto.spec.d.ts +0 -1
  234. package/dist/parser/tests/statement/Goto.spec.js +0 -51
  235. package/dist/parser/tests/statement/Goto.spec.js.map +0 -1
  236. package/dist/parser/tests/statement/Increment.spec.d.ts +0 -1
  237. package/dist/parser/tests/statement/Increment.spec.js +0 -117
  238. package/dist/parser/tests/statement/Increment.spec.js.map +0 -1
  239. package/dist/parser/tests/statement/InterfaceStatement.spec.d.ts +0 -1
  240. package/dist/parser/tests/statement/InterfaceStatement.spec.js +0 -102
  241. package/dist/parser/tests/statement/InterfaceStatement.spec.js.map +0 -1
  242. package/dist/parser/tests/statement/LibraryStatement.spec.d.ts +0 -1
  243. package/dist/parser/tests/statement/LibraryStatement.spec.js +0 -74
  244. package/dist/parser/tests/statement/LibraryStatement.spec.js.map +0 -1
  245. package/dist/parser/tests/statement/Misc.spec.d.ts +0 -1
  246. package/dist/parser/tests/statement/Misc.spec.js +0 -335
  247. package/dist/parser/tests/statement/Misc.spec.js.map +0 -1
  248. package/dist/parser/tests/statement/PrintStatement.spec.d.ts +0 -1
  249. package/dist/parser/tests/statement/PrintStatement.spec.js +0 -195
  250. package/dist/parser/tests/statement/PrintStatement.spec.js.map +0 -1
  251. package/dist/parser/tests/statement/ReturnStatement.spec.d.ts +0 -1
  252. package/dist/parser/tests/statement/ReturnStatement.spec.js +0 -94
  253. package/dist/parser/tests/statement/ReturnStatement.spec.js.map +0 -1
  254. package/dist/parser/tests/statement/Set.spec.d.ts +0 -1
  255. package/dist/parser/tests/statement/Set.spec.js +0 -218
  256. package/dist/parser/tests/statement/Set.spec.js.map +0 -1
  257. package/dist/parser/tests/statement/Stop.spec.d.ts +0 -1
  258. package/dist/parser/tests/statement/Stop.spec.js +0 -38
  259. package/dist/parser/tests/statement/Stop.spec.js.map +0 -1
  260. package/dist/parser/tests/statement/Throw.spec.d.ts +0 -1
  261. package/dist/parser/tests/statement/Throw.spec.js +0 -35
  262. package/dist/parser/tests/statement/Throw.spec.js.map +0 -1
  263. package/dist/parser/tests/statement/TryCatch.spec.d.ts +0 -1
  264. package/dist/parser/tests/statement/TryCatch.spec.js +0 -142
  265. package/dist/parser/tests/statement/TryCatch.spec.js.map +0 -1
  266. package/dist/preprocessor/Manifest.spec.d.ts +0 -1
  267. package/dist/preprocessor/Manifest.spec.js +0 -80
  268. package/dist/preprocessor/Manifest.spec.js.map +0 -1
  269. package/dist/preprocessor/Preprocessor.spec.d.ts +0 -1
  270. package/dist/preprocessor/Preprocessor.spec.js +0 -152
  271. package/dist/preprocessor/Preprocessor.spec.js.map +0 -1
  272. package/dist/preprocessor/PreprocessorParser.spec.d.ts +0 -1
  273. package/dist/preprocessor/PreprocessorParser.spec.js +0 -116
  274. package/dist/preprocessor/PreprocessorParser.spec.js.map +0 -1
  275. package/dist/types/ArrayType.spec.d.ts +0 -1
  276. package/dist/types/ArrayType.spec.js +0 -30
  277. package/dist/types/ArrayType.spec.js.map +0 -1
  278. package/dist/types/BooleanType.spec.d.ts +0 -1
  279. package/dist/types/BooleanType.spec.js +0 -12
  280. package/dist/types/BooleanType.spec.js.map +0 -1
  281. package/dist/types/DoubleType.spec.d.ts +0 -1
  282. package/dist/types/DoubleType.spec.js +0 -12
  283. package/dist/types/DoubleType.spec.js.map +0 -1
  284. package/dist/types/DynamicType.spec.d.ts +0 -1
  285. package/dist/types/DynamicType.spec.js +0 -12
  286. package/dist/types/DynamicType.spec.js.map +0 -1
  287. package/dist/types/FloatType.spec.d.ts +0 -1
  288. package/dist/types/FloatType.spec.js +0 -12
  289. package/dist/types/FloatType.spec.js.map +0 -1
  290. package/dist/types/FunctionType.spec.d.ts +0 -1
  291. package/dist/types/FunctionType.spec.js +0 -23
  292. package/dist/types/FunctionType.spec.js.map +0 -1
  293. package/dist/types/IntegerType.spec.d.ts +0 -1
  294. package/dist/types/IntegerType.spec.js +0 -12
  295. package/dist/types/IntegerType.spec.js.map +0 -1
  296. package/dist/types/InterfaceType.spec.d.ts +0 -1
  297. package/dist/types/InterfaceType.spec.js +0 -175
  298. package/dist/types/InterfaceType.spec.js.map +0 -1
  299. package/dist/types/InvalidType.spec.d.ts +0 -1
  300. package/dist/types/InvalidType.spec.js +0 -12
  301. package/dist/types/InvalidType.spec.js.map +0 -1
  302. package/dist/types/LongIntegerType.spec.d.ts +0 -1
  303. package/dist/types/LongIntegerType.spec.js +0 -12
  304. package/dist/types/LongIntegerType.spec.js.map +0 -1
  305. package/dist/types/ObjectType.spec.d.ts +0 -1
  306. package/dist/types/ObjectType.spec.js +0 -12
  307. package/dist/types/ObjectType.spec.js.map +0 -1
  308. package/dist/types/StringType.spec.d.ts +0 -1
  309. package/dist/types/StringType.spec.js +0 -12
  310. package/dist/types/StringType.spec.js.map +0 -1
  311. package/dist/types/VoidType.spec.d.ts +0 -1
  312. package/dist/types/VoidType.spec.js +0 -12
  313. package/dist/types/VoidType.spec.js.map +0 -1
@@ -1,1452 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const util_1 = require("../util");
4
- const fsExtra = require("fs-extra");
5
- const Program_1 = require("../Program");
6
- const chai_config_spec_1 = require("../chai-config.spec");
7
- const testHelpers_spec_1 = require("../testHelpers.spec");
8
- const testHelpers_spec_2 = require("../testHelpers.spec");
9
- const reflection_1 = require("../astUtils/reflection");
10
- const Statement_1 = require("./Statement");
11
- const Parser_1 = require("./Parser");
12
- describe('AstNode', () => {
13
- let program;
14
- beforeEach(() => {
15
- fsExtra.emptyDirSync(testHelpers_spec_2.tempDir);
16
- program = new Program_1.Program({
17
- rootDir: testHelpers_spec_2.rootDir,
18
- stagingDir: testHelpers_spec_2.stagingDir
19
- });
20
- program.createSourceScope(); //ensure source scope is created
21
- });
22
- afterEach(() => {
23
- fsExtra.emptyDirSync(testHelpers_spec_2.tempDir);
24
- program.dispose();
25
- });
26
- describe('findChildAtPosition', () => {
27
- it('finds deepest AstNode that matches the position', () => {
28
- const file = program.setFile('source/main.brs', `
29
- sub main()
30
- alpha = invalid
31
- print alpha.beta.charlie.delta(alpha.echo.foxtrot())
32
- end sub
33
- `);
34
- program.validate();
35
- (0, testHelpers_spec_1.expectZeroDiagnostics)(program);
36
- const delta = file.ast.findChildAtPosition(util_1.util.createPosition(3, 52));
37
- (0, chai_config_spec_1.expect)(delta.name.text).to.eql('delta');
38
- const foxtrot = file.ast.findChildAtPosition(util_1.util.createPosition(3, 71));
39
- (0, chai_config_spec_1.expect)(foxtrot.name.text).to.eql('foxtrot');
40
- });
41
- });
42
- describe('findChild', () => {
43
- it('finds a child that matches the matcher', () => {
44
- const file = program.setFile('source/main.brs', `
45
- sub main()
46
- alpha = invalid
47
- print alpha.beta.charlie.delta(alpha.echo.foxtrot())
48
- end sub
49
- `);
50
- (0, chai_config_spec_1.expect)(file.ast.findChild((node) => {
51
- return (0, reflection_1.isAssignmentStatement)(node) && node.name.text === 'alpha';
52
- })).instanceof(Statement_1.AssignmentStatement);
53
- });
54
- it('returns the exact node that matches', () => {
55
- const file = program.setFile('source/main.brs', `
56
- sub main()
57
- alpha1 = invalid
58
- alpha2 = invalid
59
- end sub
60
- `);
61
- let count = 0;
62
- const instance = file.ast.findChild((node) => {
63
- if ((0, reflection_1.isAssignmentStatement)(node)) {
64
- count++;
65
- if (count === 2) {
66
- return true;
67
- }
68
- }
69
- });
70
- const expected = file.ast.statements[0].func.body.statements[1];
71
- (0, chai_config_spec_1.expect)(instance).to.equal(expected);
72
- });
73
- it('returns undefined when matcher never returned true', () => {
74
- const file = program.setFile('source/main.brs', `
75
- sub main()
76
- alpha = invalid
77
- print alpha.beta.charlie.delta(alpha.echo.foxtrot())
78
- end sub
79
- `);
80
- (0, chai_config_spec_1.expect)(file.ast.findChild((node) => false)).not.to.exist;
81
- });
82
- it('returns the value returned from the matcher', () => {
83
- const file = program.setFile('source/main.brs', `
84
- sub main()
85
- alpha = invalid
86
- print alpha.beta.charlie.delta(alpha.echo.foxtrot())
87
- end sub
88
- `);
89
- const secondStatement = file.ast.statements[0].func.body.statements[1];
90
- (0, chai_config_spec_1.expect)(file.ast.findChild((node) => secondStatement)).to.equal(secondStatement);
91
- });
92
- it('cancels properly', () => {
93
- const file = program.setFile('source/main.brs', `
94
- sub main()
95
- alpha = invalid
96
- print alpha.beta.charlie.delta(alpha.echo.foxtrot())
97
- end sub
98
- `);
99
- let count = 0;
100
- file.ast.findChild((node, cancelToken) => {
101
- count++;
102
- cancelToken.cancel();
103
- });
104
- (0, chai_config_spec_1.expect)(count).to.eql(1);
105
- });
106
- });
107
- describe('findAncestor', () => {
108
- it('returns node when matcher returns true', () => {
109
- const file = program.setFile('source/main.brs', `
110
- sub main()
111
- alpha = invalid
112
- print alpha.beta.charlie.delta(alpha.echo.foxtrot())
113
- end sub
114
- `);
115
- const secondStatement = file.ast.statements[0].func.body.statements[1];
116
- const foxtrot = file.ast.findChild((node) => {
117
- var _a;
118
- return (0, reflection_1.isDottedGetExpression)(node) && ((_a = node.name) === null || _a === void 0 ? void 0 : _a.text) === 'foxtrot';
119
- });
120
- (0, chai_config_spec_1.expect)(foxtrot.findAncestor(reflection_1.isPrintStatement)).to.equal(secondStatement);
121
- });
122
- it('returns undefined when no match found', () => {
123
- const file = program.setFile('source/main.brs', `
124
- sub main()
125
- alpha = invalid
126
- print alpha.beta.charlie.delta(alpha.echo.foxtrot())
127
- end sub
128
- `);
129
- const foxtrot = file.ast.findChild((node) => {
130
- var _a;
131
- return (0, reflection_1.isDottedGetExpression)(node) && ((_a = node.name) === null || _a === void 0 ? void 0 : _a.text) === 'foxtrot';
132
- });
133
- (0, chai_config_spec_1.expect)(foxtrot.findAncestor(reflection_1.isClassStatement)).to.be.undefined;
134
- });
135
- it('returns overridden node when returned in matcher', () => {
136
- const file = program.setFile('source/main.brs', `
137
- sub main()
138
- alpha = invalid
139
- print alpha.beta.charlie.delta(alpha.echo.foxtrot())
140
- end sub
141
- `);
142
- const firstStatement = file.ast.statements[0].func.body.statements[0];
143
- const foxtrot = file.ast.findChild((node) => {
144
- var _a;
145
- return (0, reflection_1.isDottedGetExpression)(node) && ((_a = node.name) === null || _a === void 0 ? void 0 : _a.text) === 'foxtrot';
146
- });
147
- (0, chai_config_spec_1.expect)(foxtrot.findAncestor(node => firstStatement)).to.equal(firstStatement);
148
- });
149
- it('returns overridden node when returned in matcher', () => {
150
- const file = program.setFile('source/main.brs', `
151
- sub main()
152
- alpha = invalid
153
- print alpha.beta.charlie.delta(alpha.echo.foxtrot())
154
- end sub
155
- `);
156
- let count = 0;
157
- const firstStatement = file.ast.statements[0].func.body.statements[0];
158
- firstStatement.findAncestor((node, cancel) => {
159
- count++;
160
- cancel.cancel();
161
- });
162
- (0, chai_config_spec_1.expect)(count).to.eql(1);
163
- });
164
- });
165
- describe('clone', () => {
166
- function testClone(code) {
167
- let originalOuter;
168
- if (typeof code === 'string') {
169
- const parser = Parser_1.Parser.parse(code, { mode: Parser_1.ParseMode.BrighterScript });
170
- originalOuter = parser.ast;
171
- (0, testHelpers_spec_1.expectZeroDiagnostics)(parser);
172
- }
173
- else {
174
- originalOuter = code;
175
- }
176
- const cloneOuter = originalOuter.clone();
177
- //ensure the clone is identical to the original
178
- //compare them both ways to ensure no extra properties exist
179
- ensureIdentical(originalOuter, cloneOuter);
180
- ensureIdentical(cloneOuter, originalOuter);
181
- function ensureIdentical(original, clone, ancestors = [], seenNodes = new Map()) {
182
- var _a, _b, _c;
183
- for (let key in original) {
184
- let fullKey = [...ancestors, key].join('.');
185
- const originalValue = original === null || original === void 0 ? void 0 : original[key];
186
- const cloneValue = clone === null || clone === void 0 ? void 0 : clone[key];
187
- let typeOfValue = typeof originalValue;
188
- //skip these properties
189
- if (['parent', 'symbolTable', 'range'].includes(key) ||
190
- //this is a circular reference property or the `returnType` prop, skip it
191
- ((0, reflection_1.isFunctionExpression)(original) && (key === 'functionStatement' || key === 'returnType')) ||
192
- //circular reference property for annotations
193
- ((0, reflection_1.isAnnotationExpression)(original) && key === 'call')) {
194
- continue;
195
- }
196
- //if this is an object, recurse
197
- if (typeOfValue === 'object' && originalValue !== null) {
198
- //skip circular references (but give some tollerance)
199
- if (seenNodes.get(originalValue) > 2) {
200
- throw new Error(`${fullKey} is a circular reference`);
201
- }
202
- seenNodes.set(originalValue, ((_a = seenNodes.get(originalValue)) !== null && _a !== void 0 ? _a : 0) + 1);
203
- //object references should not be the same
204
- if (originalValue === cloneValue) {
205
- throw new Error(`${fullKey} is the same object reference`);
206
- }
207
- //compare child object values
208
- ensureIdentical(originalValue, cloneValue, [...ancestors, key], seenNodes);
209
- //for these tests, empty arrays can be the same as undefined so skip
210
- }
211
- else if ((Array.isArray(originalValue) && originalValue.length === 0 && cloneValue === undefined) ||
212
- (Array.isArray(cloneValue) && cloneValue.length === 0 && originalValue === undefined)) {
213
- continue;
214
- //these values must be identical
215
- }
216
- else {
217
- // eslint-disable-next-line no-useless-catch
218
- try {
219
- (0, chai_config_spec_1.expect)(cloneValue).to.equal(originalValue, `'${fullKey}' should be identical`);
220
- }
221
- catch (e) {
222
- //build a full list of ancestors for orig and clone
223
- let originalChain = [originalOuter];
224
- let cloneChain = [cloneOuter];
225
- for (let key of fullKey.split('.')) {
226
- originalChain.push((_b = originalChain[originalChain.length - 1]) === null || _b === void 0 ? void 0 : _b[key]);
227
- cloneChain.push((_c = cloneChain[cloneChain.length - 1]) === null || _c === void 0 ? void 0 : _c[key]);
228
- }
229
- console.error(e === null || e === void 0 ? void 0 : e.message, fullKey, originalChain, cloneChain);
230
- throw e;
231
- }
232
- }
233
- }
234
- }
235
- }
236
- it('clones EmptyStatement', () => {
237
- testClone(new Statement_1.EmptyStatement(util_1.util.createRange(1, 2, 3, 4)));
238
- });
239
- it('clones body with undefined statements array', () => {
240
- const original = Parser_1.Parser.parse(`
241
- sub main()
242
- end sub
243
- `).ast;
244
- original.statements = undefined;
245
- testClone(original);
246
- });
247
- it('clones body with undefined in the statements array', () => {
248
- const original = Parser_1.Parser.parse(`
249
- sub main()
250
- end sub
251
- `).ast;
252
- original.statements.push(undefined);
253
- testClone(original);
254
- });
255
- it('clones interfaces', () => {
256
- testClone(`
257
- interface Empty
258
- end interface
259
- interface Movie
260
- name as string
261
- previous as Movie
262
- sub play()
263
- function play2(a, b as string) as dynamic
264
- end interface
265
- interface Short extends Movie
266
- length as integer
267
- end interface
268
- `);
269
- });
270
- it('handles when interfaces are missing their body', () => {
271
- const original = Parser_1.Parser.parse(`
272
- interface Empty
273
- end interface
274
- `).ast;
275
- original.findChild(reflection_1.isInterfaceStatement).body = undefined;
276
- testClone(original);
277
- });
278
- it('handles when interfaces have undefined statements in the body', () => {
279
- const original = Parser_1.Parser.parse(`
280
- interface Empty
281
- end interface
282
- `).ast;
283
- original.findChild(reflection_1.isInterfaceStatement).body.push(undefined);
284
- testClone(original);
285
- });
286
- it('handles when interfaces have undefined field type', () => {
287
- const original = Parser_1.Parser.parse(`
288
- interface Empty
289
- name as string
290
- end interface
291
- `).ast;
292
- original.findChild(reflection_1.isInterfaceFieldStatement).type = undefined;
293
- testClone(original);
294
- });
295
- it('handles when interface function has undefined param and return type', () => {
296
- const original = Parser_1.Parser.parse(`
297
- interface Empty
298
- function test() as dynamic
299
- end interface
300
- `).ast;
301
- original.findChild(reflection_1.isInterfaceMethodStatement).params.push(undefined);
302
- original.findChild(reflection_1.isInterfaceMethodStatement).returnType = undefined;
303
- testClone(original);
304
- });
305
- it('handles when interface function has undefined params array', () => {
306
- const original = Parser_1.Parser.parse(`
307
- interface Empty
308
- function test(a) as dynamic
309
- end interface
310
- `).ast;
311
- original.findChild(reflection_1.isInterfaceMethodStatement).params = undefined;
312
- testClone(original);
313
- });
314
- it('clones empty class', () => {
315
- testClone(`
316
- class Movie
317
- end class
318
- `);
319
- });
320
- it('clones class with undefined body', () => {
321
- const original = Parser_1.Parser.parse(`
322
- class Movie
323
- end class
324
- `).ast;
325
- original.findChild(reflection_1.isClassStatement).body = undefined;
326
- testClone(original);
327
- });
328
- it('clones class with undefined body statement', () => {
329
- const original = Parser_1.Parser.parse(`
330
- class Movie
331
- end class
332
- `).ast;
333
- original.findChild(reflection_1.isClassStatement).body.push(undefined);
334
- testClone(original);
335
- });
336
- it('clones class having parent class', () => {
337
- testClone(`
338
- class Video
339
- end class
340
- class Movie extends Video
341
- end class
342
- `);
343
- });
344
- it('clones class', () => {
345
- testClone(`
346
- class Movie
347
- name as string
348
- previous as Movie
349
- sub play()
350
- end sub
351
- function play2(a, b as string) as dynamic
352
- end function
353
- end class
354
- `);
355
- });
356
- it('clones access modifiers', () => {
357
- testClone(`
358
- class Movie
359
- public sub test()
360
- end sub
361
- protected name = "bob"
362
- private child = {}
363
- end class
364
- `);
365
- });
366
- it('clones AssignmentStatement', () => {
367
- testClone(`
368
- sub main()
369
- thing = true
370
- end sub
371
- `);
372
- });
373
- it('clones AssignmentStatement with missing value', () => {
374
- const original = Parser_1.Parser.parse(`
375
- sub main()
376
- thing = true
377
- end sub
378
- `).ast;
379
- original.findChild(reflection_1.isAssignmentStatement).value = undefined;
380
- testClone(original);
381
- });
382
- it('clones Block with undefined statements array', () => {
383
- const original = Parser_1.Parser.parse(`
384
- sub main()
385
- thing = true
386
- end sub
387
- `).ast;
388
- original.findChild(reflection_1.isBlock).statements = undefined;
389
- testClone(original);
390
- });
391
- it('clones Block with undefined statement in statements array', () => {
392
- const original = Parser_1.Parser.parse(`
393
- sub main()
394
- thing = true
395
- end sub
396
- `).ast;
397
- original.findChild(reflection_1.isBlock).statements.push(undefined);
398
- testClone(original);
399
- });
400
- it('clones comment statement with undefined comments array', () => {
401
- const original = Parser_1.Parser.parse(`
402
- 'hello world
403
- `).ast;
404
- original.findChild(reflection_1.isCommentStatement).comments = undefined;
405
- testClone(original);
406
- });
407
- it('clones class with undefined method modifiers array', () => {
408
- const original = Parser_1.Parser.parse(`
409
- class Movie
410
- sub test()
411
- end sub
412
- end class
413
- `).ast;
414
- original.findChild(reflection_1.isMethodStatement).modifiers = undefined;
415
- testClone(original);
416
- });
417
- it('clones class with undefined func', () => {
418
- const original = Parser_1.Parser.parse(`
419
- class Movie
420
- sub test()
421
- end sub
422
- end class
423
- `).ast;
424
- original.findChild(reflection_1.isMethodStatement).func = undefined;
425
- testClone(original);
426
- });
427
- it('clones ExpressionStatement', () => {
428
- testClone(`
429
- sub main()
430
- test()
431
- end sub
432
- `);
433
- });
434
- it('clones ExpressionStatement without an expression', () => {
435
- const original = Parser_1.Parser.parse(`
436
- sub main()
437
- test()
438
- end sub
439
- `).ast;
440
- original.findChild(reflection_1.isExpressionStatement).expression = undefined;
441
- original.findChild(reflection_1.isFunctionExpression).callExpressions = [];
442
- testClone(original);
443
- });
444
- it('clones IfStatement', () => {
445
- testClone(`
446
- sub main()
447
- if true
448
- end if
449
- if true then
450
- end if
451
- if true
452
- print 1
453
- else if true
454
- print 1
455
- else
456
- print 1
457
- end if
458
- end sub
459
- `);
460
- });
461
- it('clones IfStatement without condition or branches', () => {
462
- const original = Parser_1.Parser.parse(`
463
- sub main()
464
- if true
465
- end if
466
- end sub
467
- `).ast;
468
- original.findChild(reflection_1.isIfStatement).condition = undefined;
469
- original.findChild(reflection_1.isIfStatement).thenBranch = undefined;
470
- original.findChild(reflection_1.isIfStatement).elseBranch = undefined;
471
- testClone(original);
472
- });
473
- it('clones IncrementStatement', () => {
474
- testClone(`
475
- sub main()
476
- i = 0
477
- i++
478
- end sub
479
- `);
480
- });
481
- it('clones IncrementStatement with missing `value`', () => {
482
- const original = Parser_1.Parser.parse(`
483
- sub main()
484
- i = 0
485
- i++
486
- end sub
487
- `).ast;
488
- original.findChild(reflection_1.isIncrementStatement).value = undefined;
489
- testClone(original);
490
- });
491
- it('clones PrintStatement with undefined expressions array', () => {
492
- const original = Parser_1.Parser.parse(`
493
- sub main()
494
- print 1
495
- end sub
496
- `).ast;
497
- original.findChild(reflection_1.isPrintStatement).expressions = undefined;
498
- testClone(original);
499
- });
500
- it('clones PrintStatement with undefined expression in the expressions array', () => {
501
- const original = Parser_1.Parser.parse(`
502
- sub main()
503
- print 1
504
- end sub
505
- `).ast;
506
- original.findChild(reflection_1.isPrintStatement).expressions.push(undefined);
507
- testClone(original);
508
- });
509
- it('clones DimStatement', () => {
510
- testClone(`
511
- sub main()
512
- dim alpha[1,2]
513
- end sub
514
- `);
515
- });
516
- it('clones DimStatement with undefined dimensions', () => {
517
- const original = Parser_1.Parser.parse(`
518
- sub main()
519
- dim alpha[1,2]
520
- end sub
521
- `).ast;
522
- original.findChild(reflection_1.isDimStatement).dimensions = undefined;
523
- testClone(original);
524
- });
525
- it('clones DimStatement with undefined as item in dimensions', () => {
526
- const original = Parser_1.Parser.parse(`
527
- sub main()
528
- dim alpha[1,2]
529
- end sub
530
- `).ast;
531
- original.findChild(reflection_1.isDimStatement).dimensions.push(undefined);
532
- testClone(original);
533
- });
534
- it('clones Goto statement', () => {
535
- testClone(`
536
- sub main()
537
- label1:
538
- for i = 0 to 10
539
- goto label1
540
- end for
541
- end sub
542
- `);
543
- });
544
- it('clones return statement', () => {
545
- testClone(`
546
- sub main()
547
- return
548
- end sub
549
- `);
550
- });
551
- it('clones return statement with value', () => {
552
- testClone(`
553
- function test()
554
- return true
555
- end function
556
- `);
557
- });
558
- it('clones return statement with undefined value expression', () => {
559
- const original = Parser_1.Parser.parse(`
560
- function test()
561
- return true
562
- end function
563
- `).ast;
564
- original.findChild(reflection_1.isReturnStatement).value = undefined;
565
- testClone(original);
566
- });
567
- it('clones stop statement', () => {
568
- testClone(`
569
- sub main()
570
- stop
571
- end sub
572
- `);
573
- });
574
- it('clones ForStatement', () => {
575
- testClone(`
576
- function test()
577
- for i = 0 to 10 step 2
578
- end for
579
- end function
580
- `);
581
- });
582
- it('clones ForStatement with undefined items', () => {
583
- const original = Parser_1.Parser.parse(`
584
- function test()
585
- for i = 0 to 10 step 2
586
- end for
587
- end function
588
- `).ast;
589
- original.findChild(reflection_1.isForStatement).counterDeclaration = undefined;
590
- original.findChild(reflection_1.isForStatement).finalValue = undefined;
591
- original.findChild(reflection_1.isForStatement).body = undefined;
592
- original.findChild(reflection_1.isForStatement).increment = undefined;
593
- testClone(original);
594
- });
595
- it('clones ForEachStatement', () => {
596
- testClone(`
597
- function test()
598
- for each item in [1, 2, 3]
599
- end for
600
- end function
601
- `);
602
- });
603
- it('clones ForEachStatement with undefined props', () => {
604
- const original = Parser_1.Parser.parse(`
605
- function test()
606
- for each item in [1, 2, 3]
607
- end for
608
- end function
609
- `).ast;
610
- original.findChild(reflection_1.isForEachStatement).target = undefined;
611
- original.findChild(reflection_1.isForEachStatement).body = undefined;
612
- testClone(original);
613
- });
614
- it('clones EndStatement', () => {
615
- testClone(`
616
- function test()
617
- end
618
- end function
619
- `);
620
- });
621
- it('clones ExitFor statement', () => {
622
- testClone(`
623
- sub main()
624
- for i = 0 to 10
625
- exit for
626
- end for
627
- end sub
628
- `);
629
- });
630
- it('clones While statement', () => {
631
- testClone(`
632
- sub main()
633
- while true
634
- end while
635
- end sub
636
- `);
637
- });
638
- it('clones While statement', () => {
639
- testClone(`
640
- sub main()
641
- while true
642
- end while
643
- end sub
644
- `);
645
- });
646
- it('clones ExitWhile statement', () => {
647
- testClone(`
648
- sub main()
649
- while true
650
- exit while
651
- end while
652
- end sub
653
- `);
654
- });
655
- it('clones tryCatch statement', () => {
656
- testClone(`
657
- sub main()
658
- try
659
- catch e
660
- end try
661
- end sub
662
- `);
663
- });
664
- it('clones tryCatch statement when missing branches', () => {
665
- const original = Parser_1.Parser.parse(`
666
- sub main()
667
- try
668
- print 1
669
- catch e
670
- print 2
671
- end try
672
- end sub
673
- `).ast;
674
- original.findChild(reflection_1.isTryCatchStatement).tryBranch = undefined;
675
- original.findChild(reflection_1.isTryCatchStatement).catchStatement = undefined;
676
- testClone(original);
677
- });
678
- it('clones tryCatch statement when missing catch branch', () => {
679
- const original = Parser_1.Parser.parse(`
680
- sub main()
681
- try
682
- print 1
683
- catch e
684
- print 2
685
- end try
686
- end sub
687
- `).ast;
688
- original.findChild(reflection_1.isCatchStatement).catchBranch = undefined;
689
- testClone(original);
690
- });
691
- it('clones throw statement', () => {
692
- testClone(`
693
- sub main()
694
- throw "Crash"
695
- end sub
696
- `);
697
- });
698
- it('clones throw statement with missing expression', () => {
699
- const original = Parser_1.Parser.parse(`
700
- sub main()
701
- throw "Crash"
702
- end sub
703
- `).ast;
704
- original.findChild(reflection_1.isThrowStatement).expression = undefined;
705
- testClone(original);
706
- });
707
- it('clones FunctionStatement when missing .func', () => {
708
- const original = Parser_1.Parser.parse(`
709
- sub main()
710
- end sub
711
- `).ast;
712
- original.findChild(reflection_1.isFunctionStatement).func = undefined;
713
- testClone(original);
714
- });
715
- it('clones empty enum statement', () => {
716
- testClone(`
717
- enum Direction
718
- end enum
719
- `);
720
- });
721
- it('clones enum statement with comments', () => {
722
- testClone(`
723
- enum Direction
724
- 'the up direction
725
- up = "up"
726
- end enum
727
- `);
728
- });
729
- it('clones enum statement with missing body', () => {
730
- const original = Parser_1.Parser.parse(`
731
- enum Direction
732
- 'the up direction
733
- up = "up"
734
- end enum
735
- `).ast;
736
- original.findChild(reflection_1.isEnumStatement).body = undefined;
737
- testClone(original);
738
- });
739
- it('clones enum statement with undefined in body', () => {
740
- const original = Parser_1.Parser.parse(`
741
- enum Direction
742
- 'the up direction
743
- up = "up"
744
- end enum
745
- `).ast;
746
- original.findChild(reflection_1.isEnumStatement).body.push(undefined);
747
- testClone(original);
748
- });
749
- it('clones enum member with missing value', () => {
750
- const original = Parser_1.Parser.parse(`
751
- enum Direction
752
- up = "up"
753
- end enum
754
- `).ast;
755
- original.findChild(reflection_1.isEnumMemberStatement).value = undefined;
756
- testClone(original);
757
- });
758
- it('clones const', () => {
759
- const original = Parser_1.Parser.parse(`
760
- const key = "KEY"
761
- `).ast;
762
- testClone(original);
763
- });
764
- it('clones const with missing value', () => {
765
- const original = Parser_1.Parser.parse(`
766
- const key = "KEY"
767
- `).ast;
768
- original.findChild(reflection_1.isConstStatement).value = undefined;
769
- testClone(original);
770
- });
771
- it('clones continue statement', () => {
772
- testClone(`
773
- sub main()
774
- for i = 0 to 10
775
- continue for
776
- end for
777
- end sub
778
- `);
779
- });
780
- it('clones WhileStatement', () => {
781
- const original = Parser_1.Parser.parse(`
782
- sub main()
783
- while true
784
- print hello
785
- end while
786
- end sub
787
- `).ast;
788
- original.findChild(reflection_1.isWhileStatement).condition = undefined;
789
- original.findChild(reflection_1.isWhileStatement).body = undefined;
790
- testClone(original);
791
- });
792
- it('clones DottedSetStatement', () => {
793
- const original = Parser_1.Parser.parse(`
794
- sub main()
795
- m.value = true
796
- end sub
797
- `).ast;
798
- testClone(original);
799
- });
800
- it('clones DottedSetStatement with missing properties', () => {
801
- const original = Parser_1.Parser.parse(`
802
- sub main()
803
- m.value = true
804
- end sub
805
- `).ast;
806
- original.findChild(reflection_1.isDottedSetStatement).obj = undefined;
807
- original.findChild(reflection_1.isDottedSetStatement).value = undefined;
808
- testClone(original);
809
- });
810
- it('clones IndexedSetStatement with missing props', () => {
811
- const original = Parser_1.Parser.parse(`
812
- sub main()
813
- m["value"] = true
814
- end sub
815
- `).ast;
816
- original.findChild(reflection_1.isIndexedSetStatement).obj = undefined;
817
- original.findChild(reflection_1.isIndexedSetStatement).value = undefined;
818
- testClone(original);
819
- });
820
- it('clones IndexedSetStatement', () => {
821
- const original = Parser_1.Parser.parse(`
822
- sub main()
823
- m["value"] = true
824
- end sub
825
- `).ast;
826
- testClone(original);
827
- });
828
- it('clones IndexedSetStatement', () => {
829
- const original = Parser_1.Parser.parse(`
830
- sub main()
831
- m["value"][2] = true
832
- m["value", 2] = true
833
- end sub
834
- `).ast;
835
- testClone(original);
836
- });
837
- it('clones IndexedSetStatement with undefined additional index', () => {
838
- const original = Parser_1.Parser.parse(`
839
- sub main()
840
- m["value", 2] = true
841
- end sub
842
- `).ast;
843
- original.findChild(reflection_1.isIndexedSetStatement).additionalIndexes[0] = undefined;
844
- testClone(original);
845
- });
846
- it('clones IndexedSetStatement with missing props', () => {
847
- const original = Parser_1.Parser.parse(`
848
- sub main()
849
- m["value"] = true
850
- end sub
851
- `).ast;
852
- original.findChild(reflection_1.isIndexedSetStatement).index = undefined;
853
- original.findChild(reflection_1.isIndexedSetStatement).additionalIndexes = undefined;
854
- testClone(original);
855
- });
856
- it('clones LibraryStatement', () => {
857
- const original = Parser_1.Parser.parse(`
858
- Library "v30/bslCore.brs"
859
- `).ast;
860
- testClone(original);
861
- });
862
- it('clones LibraryStatement with missing tokens', () => {
863
- const original = Parser_1.Parser.parse(`
864
- Library "v30/bslCore.brs"
865
- `).ast;
866
- original.findChild(reflection_1.isLibraryStatement).tokens = undefined;
867
- testClone(original);
868
- });
869
- it('clones NamespaceStatement', () => {
870
- const original = Parser_1.Parser.parse(`
871
- namespace Alpha
872
- end namespace
873
- `).ast;
874
- testClone(original);
875
- });
876
- it('clones NamespaceStatement with missing items', () => {
877
- const original = Parser_1.Parser.parse(`
878
- namespace Alpha
879
- end namespace
880
- `).ast;
881
- original.findChild(reflection_1.isNamespaceStatement).nameExpression = undefined;
882
- original.findChild(reflection_1.isNamespaceStatement).body = undefined;
883
- testClone(original);
884
- });
885
- it('clones ImportStatement', () => {
886
- const original = Parser_1.Parser.parse(`
887
- import "Something.brs"
888
- `).ast;
889
- testClone(original);
890
- });
891
- it('clones BinaryExpression', () => {
892
- const original = Parser_1.Parser.parse(`
893
- sub test()
894
- print 1 + 2
895
- end sub
896
- `).ast;
897
- testClone(original);
898
- });
899
- it('clones BinaryExpression with missing props', () => {
900
- const original = Parser_1.Parser.parse(`
901
- sub test()
902
- print 1 + 2
903
- end sub
904
- `).ast;
905
- original.findChild(reflection_1.isBinaryExpression).left = undefined;
906
- original.findChild(reflection_1.isBinaryExpression).right = undefined;
907
- testClone(original);
908
- });
909
- it('clones CallExpression', () => {
910
- const original = Parser_1.Parser.parse(`
911
- sub test()
912
- test()
913
- end sub
914
- `).ast;
915
- testClone(original);
916
- });
917
- it('clones CallExpression with args', () => {
918
- const original = Parser_1.Parser.parse(`
919
- sub test()
920
- test(1,2,3)
921
- end sub
922
- `).ast;
923
- testClone(original);
924
- });
925
- it('clones CallExpression with missing props', () => {
926
- const original = Parser_1.Parser.parse(`
927
- sub test()
928
- test(1,2,3)
929
- end sub
930
- `).ast;
931
- original.findChild(reflection_1.isCallExpression).callee = undefined;
932
- original.findChild(reflection_1.isCallExpression).args = undefined;
933
- testClone(original);
934
- });
935
- it('clones CallExpression with args containing undefined', () => {
936
- const original = Parser_1.Parser.parse(`
937
- sub test()
938
- test(1,2,3)
939
- end sub
940
- `).ast;
941
- original.findChild(reflection_1.isCallExpression).args[0] = undefined;
942
- testClone(original);
943
- });
944
- it('clones FunctionExpression', () => {
945
- const original = Parser_1.Parser.parse(`
946
- sub test()
947
- end sub
948
- `).ast;
949
- testClone(original);
950
- });
951
- it('clones FunctionExpression with undefined props', () => {
952
- const original = Parser_1.Parser.parse(`
953
- sub test()
954
- end sub
955
- `).ast;
956
- original.findChild(reflection_1.isFunctionExpression).parameters = undefined;
957
- original.findChild(reflection_1.isFunctionExpression).body = undefined;
958
- testClone(original);
959
- });
960
- it('clones FunctionExpression with a parameter that is undefined', () => {
961
- const original = Parser_1.Parser.parse(`
962
- sub test(p1)
963
- end sub
964
- `).ast;
965
- original.findChild(reflection_1.isFunctionExpression).parameters[0] = undefined;
966
- testClone(original);
967
- });
968
- it('clones FunctionParameterExpression', () => {
969
- const original = Parser_1.Parser.parse(`
970
- sub test(p1)
971
- end sub
972
- `).ast;
973
- testClone(original);
974
- });
975
- it('clones FunctionParameterExpression with default value', () => {
976
- const original = Parser_1.Parser.parse(`
977
- sub test(p1 = true)
978
- end sub
979
- `).ast;
980
- testClone(original);
981
- });
982
- it('clones FunctionParameterExpression with undefined default value', () => {
983
- const original = Parser_1.Parser.parse(`
984
- sub test(p1 = true)
985
- end sub
986
- `).ast;
987
- original.findChild(reflection_1.isFunctionExpression).parameters[0].defaultValue = undefined;
988
- testClone(original);
989
- });
990
- it('clones NamespacedVariableNameExpression', () => {
991
- const original = Parser_1.Parser.parse(`
992
- sub test(p1 as Alpha.Beta)
993
- end sub
994
- `).ast;
995
- testClone(original);
996
- });
997
- it('clones NamespacedVariableNameExpression with undefined expression', () => {
998
- const original = Parser_1.Parser.parse(`
999
- class Person extends Alpha.Humanoid
1000
- end class
1001
- `).ast;
1002
- original.findChild(reflection_1.isClassStatement).parentClassName.expression = undefined;
1003
- testClone(original);
1004
- });
1005
- it('clones DottedGetExpression', () => {
1006
- const original = Parser_1.Parser.parse(`
1007
- sub test()
1008
- print alpha.beta.charlie
1009
- end sub
1010
- `).ast;
1011
- testClone(original);
1012
- });
1013
- it('clones DottedGetExpression with undefined expression', () => {
1014
- const original = Parser_1.Parser.parse(`
1015
- sub test()
1016
- print alpha.beta.charlie
1017
- end sub
1018
- `).ast;
1019
- original.findChild(reflection_1.isDottedGetExpression).obj = undefined;
1020
- testClone(original);
1021
- });
1022
- it('clones XmlAttributeGetExpression', () => {
1023
- const original = Parser_1.Parser.parse(`
1024
- sub test()
1025
- print xml@name
1026
- end sub
1027
- `).ast;
1028
- testClone(original);
1029
- });
1030
- it('clones XmlAttributeGetExpression with undefined expression', () => {
1031
- const original = Parser_1.Parser.parse(`
1032
- sub test()
1033
- print xml@name
1034
- end sub
1035
- `).ast;
1036
- original.findChild(reflection_1.isXmlAttributeGetExpression).obj = undefined;
1037
- testClone(original);
1038
- });
1039
- it('clones IndexedGetExpression', () => {
1040
- const original = Parser_1.Parser.parse(`
1041
- sub test()
1042
- print m.stuff[0]
1043
- end sub
1044
- `).ast;
1045
- testClone(original);
1046
- });
1047
- it('clones IndexedGetExpression with undefined expression', () => {
1048
- const original = Parser_1.Parser.parse(`
1049
- sub test()
1050
- print m.stuff[0]
1051
- end sub
1052
- `).ast;
1053
- original.findChild(reflection_1.isIndexedGetExpression).obj = undefined;
1054
- original.findChild(reflection_1.isIndexedGetExpression).index = undefined;
1055
- original.findChild(reflection_1.isIndexedGetExpression).additionalIndexes = undefined;
1056
- testClone(original);
1057
- });
1058
- it('clones IndexedGetExpression with additionalIndexes', () => {
1059
- const original = Parser_1.Parser.parse(`
1060
- sub test()
1061
- print m.stuff[0, 1]
1062
- end sub
1063
- `).ast;
1064
- testClone(original);
1065
- });
1066
- it('clones IndexedGetExpression with additionalIndexes having undefined', () => {
1067
- const original = Parser_1.Parser.parse(`
1068
- sub test()
1069
- print m.stuff[0, 1]
1070
- end sub
1071
- `).ast;
1072
- original.findChild(reflection_1.isIndexedGetExpression).additionalIndexes[0] = undefined;
1073
- testClone(original);
1074
- });
1075
- it('clones GroupingExpression', () => {
1076
- const original = Parser_1.Parser.parse(`
1077
- sub test()
1078
- print (1 + 2)
1079
- end sub
1080
- `).ast;
1081
- testClone(original);
1082
- });
1083
- it('clones GroupingExpression with undefined expression', () => {
1084
- const original = Parser_1.Parser.parse(`
1085
- sub test()
1086
- print (1 + 2)
1087
- end sub
1088
- `).ast;
1089
- original.findChild(reflection_1.isGroupingExpression).expression = undefined;
1090
- testClone(original);
1091
- });
1092
- it('clones LiteralExpression', () => {
1093
- const original = Parser_1.Parser.parse(`
1094
- sub test()
1095
- print true
1096
- end sub
1097
- `).ast;
1098
- testClone(original);
1099
- });
1100
- it('clones ExcapedCharCodeLiteralExpression', () => {
1101
- const original = Parser_1.Parser.parse(`
1102
- sub test()
1103
- print \`\n\`
1104
- end sub
1105
- `).ast;
1106
- testClone(original);
1107
- });
1108
- it('clones ArrayLiteralExpression', () => {
1109
- const original = Parser_1.Parser.parse(`
1110
- sub test()
1111
- print []
1112
- end sub
1113
- `).ast;
1114
- testClone(original);
1115
- });
1116
- it('clones ArrayLiteralExpression with undefined items', () => {
1117
- const original = Parser_1.Parser.parse(`
1118
- sub test()
1119
- print []
1120
- end sub
1121
- `).ast;
1122
- original.findChild(reflection_1.isArrayLiteralExpression).elements = undefined;
1123
- testClone(original);
1124
- });
1125
- it('clones ArrayLiteralExpression with with elements having an undefined', () => {
1126
- const original = Parser_1.Parser.parse(`
1127
- sub test()
1128
- print [1,2,3]
1129
- end sub
1130
- `).ast;
1131
- original.findChild(reflection_1.isArrayLiteralExpression).elements[0] = undefined;
1132
- testClone(original);
1133
- });
1134
- it('clones AAMemberExpression', () => {
1135
- const original = Parser_1.Parser.parse(`
1136
- sub test()
1137
- movie = {
1138
- duration: 20
1139
- }
1140
- end sub
1141
- `).ast;
1142
- testClone(original);
1143
- });
1144
- it('clones AAMemberExpression with undefined expression', () => {
1145
- const original = Parser_1.Parser.parse(`
1146
- sub test()
1147
- movie = {
1148
- duration: 20
1149
- }
1150
- end sub
1151
- `).ast;
1152
- original.findChild(reflection_1.isAAMemberExpression).value = undefined;
1153
- testClone(original);
1154
- });
1155
- it('clones AAIndexedMemberExpression', () => {
1156
- const original = Parser_1.Parser.parse(`
1157
- sub test()
1158
- movie = {
1159
- [someEnum.key]: 20
1160
- }
1161
- end sub
1162
- `).ast;
1163
- testClone(original);
1164
- });
1165
- it('clones AAIndexedMemberExpression with undefined value', () => {
1166
- const original = Parser_1.Parser.parse(`
1167
- sub test()
1168
- movie = {
1169
- [someEnum.key]: 20
1170
- }
1171
- end sub
1172
- `).ast;
1173
- original.findChild(reflection_1.isAAIndexedMemberExpression).value = undefined;
1174
- testClone(original);
1175
- });
1176
- it('clones AALiteralExpression', () => {
1177
- const original = Parser_1.Parser.parse(`
1178
- sub test()
1179
- movie = {
1180
- duration: 20
1181
- }
1182
- end sub
1183
- `).ast;
1184
- testClone(original);
1185
- });
1186
- it('clones AALiteralExpression with undefined items', () => {
1187
- const original = Parser_1.Parser.parse(`
1188
- sub test()
1189
- movie = {
1190
- duration: 20
1191
- }
1192
- end sub
1193
- `).ast;
1194
- original.findChild(reflection_1.isAALiteralExpression).elements = undefined;
1195
- testClone(original);
1196
- });
1197
- it('clones AALiteralExpression with undefined items', () => {
1198
- const original = Parser_1.Parser.parse(`
1199
- sub test()
1200
- movie = {
1201
- duration: 20
1202
- }
1203
- end sub
1204
- `).ast;
1205
- original.findChild(reflection_1.isAALiteralExpression).elements.push(undefined);
1206
- testClone(original);
1207
- });
1208
- it('clones UnaryExpression', () => {
1209
- const original = Parser_1.Parser.parse(`
1210
- sub test()
1211
- print not true
1212
- end sub
1213
- `).ast;
1214
- testClone(original);
1215
- });
1216
- it('clones UnaryExpression with undefined expression', () => {
1217
- const original = Parser_1.Parser.parse(`
1218
- sub test()
1219
- print not true
1220
- end sub
1221
- `).ast;
1222
- original.findChild(reflection_1.isUnaryExpression).right = undefined;
1223
- testClone(original);
1224
- });
1225
- it('clones SourceLiteralExpression', () => {
1226
- const original = Parser_1.Parser.parse(`
1227
- sub test()
1228
- print LINE_NUM
1229
- end sub
1230
- `).ast;
1231
- testClone(original);
1232
- });
1233
- it('clones NewExpression', () => {
1234
- const original = Parser_1.Parser.parse(`
1235
- sub test()
1236
- print new Person()
1237
- end sub
1238
- `).ast;
1239
- testClone(original);
1240
- });
1241
- it('clones NewExpression with undefined expression', () => {
1242
- const original = Parser_1.Parser.parse(`
1243
- sub test()
1244
- print new Person()
1245
- end sub
1246
- `).ast;
1247
- original.findChild(reflection_1.isNewExpression).call = undefined;
1248
- testClone(original);
1249
- });
1250
- it('clones CallfuncExpression', () => {
1251
- const original = Parser_1.Parser.parse(`
1252
- sub test()
1253
- print node@.run(1)
1254
- end sub
1255
- `).ast;
1256
- testClone(original);
1257
- });
1258
- it('clones CallfuncExpression with undefined expression', () => {
1259
- const original = Parser_1.Parser.parse(`
1260
- sub test()
1261
- print node@.run()
1262
- end sub
1263
- `).ast;
1264
- original.findChild(reflection_1.isCallfuncExpression).callee = undefined;
1265
- original.findChild(reflection_1.isCallfuncExpression).args = undefined;
1266
- testClone(original);
1267
- });
1268
- it('clones CallfuncExpression with undefined args', () => {
1269
- const original = Parser_1.Parser.parse(`
1270
- sub test()
1271
- print node@.run()
1272
- end sub
1273
- `).ast;
1274
- original.findChild(reflection_1.isCallfuncExpression).args[0] = undefined;
1275
- testClone(original);
1276
- });
1277
- it('clones TemplateStringQuasiExpression', () => {
1278
- const original = Parser_1.Parser.parse(`
1279
- sub test()
1280
- print \`hello \${name}\`
1281
- end sub
1282
- `).ast;
1283
- testClone(original);
1284
- });
1285
- it('clones TemplateStringQuasiExpression with undefined expressions', () => {
1286
- const original = Parser_1.Parser.parse(`
1287
- sub test()
1288
- print \`hello \${name}\`
1289
- end sub
1290
- `).ast;
1291
- original.findChild(reflection_1.isTemplateStringQuasiExpression).expressions = undefined;
1292
- testClone(original);
1293
- });
1294
- it('clones TemplateStringQuasiExpression with undefined expressions', () => {
1295
- const original = Parser_1.Parser.parse(`
1296
- sub test()
1297
- print \`hello \${name}\`
1298
- end sub
1299
- `).ast;
1300
- original.findChild(reflection_1.isTemplateStringQuasiExpression).expressions[0] = undefined;
1301
- testClone(original);
1302
- });
1303
- it('clones TemplateStringExpression', () => {
1304
- const original = Parser_1.Parser.parse(`
1305
- sub test()
1306
- print \`hello \${name} \\n\`
1307
- end sub
1308
- `).ast;
1309
- testClone(original);
1310
- });
1311
- it('clones TemplateStringExpression with undefined expressions', () => {
1312
- const original = Parser_1.Parser.parse(`
1313
- sub test()
1314
- print \`hello \${name}\`
1315
- end sub
1316
- `).ast;
1317
- original.findChild(reflection_1.isTemplateStringExpression).quasis = undefined;
1318
- original.findChild(reflection_1.isTemplateStringExpression).expressions = undefined;
1319
- testClone(original);
1320
- });
1321
- it('clones TemplateStringExpression with undefined expressions', () => {
1322
- const original = Parser_1.Parser.parse(`
1323
- sub test()
1324
- print \`hello \${name}\`
1325
- end sub
1326
- `).ast;
1327
- original.findChild(reflection_1.isTemplateStringExpression).quasis.push(undefined);
1328
- original.findChild(reflection_1.isTemplateStringExpression).expressions.push(undefined);
1329
- testClone(original);
1330
- });
1331
- it('clones TemplateStringExpression', () => {
1332
- const original = Parser_1.Parser.parse(`
1333
- sub test()
1334
- print tag\`hello \${name} \\n\`
1335
- end sub
1336
- `).ast;
1337
- testClone(original);
1338
- });
1339
- it('clones TemplateStringExpression with undefined expressions', () => {
1340
- const original = Parser_1.Parser.parse(`
1341
- sub test()
1342
- print tag\`hello \${name}\`
1343
- end sub
1344
- `).ast;
1345
- original.findChild(reflection_1.isTaggedTemplateStringExpression).quasis = undefined;
1346
- original.findChild(reflection_1.isTaggedTemplateStringExpression).expressions = undefined;
1347
- testClone(original);
1348
- });
1349
- it('clones TemplateStringExpression with undefined expressions', () => {
1350
- const original = Parser_1.Parser.parse(`
1351
- sub test()
1352
- print tag\`hello \${name}\`
1353
- end sub
1354
- `).ast;
1355
- original.findChild(reflection_1.isTaggedTemplateStringExpression).quasis.push(undefined);
1356
- original.findChild(reflection_1.isTaggedTemplateStringExpression).expressions.push(undefined);
1357
- testClone(original);
1358
- });
1359
- it('clones TernaryExpression', () => {
1360
- const original = Parser_1.Parser.parse(`
1361
- sub test()
1362
- print true ? 1 : 2
1363
- end sub
1364
- `).ast;
1365
- testClone(original);
1366
- });
1367
- it('clones TernaryExpression with undefined expressions', () => {
1368
- const original = Parser_1.Parser.parse(`
1369
- sub test()
1370
- print true ? 1 : 2
1371
- end sub
1372
- `).ast;
1373
- original.findChild(reflection_1.isTernaryExpression).test = undefined;
1374
- original.findChild(reflection_1.isTernaryExpression).consequent = undefined;
1375
- original.findChild(reflection_1.isTernaryExpression).alternate = undefined;
1376
- testClone(original);
1377
- });
1378
- it('clones NullCoalescingExpression', () => {
1379
- const original = Parser_1.Parser.parse(`
1380
- sub test()
1381
- print a ?? b
1382
- end sub
1383
- `).ast;
1384
- testClone(original);
1385
- });
1386
- it('clones NullCoalescingExpression with undefined expressions', () => {
1387
- const original = Parser_1.Parser.parse(`
1388
- sub test()
1389
- print a ?? b
1390
- end sub
1391
- `).ast;
1392
- original.findChild(reflection_1.isNullCoalescingExpression).consequent = undefined;
1393
- original.findChild(reflection_1.isNullCoalescingExpression).alternate = undefined;
1394
- testClone(original);
1395
- });
1396
- it('clones RegexLiteralExpression', () => {
1397
- const original = Parser_1.Parser.parse(`
1398
- sub test()
1399
- print /test/gi
1400
- end sub
1401
- `).ast;
1402
- testClone(original);
1403
- });
1404
- it('clones TypeCastExpression', () => {
1405
- const original = Parser_1.Parser.parse(`
1406
- sub test()
1407
- print name as string
1408
- end sub
1409
- `).ast;
1410
- testClone(original);
1411
- });
1412
- it('clones TypeCastExpression with undefined expression', () => {
1413
- const original = Parser_1.Parser.parse(`
1414
- sub test()
1415
- print name as string
1416
- end sub
1417
- `).ast;
1418
- original.findChild(reflection_1.isTypeCastExpression).obj = undefined;
1419
- testClone(original);
1420
- });
1421
- it('clones AnnotationExpressions above every statement type', () => {
1422
- const original = Parser_1.Parser.parse(`
1423
- @annotation()
1424
- sub test()
1425
- @annotation()
1426
- statement = true
1427
- @annotation()
1428
- call()
1429
- @annotation()
1430
- 'comment
1431
- end sub
1432
-
1433
- @annotation()
1434
- class Person
1435
- end class
1436
-
1437
- @annotation()
1438
- enum Direction
1439
- end enum
1440
-
1441
- @annotation()
1442
- namespace alpha
1443
- end namespace
1444
-
1445
- @annotation()
1446
- const thing = 1
1447
- `).ast;
1448
- testClone(original);
1449
- });
1450
- });
1451
- });
1452
- //# sourceMappingURL=AstNode.spec.js.map