brighterscript 1.0.0-alpha.5 → 1.0.0-alpha.51

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 (652) hide show
  1. package/README.md +79 -138
  2. package/bsconfig.schema.json +196 -5
  3. package/dist/ActionPipeline.d.ts +10 -0
  4. package/dist/ActionPipeline.js +40 -0
  5. package/dist/ActionPipeline.js.map +1 -0
  6. package/dist/AstValidationSegmenter.d.ts +45 -0
  7. package/dist/AstValidationSegmenter.js +322 -0
  8. package/dist/AstValidationSegmenter.js.map +1 -0
  9. package/dist/BsConfig.d.ts +161 -43
  10. package/dist/BusyStatusTracker.d.ts +61 -0
  11. package/dist/BusyStatusTracker.js +148 -0
  12. package/dist/BusyStatusTracker.js.map +1 -0
  13. package/dist/Cache.d.ts +3 -8
  14. package/dist/Cache.js +9 -14
  15. package/dist/Cache.js.map +1 -1
  16. package/dist/CacheVerifier.d.ts +7 -0
  17. package/dist/CacheVerifier.js +20 -0
  18. package/dist/CacheVerifier.js.map +1 -0
  19. package/dist/CodeActionUtil.d.ts +29 -4
  20. package/dist/CodeActionUtil.js +22 -5
  21. package/dist/CodeActionUtil.js.map +1 -1
  22. package/dist/CommentFlagProcessor.d.ts +20 -15
  23. package/dist/CommentFlagProcessor.js +143 -58
  24. package/dist/CommentFlagProcessor.js.map +1 -1
  25. package/dist/CrossScopeValidator.d.ts +68 -0
  26. package/dist/CrossScopeValidator.js +650 -0
  27. package/dist/CrossScopeValidator.js.map +1 -0
  28. package/dist/DependencyGraph.d.ts +8 -3
  29. package/dist/DependencyGraph.js +49 -16
  30. package/dist/DependencyGraph.js.map +1 -1
  31. package/dist/DiagnosticCollection.d.ts +21 -5
  32. package/dist/DiagnosticCollection.js +77 -24
  33. package/dist/DiagnosticCollection.js.map +1 -1
  34. package/dist/DiagnosticFilterer.d.ts +27 -6
  35. package/dist/DiagnosticFilterer.js +273 -60
  36. package/dist/DiagnosticFilterer.js.map +1 -1
  37. package/dist/DiagnosticManager.d.ts +83 -0
  38. package/dist/DiagnosticManager.js +422 -0
  39. package/dist/DiagnosticManager.js.map +1 -0
  40. package/dist/DiagnosticMessages.d.ts +602 -196
  41. package/dist/DiagnosticMessages.js +926 -342
  42. package/dist/DiagnosticMessages.js.map +1 -1
  43. package/dist/DiagnosticSeverityAdjuster.d.ts +7 -0
  44. package/dist/DiagnosticSeverityAdjuster.js +45 -0
  45. package/dist/DiagnosticSeverityAdjuster.js.map +1 -0
  46. package/dist/FunctionScope.d.ts +28 -0
  47. package/dist/FunctionScope.js +52 -0
  48. package/dist/FunctionScope.js.map +1 -0
  49. package/dist/KeyedThrottler.d.ts +3 -3
  50. package/dist/KeyedThrottler.js +3 -3
  51. package/dist/KeyedThrottler.js.map +1 -1
  52. package/dist/LanguageServer.d.ts +136 -104
  53. package/dist/LanguageServer.js +577 -741
  54. package/dist/LanguageServer.js.map +1 -1
  55. package/dist/Logger.d.ts +17 -13
  56. package/dist/Logger.js +64 -34
  57. package/dist/Logger.js.map +1 -1
  58. package/dist/PluginInterface.d.ts +32 -10
  59. package/dist/PluginInterface.js +117 -7
  60. package/dist/PluginInterface.js.map +1 -1
  61. package/dist/Program.d.ts +302 -98
  62. package/dist/Program.js +1613 -726
  63. package/dist/Program.js.map +1 -1
  64. package/dist/ProgramBuilder.d.ts +39 -22
  65. package/dist/ProgramBuilder.js +245 -179
  66. package/dist/ProgramBuilder.js.map +1 -1
  67. package/dist/Scope.d.ts +227 -106
  68. package/dist/Scope.js +609 -557
  69. package/dist/Scope.js.map +1 -1
  70. package/dist/ScopeNamespaceLookup.d.ts +73 -0
  71. package/dist/ScopeNamespaceLookup.js +242 -0
  72. package/dist/ScopeNamespaceLookup.js.map +1 -0
  73. package/dist/SemanticTokenUtils.js +5 -1
  74. package/dist/SemanticTokenUtils.js.map +1 -1
  75. package/dist/Stopwatch.d.ts +4 -0
  76. package/dist/Stopwatch.js +8 -1
  77. package/dist/Stopwatch.js.map +1 -1
  78. package/dist/SymbolTable.d.ts +145 -26
  79. package/dist/SymbolTable.js +575 -64
  80. package/dist/SymbolTable.js.map +1 -1
  81. package/dist/SymbolTypeFlag.d.ts +9 -0
  82. package/dist/SymbolTypeFlag.js +14 -0
  83. package/dist/SymbolTypeFlag.js.map +1 -0
  84. package/dist/Throttler.d.ts +12 -0
  85. package/dist/Throttler.js +39 -0
  86. package/dist/Throttler.js.map +1 -1
  87. package/dist/Watcher.d.ts +0 -3
  88. package/dist/Watcher.js +0 -3
  89. package/dist/Watcher.js.map +1 -1
  90. package/dist/XmlScope.d.ts +5 -15
  91. package/dist/XmlScope.js +34 -90
  92. package/dist/XmlScope.js.map +1 -1
  93. package/dist/astUtils/CachedLookups.d.ts +50 -0
  94. package/dist/astUtils/CachedLookups.js +337 -0
  95. package/dist/astUtils/CachedLookups.js.map +1 -0
  96. package/dist/astUtils/Editor.d.ts +69 -0
  97. package/dist/astUtils/Editor.js +245 -0
  98. package/dist/astUtils/Editor.js.map +1 -0
  99. package/dist/astUtils/creators.d.ts +54 -19
  100. package/dist/astUtils/creators.js +242 -42
  101. package/dist/astUtils/creators.js.map +1 -1
  102. package/dist/astUtils/reflection.d.ts +199 -85
  103. package/dist/astUtils/reflection.js +518 -145
  104. package/dist/astUtils/reflection.js.map +1 -1
  105. package/dist/astUtils/stackedVisitor.js.map +1 -1
  106. package/dist/astUtils/visitors.d.ts +117 -53
  107. package/dist/astUtils/visitors.js +95 -15
  108. package/dist/astUtils/visitors.js.map +1 -1
  109. package/dist/astUtils/xml.d.ts +9 -8
  110. package/dist/astUtils/xml.js +12 -7
  111. package/dist/astUtils/xml.js.map +1 -1
  112. package/dist/bscPlugin/BscPlugin.d.ts +26 -4
  113. package/dist/bscPlugin/BscPlugin.js +96 -4
  114. package/dist/bscPlugin/BscPlugin.js.map +1 -1
  115. package/dist/bscPlugin/CallExpressionInfo.d.ts +36 -0
  116. package/dist/bscPlugin/CallExpressionInfo.js +142 -0
  117. package/dist/bscPlugin/CallExpressionInfo.js.map +1 -0
  118. package/dist/bscPlugin/FileWriter.d.ts +19 -0
  119. package/dist/bscPlugin/FileWriter.js +79 -0
  120. package/dist/bscPlugin/FileWriter.js.map +1 -0
  121. package/dist/bscPlugin/SignatureHelpUtil.d.ts +10 -0
  122. package/dist/bscPlugin/SignatureHelpUtil.js +137 -0
  123. package/dist/bscPlugin/SignatureHelpUtil.js.map +1 -0
  124. package/dist/bscPlugin/codeActions/CodeActionsProcessor.d.ts +109 -7
  125. package/dist/bscPlugin/codeActions/CodeActionsProcessor.js +676 -26
  126. package/dist/bscPlugin/codeActions/CodeActionsProcessor.js.map +1 -1
  127. package/dist/bscPlugin/codeActions/FixAllCodeActionsProcessor.d.ts +17 -0
  128. package/dist/bscPlugin/codeActions/FixAllCodeActionsProcessor.js +66 -0
  129. package/dist/bscPlugin/codeActions/FixAllCodeActionsProcessor.js.map +1 -0
  130. package/dist/bscPlugin/codeActions/codeActionHelpers.d.ts +18 -0
  131. package/dist/bscPlugin/codeActions/codeActionHelpers.js +31 -0
  132. package/dist/bscPlugin/codeActions/codeActionHelpers.js.map +1 -0
  133. package/dist/bscPlugin/completions/CompletionsProcessor.d.ts +65 -0
  134. package/dist/bscPlugin/completions/CompletionsProcessor.js +633 -0
  135. package/dist/bscPlugin/completions/CompletionsProcessor.js.map +1 -0
  136. package/dist/bscPlugin/definition/DefinitionProvider.d.ts +13 -0
  137. package/dist/bscPlugin/definition/DefinitionProvider.js +220 -0
  138. package/dist/bscPlugin/definition/DefinitionProvider.js.map +1 -0
  139. package/dist/bscPlugin/fileProviders/FileProvider.d.ts +9 -0
  140. package/dist/bscPlugin/fileProviders/FileProvider.js +51 -0
  141. package/dist/bscPlugin/fileProviders/FileProvider.js.map +1 -0
  142. package/dist/bscPlugin/hover/HoverProcessor.d.ts +18 -0
  143. package/dist/bscPlugin/hover/HoverProcessor.js +238 -0
  144. package/dist/bscPlugin/hover/HoverProcessor.js.map +1 -0
  145. package/dist/bscPlugin/references/ReferencesProvider.d.ts +12 -0
  146. package/dist/bscPlugin/references/ReferencesProvider.js +57 -0
  147. package/dist/bscPlugin/references/ReferencesProvider.js.map +1 -0
  148. package/dist/bscPlugin/selectionRanges/SelectionRangesProcessor.d.ts +7 -0
  149. package/dist/bscPlugin/selectionRanges/SelectionRangesProcessor.js +77 -0
  150. package/dist/bscPlugin/selectionRanges/SelectionRangesProcessor.js.map +1 -0
  151. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.d.ts +14 -0
  152. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js +164 -0
  153. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js.map +1 -0
  154. package/dist/bscPlugin/serialize/BslibManager.d.ts +12 -0
  155. package/dist/bscPlugin/serialize/BslibManager.js +46 -0
  156. package/dist/bscPlugin/serialize/BslibManager.js.map +1 -0
  157. package/dist/bscPlugin/serialize/FileSerializer.d.ts +9 -0
  158. package/dist/bscPlugin/serialize/FileSerializer.js +80 -0
  159. package/dist/bscPlugin/serialize/FileSerializer.js.map +1 -0
  160. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.d.ts +7 -0
  161. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.js +22 -0
  162. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.js.map +1 -0
  163. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.d.ts +7 -0
  164. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.js +26 -0
  165. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.js.map +1 -0
  166. package/dist/bscPlugin/symbols/symbolUtils.d.ts +5 -0
  167. package/dist/bscPlugin/symbols/symbolUtils.js +141 -0
  168. package/dist/bscPlugin/symbols/symbolUtils.js.map +1 -0
  169. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.d.ts +34 -0
  170. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js +504 -0
  171. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js.map +1 -0
  172. package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.d.ts +12 -0
  173. package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js +99 -0
  174. package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js.map +1 -0
  175. package/dist/bscPlugin/validation/BrsFileAfterValidator.d.ts +7 -0
  176. package/dist/bscPlugin/validation/BrsFileAfterValidator.js +18 -0
  177. package/dist/bscPlugin/validation/BrsFileAfterValidator.js.map +1 -0
  178. package/dist/bscPlugin/validation/BrsFileValidator.d.ts +51 -0
  179. package/dist/bscPlugin/validation/BrsFileValidator.js +714 -0
  180. package/dist/bscPlugin/validation/BrsFileValidator.js.map +1 -0
  181. package/dist/bscPlugin/validation/ProgramValidator.d.ts +11 -0
  182. package/dist/bscPlugin/validation/ProgramValidator.js +33 -0
  183. package/dist/bscPlugin/validation/ProgramValidator.js.map +1 -0
  184. package/dist/bscPlugin/validation/ScopeValidator.d.ts +158 -0
  185. package/dist/bscPlugin/validation/ScopeValidator.js +1481 -0
  186. package/dist/bscPlugin/validation/ScopeValidator.js.map +1 -0
  187. package/dist/bscPlugin/validation/XmlFileValidator.d.ts +8 -0
  188. package/dist/bscPlugin/validation/XmlFileValidator.js +50 -0
  189. package/dist/bscPlugin/validation/XmlFileValidator.js.map +1 -0
  190. package/dist/cli.js +140 -28
  191. package/dist/cli.js.map +1 -1
  192. package/dist/common/Sequencer.d.ts +53 -0
  193. package/dist/common/Sequencer.js +233 -0
  194. package/dist/common/Sequencer.js.map +1 -0
  195. package/dist/deferred.d.ts +5 -3
  196. package/dist/deferred.js +10 -0
  197. package/dist/deferred.js.map +1 -1
  198. package/dist/diagnosticUtils.d.ts +61 -4
  199. package/dist/diagnosticUtils.js +285 -25
  200. package/dist/diagnosticUtils.js.map +1 -1
  201. package/dist/examples/plugins/removePrint.d.ts +2 -2
  202. package/dist/examples/plugins/removePrint.js +8 -12
  203. package/dist/examples/plugins/removePrint.js.map +1 -1
  204. package/dist/files/AssetFile.d.ts +24 -0
  205. package/dist/files/AssetFile.js +25 -0
  206. package/dist/files/AssetFile.js.map +1 -0
  207. package/dist/files/BrsFile.d.ts +161 -87
  208. package/dist/files/BrsFile.js +919 -936
  209. package/dist/files/BrsFile.js.map +1 -1
  210. package/dist/files/BscFile.d.ts +102 -0
  211. package/dist/files/BscFile.js +15 -0
  212. package/dist/files/BscFile.js.map +1 -0
  213. package/dist/files/Factory.d.ts +25 -0
  214. package/dist/files/Factory.js +22 -0
  215. package/dist/files/Factory.js.map +1 -0
  216. package/dist/files/LazyFileData.d.ts +21 -0
  217. package/dist/files/LazyFileData.js +54 -0
  218. package/dist/files/LazyFileData.js.map +1 -0
  219. package/dist/files/XmlFile.d.ts +80 -41
  220. package/dist/files/XmlFile.js +162 -137
  221. package/dist/files/XmlFile.js.map +1 -1
  222. package/dist/globalCallables.d.ts +3 -1
  223. package/dist/globalCallables.js +424 -184
  224. package/dist/globalCallables.js.map +1 -1
  225. package/dist/index.d.ts +32 -4
  226. package/dist/index.js +54 -7
  227. package/dist/index.js.map +1 -1
  228. package/dist/interfaces.d.ts +987 -125
  229. package/dist/interfaces.js +21 -0
  230. package/dist/interfaces.js.map +1 -1
  231. package/dist/lexer/Lexer.d.ts +51 -12
  232. package/dist/lexer/Lexer.js +214 -65
  233. package/dist/lexer/Lexer.js.map +1 -1
  234. package/dist/lexer/Token.d.ts +27 -11
  235. package/dist/lexer/Token.js +10 -2
  236. package/dist/lexer/Token.js.map +1 -1
  237. package/dist/lexer/TokenKind.d.ts +48 -2
  238. package/dist/lexer/TokenKind.js +167 -10
  239. package/dist/lexer/TokenKind.js.map +1 -1
  240. package/dist/logging.d.ts +14 -0
  241. package/dist/logging.js +29 -0
  242. package/dist/logging.js.map +1 -0
  243. package/dist/lsp/ActionQueue.d.ts +35 -0
  244. package/dist/lsp/ActionQueue.js +115 -0
  245. package/dist/lsp/ActionQueue.js.map +1 -0
  246. package/dist/lsp/DocumentManager.d.ts +63 -0
  247. package/dist/lsp/DocumentManager.js +122 -0
  248. package/dist/lsp/DocumentManager.js.map +1 -0
  249. package/dist/lsp/LspProject.d.ts +287 -0
  250. package/dist/lsp/LspProject.js +3 -0
  251. package/dist/lsp/LspProject.js.map +1 -0
  252. package/dist/lsp/PathFilterer.d.ts +75 -0
  253. package/dist/lsp/PathFilterer.js +196 -0
  254. package/dist/lsp/PathFilterer.js.map +1 -0
  255. package/dist/lsp/Project.d.ts +200 -0
  256. package/dist/lsp/Project.js +562 -0
  257. package/dist/lsp/Project.js.map +1 -0
  258. package/dist/lsp/ProjectManager.d.ts +288 -0
  259. package/dist/lsp/ProjectManager.js +967 -0
  260. package/dist/lsp/ProjectManager.js.map +1 -0
  261. package/dist/lsp/ReaderWriterManager.d.ts +21 -0
  262. package/dist/lsp/ReaderWriterManager.js +60 -0
  263. package/dist/lsp/ReaderWriterManager.js.map +1 -0
  264. package/dist/lsp/worker/MessageHandler.d.ts +99 -0
  265. package/dist/lsp/worker/MessageHandler.js +138 -0
  266. package/dist/lsp/worker/MessageHandler.js.map +1 -0
  267. package/dist/lsp/worker/WorkerPool.d.ts +38 -0
  268. package/dist/lsp/worker/WorkerPool.js +78 -0
  269. package/dist/lsp/worker/WorkerPool.js.map +1 -0
  270. package/dist/lsp/worker/WorkerThreadProject.d.ts +168 -0
  271. package/dist/lsp/worker/WorkerThreadProject.js +205 -0
  272. package/dist/lsp/worker/WorkerThreadProject.js.map +1 -0
  273. package/dist/lsp/worker/WorkerThreadProjectRunner.d.ts +15 -0
  274. package/dist/lsp/worker/WorkerThreadProjectRunner.js +58 -0
  275. package/dist/lsp/worker/WorkerThreadProjectRunner.js.map +1 -0
  276. package/dist/lsp/worker/run.js +14 -0
  277. package/dist/lsp/worker/run.js.map +1 -0
  278. package/dist/parser/AstNode.d.ts +205 -0
  279. package/dist/parser/AstNode.js +305 -0
  280. package/dist/parser/AstNode.js.map +1 -0
  281. package/dist/parser/BrightScriptDocParser.d.ts +56 -0
  282. package/dist/parser/BrightScriptDocParser.js +294 -0
  283. package/dist/parser/BrightScriptDocParser.js.map +1 -0
  284. package/dist/parser/BrsTranspileState.d.ts +22 -3
  285. package/dist/parser/BrsTranspileState.js +19 -0
  286. package/dist/parser/BrsTranspileState.js.map +1 -1
  287. package/dist/parser/Expression.d.ts +601 -220
  288. package/dist/parser/Expression.js +1516 -502
  289. package/dist/parser/Expression.js.map +1 -1
  290. package/dist/parser/Parser.d.ts +137 -121
  291. package/dist/parser/Parser.js +1808 -982
  292. package/dist/parser/Parser.js.map +1 -1
  293. package/dist/parser/SGParser.d.ts +30 -13
  294. package/dist/parser/SGParser.js +94 -56
  295. package/dist/parser/SGParser.js.map +1 -1
  296. package/dist/parser/SGTypes.d.ts +134 -46
  297. package/dist/parser/SGTypes.js +206 -115
  298. package/dist/parser/SGTypes.js.map +1 -1
  299. package/dist/parser/Statement.d.ts +854 -267
  300. package/dist/parser/Statement.js +2416 -621
  301. package/dist/parser/Statement.js.map +1 -1
  302. package/dist/parser/TranspileState.d.ts +30 -14
  303. package/dist/parser/TranspileState.js +124 -27
  304. package/dist/parser/TranspileState.js.map +1 -1
  305. package/dist/preprocessor/Manifest.d.ts +6 -6
  306. package/dist/preprocessor/Manifest.js +17 -38
  307. package/dist/preprocessor/Manifest.js.map +1 -1
  308. package/dist/roku-types/data.json +20554 -0
  309. package/dist/roku-types/index.d.ts +5726 -0
  310. package/dist/roku-types/index.js +11 -0
  311. package/dist/roku-types/index.js.map +1 -0
  312. package/dist/types/ArrayType.d.ts +12 -5
  313. package/dist/types/ArrayType.js +95 -25
  314. package/dist/types/ArrayType.js.map +1 -1
  315. package/dist/types/AssociativeArrayType.d.ts +15 -0
  316. package/dist/types/AssociativeArrayType.js +64 -0
  317. package/dist/types/AssociativeArrayType.js.map +1 -0
  318. package/dist/types/BaseFunctionType.d.ts +10 -0
  319. package/dist/types/BaseFunctionType.js +26 -0
  320. package/dist/types/BaseFunctionType.js.map +1 -0
  321. package/dist/types/BooleanType.d.ts +9 -5
  322. package/dist/types/BooleanType.js +19 -8
  323. package/dist/types/BooleanType.js.map +1 -1
  324. package/dist/types/BscType.d.ts +41 -3
  325. package/dist/types/BscType.js +152 -0
  326. package/dist/types/BscType.js.map +1 -1
  327. package/dist/types/BscTypeKind.d.ts +28 -0
  328. package/dist/types/BscTypeKind.js +33 -0
  329. package/dist/types/BscTypeKind.js.map +1 -0
  330. package/dist/types/BuiltInInterfaceAdder.d.ts +28 -0
  331. package/dist/types/BuiltInInterfaceAdder.js +212 -0
  332. package/dist/types/BuiltInInterfaceAdder.js.map +1 -0
  333. package/dist/types/CallFuncableType.d.ts +24 -0
  334. package/dist/types/CallFuncableType.js +91 -0
  335. package/dist/types/CallFuncableType.js.map +1 -0
  336. package/dist/types/ClassType.d.ts +17 -0
  337. package/dist/types/ClassType.js +63 -0
  338. package/dist/types/ClassType.js.map +1 -0
  339. package/dist/types/ComponentType.d.ts +22 -0
  340. package/dist/types/ComponentType.js +110 -0
  341. package/dist/types/ComponentType.js.map +1 -0
  342. package/dist/types/DoubleType.d.ts +10 -5
  343. package/dist/types/DoubleType.js +21 -17
  344. package/dist/types/DoubleType.js.map +1 -1
  345. package/dist/types/DynamicType.d.ts +13 -5
  346. package/dist/types/DynamicType.js +26 -5
  347. package/dist/types/DynamicType.js.map +1 -1
  348. package/dist/types/EnumType.d.ts +42 -0
  349. package/dist/types/EnumType.js +101 -0
  350. package/dist/types/EnumType.js.map +1 -0
  351. package/dist/types/FloatType.d.ts +10 -5
  352. package/dist/types/FloatType.js +21 -17
  353. package/dist/types/FloatType.js.map +1 -1
  354. package/dist/types/FunctionType.d.ts +8 -22
  355. package/dist/types/FunctionType.js +25 -63
  356. package/dist/types/FunctionType.js.map +1 -1
  357. package/dist/types/InheritableType.d.ts +29 -0
  358. package/dist/types/InheritableType.js +173 -0
  359. package/dist/types/InheritableType.js.map +1 -0
  360. package/dist/types/InlineInterfaceType.d.ts +5 -0
  361. package/dist/types/InlineInterfaceType.js +17 -0
  362. package/dist/types/InlineInterfaceType.js.map +1 -0
  363. package/dist/types/IntegerType.d.ts +10 -5
  364. package/dist/types/IntegerType.js +21 -17
  365. package/dist/types/IntegerType.js.map +1 -1
  366. package/dist/types/InterfaceType.d.ts +14 -6
  367. package/dist/types/InterfaceType.js +30 -15
  368. package/dist/types/InterfaceType.js.map +1 -1
  369. package/dist/types/IntersectionType.d.ts +29 -0
  370. package/dist/types/IntersectionType.js +256 -0
  371. package/dist/types/IntersectionType.js.map +1 -0
  372. package/dist/types/InvalidType.d.ts +10 -5
  373. package/dist/types/InvalidType.js +21 -9
  374. package/dist/types/InvalidType.js.map +1 -1
  375. package/dist/types/LongIntegerType.d.ts +10 -5
  376. package/dist/types/LongIntegerType.js +21 -17
  377. package/dist/types/LongIntegerType.js.map +1 -1
  378. package/dist/types/NamespaceType.d.ts +12 -0
  379. package/dist/types/NamespaceType.js +28 -0
  380. package/dist/types/NamespaceType.js.map +1 -0
  381. package/dist/types/ObjectType.d.ts +12 -5
  382. package/dist/types/ObjectType.js +25 -8
  383. package/dist/types/ObjectType.js.map +1 -1
  384. package/dist/types/ReferenceType.d.ts +123 -0
  385. package/dist/types/ReferenceType.js +726 -0
  386. package/dist/types/ReferenceType.js.map +1 -0
  387. package/dist/types/StringType.d.ts +12 -5
  388. package/dist/types/StringType.js +23 -8
  389. package/dist/types/StringType.js.map +1 -1
  390. package/dist/types/TypeStatementType.d.ts +19 -0
  391. package/dist/types/TypeStatementType.js +56 -0
  392. package/dist/types/TypeStatementType.js.map +1 -0
  393. package/dist/types/TypedFunctionType.d.ts +34 -0
  394. package/dist/types/TypedFunctionType.js +157 -0
  395. package/dist/types/TypedFunctionType.js.map +1 -0
  396. package/dist/types/UninitializedType.d.ts +11 -6
  397. package/dist/types/UninitializedType.js +20 -11
  398. package/dist/types/UninitializedType.js.map +1 -1
  399. package/dist/types/UnionType.d.ts +27 -0
  400. package/dist/types/UnionType.js +196 -0
  401. package/dist/types/UnionType.js.map +1 -0
  402. package/dist/types/VoidType.d.ts +11 -5
  403. package/dist/types/VoidType.js +22 -8
  404. package/dist/types/VoidType.js.map +1 -1
  405. package/dist/types/helpers.d.ts +51 -0
  406. package/dist/types/helpers.js +329 -0
  407. package/dist/types/helpers.js.map +1 -0
  408. package/dist/types/index.d.ts +22 -0
  409. package/dist/types/index.js +39 -0
  410. package/dist/types/index.js.map +1 -0
  411. package/dist/types/roFunctionType.d.ts +11 -0
  412. package/dist/types/roFunctionType.js +37 -0
  413. package/dist/types/roFunctionType.js.map +1 -0
  414. package/dist/util.d.ts +325 -185
  415. package/dist/util.js +2135 -568
  416. package/dist/util.js.map +1 -1
  417. package/dist/validators/ClassValidator.d.ts +9 -15
  418. package/dist/validators/ClassValidator.js +93 -138
  419. package/dist/validators/ClassValidator.js.map +1 -1
  420. package/package.json +183 -138
  421. package/CHANGELOG.md +0 -1188
  422. package/dist/astUtils/creators.spec.js +0 -21
  423. package/dist/astUtils/creators.spec.js.map +0 -1
  424. package/dist/astUtils/index.d.ts +0 -7
  425. package/dist/astUtils/index.js +0 -26
  426. package/dist/astUtils/index.js.map +0 -1
  427. package/dist/astUtils/reflection.spec.d.ts +0 -1
  428. package/dist/astUtils/reflection.spec.js +0 -292
  429. package/dist/astUtils/reflection.spec.js.map +0 -1
  430. package/dist/astUtils/stackedVisitor.spec.d.ts +0 -1
  431. package/dist/astUtils/stackedVisitor.spec.js +0 -79
  432. package/dist/astUtils/stackedVisitor.spec.js.map +0 -1
  433. package/dist/astUtils/visitors.spec.d.ts +0 -1
  434. package/dist/astUtils/visitors.spec.js +0 -854
  435. package/dist/astUtils/visitors.spec.js.map +0 -1
  436. package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.d.ts +0 -1
  437. package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js +0 -194
  438. package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js.map +0 -1
  439. package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.d.ts +0 -7
  440. package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.js +0 -63
  441. package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.js.map +0 -1
  442. package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.d.ts +0 -1
  443. package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.js +0 -45
  444. package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.js.map +0 -1
  445. package/dist/files/BrsFile.Class.spec.d.ts +0 -1
  446. package/dist/files/BrsFile.Class.spec.js +0 -1081
  447. package/dist/files/BrsFile.Class.spec.js.map +0 -1
  448. package/dist/files/BrsFile.spec.d.ts +0 -1
  449. package/dist/files/BrsFile.spec.js +0 -2524
  450. package/dist/files/BrsFile.spec.js.map +0 -1
  451. package/dist/files/XmlFile.spec.d.ts +0 -1
  452. package/dist/files/XmlFile.spec.js +0 -1065
  453. package/dist/files/XmlFile.spec.js.map +0 -1
  454. package/dist/files/tests/imports.spec.d.ts +0 -1
  455. package/dist/files/tests/imports.spec.js +0 -241
  456. package/dist/files/tests/imports.spec.js.map +0 -1
  457. package/dist/lexer/Character.spec.d.ts +0 -1
  458. package/dist/lexer/Character.spec.js +0 -27
  459. package/dist/lexer/Character.spec.js.map +0 -1
  460. package/dist/lexer/Lexer.spec.d.ts +0 -1
  461. package/dist/lexer/Lexer.spec.js +0 -1101
  462. package/dist/lexer/Lexer.spec.js.map +0 -1
  463. package/dist/lexer/index.d.ts +0 -3
  464. package/dist/lexer/index.js +0 -17
  465. package/dist/lexer/index.js.map +0 -1
  466. package/dist/parser/Parser.Class.spec.d.ts +0 -1
  467. package/dist/parser/Parser.Class.spec.js +0 -390
  468. package/dist/parser/Parser.Class.spec.js.map +0 -1
  469. package/dist/parser/Parser.spec.d.ts +0 -4
  470. package/dist/parser/Parser.spec.js +0 -1216
  471. package/dist/parser/Parser.spec.js.map +0 -1
  472. package/dist/parser/SGParser.spec.d.ts +0 -1
  473. package/dist/parser/SGParser.spec.js +0 -145
  474. package/dist/parser/SGParser.spec.js.map +0 -1
  475. package/dist/parser/SGTypes.spec.d.ts +0 -1
  476. package/dist/parser/SGTypes.spec.js +0 -351
  477. package/dist/parser/SGTypes.spec.js.map +0 -1
  478. package/dist/parser/Statement.spec.d.ts +0 -1
  479. package/dist/parser/Statement.spec.js +0 -94
  480. package/dist/parser/Statement.spec.js.map +0 -1
  481. package/dist/parser/index.d.ts +0 -3
  482. package/dist/parser/index.js +0 -16
  483. package/dist/parser/index.js.map +0 -1
  484. package/dist/parser/tests/Parser.spec.d.ts +0 -18
  485. package/dist/parser/tests/Parser.spec.js +0 -35
  486. package/dist/parser/tests/Parser.spec.js.map +0 -1
  487. package/dist/parser/tests/controlFlow/For.spec.d.ts +0 -1
  488. package/dist/parser/tests/controlFlow/For.spec.js +0 -161
  489. package/dist/parser/tests/controlFlow/For.spec.js.map +0 -1
  490. package/dist/parser/tests/controlFlow/ForEach.spec.d.ts +0 -1
  491. package/dist/parser/tests/controlFlow/ForEach.spec.js +0 -106
  492. package/dist/parser/tests/controlFlow/ForEach.spec.js.map +0 -1
  493. package/dist/parser/tests/controlFlow/If.spec.d.ts +0 -1
  494. package/dist/parser/tests/controlFlow/If.spec.js +0 -551
  495. package/dist/parser/tests/controlFlow/If.spec.js.map +0 -1
  496. package/dist/parser/tests/controlFlow/While.spec.d.ts +0 -1
  497. package/dist/parser/tests/controlFlow/While.spec.js +0 -107
  498. package/dist/parser/tests/controlFlow/While.spec.js.map +0 -1
  499. package/dist/parser/tests/expression/Additive.spec.d.ts +0 -1
  500. package/dist/parser/tests/expression/Additive.spec.js +0 -99
  501. package/dist/parser/tests/expression/Additive.spec.js.map +0 -1
  502. package/dist/parser/tests/expression/ArrayLiterals.spec.d.ts +0 -1
  503. package/dist/parser/tests/expression/ArrayLiterals.spec.js +0 -254
  504. package/dist/parser/tests/expression/ArrayLiterals.spec.js.map +0 -1
  505. package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.d.ts +0 -1
  506. package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js +0 -266
  507. package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js.map +0 -1
  508. package/dist/parser/tests/expression/Boolean.spec.d.ts +0 -1
  509. package/dist/parser/tests/expression/Boolean.spec.js +0 -83
  510. package/dist/parser/tests/expression/Boolean.spec.js.map +0 -1
  511. package/dist/parser/tests/expression/Call.spec.d.ts +0 -1
  512. package/dist/parser/tests/expression/Call.spec.js +0 -134
  513. package/dist/parser/tests/expression/Call.spec.js.map +0 -1
  514. package/dist/parser/tests/expression/Exponential.spec.d.ts +0 -1
  515. package/dist/parser/tests/expression/Exponential.spec.js +0 -37
  516. package/dist/parser/tests/expression/Exponential.spec.js.map +0 -1
  517. package/dist/parser/tests/expression/Function.spec.d.ts +0 -1
  518. package/dist/parser/tests/expression/Function.spec.js +0 -403
  519. package/dist/parser/tests/expression/Function.spec.js.map +0 -1
  520. package/dist/parser/tests/expression/Indexing.spec.d.ts +0 -1
  521. package/dist/parser/tests/expression/Indexing.spec.js +0 -219
  522. package/dist/parser/tests/expression/Indexing.spec.js.map +0 -1
  523. package/dist/parser/tests/expression/Multiplicative.spec.d.ts +0 -1
  524. package/dist/parser/tests/expression/Multiplicative.spec.js +0 -67
  525. package/dist/parser/tests/expression/Multiplicative.spec.js.map +0 -1
  526. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.d.ts +0 -1
  527. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js +0 -201
  528. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js.map +0 -1
  529. package/dist/parser/tests/expression/PrefixUnary.spec.d.ts +0 -1
  530. package/dist/parser/tests/expression/PrefixUnary.spec.js +0 -105
  531. package/dist/parser/tests/expression/PrefixUnary.spec.js.map +0 -1
  532. package/dist/parser/tests/expression/Primary.spec.d.ts +0 -1
  533. package/dist/parser/tests/expression/Primary.spec.js +0 -149
  534. package/dist/parser/tests/expression/Primary.spec.js.map +0 -1
  535. package/dist/parser/tests/expression/Relational.spec.d.ts +0 -1
  536. package/dist/parser/tests/expression/Relational.spec.js +0 -83
  537. package/dist/parser/tests/expression/Relational.spec.js.map +0 -1
  538. package/dist/parser/tests/expression/SourceLiteralExpression.spec.d.ts +0 -1
  539. package/dist/parser/tests/expression/SourceLiteralExpression.spec.js +0 -201
  540. package/dist/parser/tests/expression/SourceLiteralExpression.spec.js.map +0 -1
  541. package/dist/parser/tests/expression/TemplateStringExpression.spec.d.ts +0 -1
  542. package/dist/parser/tests/expression/TemplateStringExpression.spec.js +0 -202
  543. package/dist/parser/tests/expression/TemplateStringExpression.spec.js.map +0 -1
  544. package/dist/parser/tests/expression/TernaryExpression.spec.d.ts +0 -1
  545. package/dist/parser/tests/expression/TernaryExpression.spec.js +0 -323
  546. package/dist/parser/tests/expression/TernaryExpression.spec.js.map +0 -1
  547. package/dist/parser/tests/statement/AssignmentOperators.spec.d.ts +0 -1
  548. package/dist/parser/tests/statement/AssignmentOperators.spec.js +0 -79
  549. package/dist/parser/tests/statement/AssignmentOperators.spec.js.map +0 -1
  550. package/dist/parser/tests/statement/Declaration.spec.d.ts +0 -1
  551. package/dist/parser/tests/statement/Declaration.spec.js +0 -108
  552. package/dist/parser/tests/statement/Declaration.spec.js.map +0 -1
  553. package/dist/parser/tests/statement/Dim.spec.d.ts +0 -1
  554. package/dist/parser/tests/statement/Dim.spec.js +0 -73
  555. package/dist/parser/tests/statement/Dim.spec.js.map +0 -1
  556. package/dist/parser/tests/statement/Function.spec.d.ts +0 -1
  557. package/dist/parser/tests/statement/Function.spec.js +0 -332
  558. package/dist/parser/tests/statement/Function.spec.js.map +0 -1
  559. package/dist/parser/tests/statement/Goto.spec.d.ts +0 -1
  560. package/dist/parser/tests/statement/Goto.spec.js +0 -50
  561. package/dist/parser/tests/statement/Goto.spec.js.map +0 -1
  562. package/dist/parser/tests/statement/Increment.spec.d.ts +0 -1
  563. package/dist/parser/tests/statement/Increment.spec.js +0 -117
  564. package/dist/parser/tests/statement/Increment.spec.js.map +0 -1
  565. package/dist/parser/tests/statement/LibraryStatement.spec.d.ts +0 -1
  566. package/dist/parser/tests/statement/LibraryStatement.spec.js +0 -74
  567. package/dist/parser/tests/statement/LibraryStatement.spec.js.map +0 -1
  568. package/dist/parser/tests/statement/Misc.spec.d.ts +0 -1
  569. package/dist/parser/tests/statement/Misc.spec.js +0 -333
  570. package/dist/parser/tests/statement/Misc.spec.js.map +0 -1
  571. package/dist/parser/tests/statement/PrintStatement.spec.d.ts +0 -1
  572. package/dist/parser/tests/statement/PrintStatement.spec.js +0 -181
  573. package/dist/parser/tests/statement/PrintStatement.spec.js.map +0 -1
  574. package/dist/parser/tests/statement/ReturnStatement.spec.d.ts +0 -1
  575. package/dist/parser/tests/statement/ReturnStatement.spec.js +0 -94
  576. package/dist/parser/tests/statement/ReturnStatement.spec.js.map +0 -1
  577. package/dist/parser/tests/statement/Set.spec.d.ts +0 -1
  578. package/dist/parser/tests/statement/Set.spec.js +0 -218
  579. package/dist/parser/tests/statement/Set.spec.js.map +0 -1
  580. package/dist/parser/tests/statement/Stop.spec.d.ts +0 -1
  581. package/dist/parser/tests/statement/Stop.spec.js +0 -37
  582. package/dist/parser/tests/statement/Stop.spec.js.map +0 -1
  583. package/dist/parser/tests/statement/Throw.spec.d.ts +0 -1
  584. package/dist/parser/tests/statement/Throw.spec.js +0 -35
  585. package/dist/parser/tests/statement/Throw.spec.js.map +0 -1
  586. package/dist/parser/tests/statement/TryCatch.spec.d.ts +0 -1
  587. package/dist/parser/tests/statement/TryCatch.spec.js +0 -140
  588. package/dist/parser/tests/statement/TryCatch.spec.js.map +0 -1
  589. package/dist/preprocessor/Chunk.d.ts +0 -82
  590. package/dist/preprocessor/Chunk.js +0 -77
  591. package/dist/preprocessor/Chunk.js.map +0 -1
  592. package/dist/preprocessor/Manifest.spec.d.ts +0 -0
  593. package/dist/preprocessor/Manifest.spec.js +0 -105
  594. package/dist/preprocessor/Manifest.spec.js.map +0 -1
  595. package/dist/preprocessor/Preprocessor.d.ts +0 -60
  596. package/dist/preprocessor/Preprocessor.js +0 -156
  597. package/dist/preprocessor/Preprocessor.js.map +0 -1
  598. package/dist/preprocessor/Preprocessor.spec.d.ts +0 -1
  599. package/dist/preprocessor/Preprocessor.spec.js +0 -152
  600. package/dist/preprocessor/Preprocessor.spec.js.map +0 -1
  601. package/dist/preprocessor/PreprocessorParser.d.ts +0 -61
  602. package/dist/preprocessor/PreprocessorParser.js +0 -194
  603. package/dist/preprocessor/PreprocessorParser.js.map +0 -1
  604. package/dist/preprocessor/PreprocessorParser.spec.d.ts +0 -1
  605. package/dist/preprocessor/PreprocessorParser.spec.js +0 -116
  606. package/dist/preprocessor/PreprocessorParser.spec.js.map +0 -1
  607. package/dist/preprocessor/index.d.ts +0 -3
  608. package/dist/preprocessor/index.js +0 -16
  609. package/dist/preprocessor/index.js.map +0 -1
  610. package/dist/types/ArrayType.spec.d.ts +0 -1
  611. package/dist/types/ArrayType.spec.js +0 -30
  612. package/dist/types/ArrayType.spec.js.map +0 -1
  613. package/dist/types/BooleanType.spec.d.ts +0 -1
  614. package/dist/types/BooleanType.spec.js +0 -12
  615. package/dist/types/BooleanType.spec.js.map +0 -1
  616. package/dist/types/CustomType.d.ts +0 -10
  617. package/dist/types/CustomType.js +0 -35
  618. package/dist/types/CustomType.js.map +0 -1
  619. package/dist/types/DoubleType.spec.d.ts +0 -1
  620. package/dist/types/DoubleType.spec.js +0 -12
  621. package/dist/types/DoubleType.spec.js.map +0 -1
  622. package/dist/types/DynamicType.spec.d.ts +0 -1
  623. package/dist/types/DynamicType.spec.js +0 -12
  624. package/dist/types/DynamicType.spec.js.map +0 -1
  625. package/dist/types/FloatType.spec.d.ts +0 -1
  626. package/dist/types/FloatType.spec.js +0 -12
  627. package/dist/types/FloatType.spec.js.map +0 -1
  628. package/dist/types/FunctionType.spec.d.ts +0 -1
  629. package/dist/types/FunctionType.spec.js +0 -29
  630. package/dist/types/FunctionType.spec.js.map +0 -1
  631. package/dist/types/IntegerType.spec.d.ts +0 -1
  632. package/dist/types/IntegerType.spec.js +0 -12
  633. package/dist/types/IntegerType.spec.js.map +0 -1
  634. package/dist/types/InvalidType.spec.d.ts +0 -1
  635. package/dist/types/InvalidType.spec.js +0 -12
  636. package/dist/types/InvalidType.spec.js.map +0 -1
  637. package/dist/types/LazyType.d.ts +0 -15
  638. package/dist/types/LazyType.js +0 -32
  639. package/dist/types/LazyType.js.map +0 -1
  640. package/dist/types/LongIntegerType.spec.d.ts +0 -1
  641. package/dist/types/LongIntegerType.spec.js +0 -12
  642. package/dist/types/LongIntegerType.spec.js.map +0 -1
  643. package/dist/types/ObjectType.spec.d.ts +0 -1
  644. package/dist/types/ObjectType.spec.js +0 -12
  645. package/dist/types/ObjectType.spec.js.map +0 -1
  646. package/dist/types/StringType.spec.d.ts +0 -1
  647. package/dist/types/StringType.spec.js +0 -12
  648. package/dist/types/StringType.spec.js.map +0 -1
  649. package/dist/types/VoidType.spec.d.ts +0 -1
  650. package/dist/types/VoidType.spec.js +0 -12
  651. package/dist/types/VoidType.spec.js.map +0 -1
  652. /package/dist/{astUtils/creators.spec.d.ts → lsp/worker/run.d.ts} +0 -0
@@ -1,382 +1,658 @@
1
- import type { Token, Identifier } from '../lexer';
2
- import { TokenKind } from '../lexer';
3
- import type { Expression, NamespacedVariableNameExpression, FunctionExpression, AnnotationExpression } from './Expression';
4
- import type { Range } from 'vscode-languageserver';
1
+ import type { Token, Identifier } from '../lexer/Token';
2
+ import type { DottedGetExpression, FunctionParameterExpression, TypecastExpression, TypeExpression } from './Expression';
3
+ import { FunctionExpression } from './Expression';
4
+ import { VariableExpression } from './Expression';
5
+ import type { Location } from 'vscode-languageserver';
5
6
  import type { BrsTranspileState } from './BrsTranspileState';
6
7
  import { ParseMode } from './Parser';
7
8
  import type { WalkVisitor, WalkOptions } from '../astUtils/visitors';
8
- import { InternalWalkMode } from '../astUtils/visitors';
9
- import type { TranspileResult, TypedefProvider } from '../interfaces';
9
+ import type { GetTypeOptions } from '../interfaces';
10
+ import { type TranspileResult, type TypedefProvider } from '../interfaces';
11
+ import type { BscType } from '../types/BscType';
10
12
  import { SymbolTable } from '../SymbolTable';
11
- /**
12
- * A BrightScript statement
13
- */
14
- export declare abstract class Statement {
15
- /**
16
- * The starting and ending location of the statement.
17
- **/
18
- abstract range: Range;
19
- /**
20
- * Statement annotations
21
- */
22
- annotations: AnnotationExpression[];
23
- abstract transpile(state: BrsTranspileState): TranspileResult;
24
- /**
25
- * When being considered by the walk visitor, this describes what type of element the current class is.
26
- */
27
- visitMode: InternalWalkMode;
28
- abstract walk(visitor: WalkVisitor, options: WalkOptions): any;
29
- }
13
+ import type { Expression } from './AstNode';
14
+ import { AstNodeKind, Statement } from './AstNode';
15
+ import { ClassType } from '../types/ClassType';
16
+ import { NamespaceType } from '../types/NamespaceType';
17
+ import { InterfaceType } from '../types/InterfaceType';
18
+ import { TypedFunctionType } from '../types/TypedFunctionType';
30
19
  export declare class EmptyStatement extends Statement {
20
+ constructor(options?: {
21
+ range?: Location;
22
+ });
31
23
  /**
32
24
  * Create a negative range to indicate this is an interpolated location
33
25
  */
34
- range: Range;
35
- constructor(
36
- /**
37
- * Create a negative range to indicate this is an interpolated location
38
- */
39
- range?: Range);
26
+ readonly location?: Location;
27
+ readonly kind = AstNodeKind.EmptyStatement;
40
28
  transpile(state: BrsTranspileState): any[];
41
29
  walk(visitor: WalkVisitor, options: WalkOptions): void;
30
+ clone(): EmptyStatement;
42
31
  }
43
32
  /**
44
33
  * This is a top-level statement. Consider this the root of the AST
45
34
  */
46
35
  export declare class Body extends Statement implements TypedefProvider {
47
- statements: Statement[];
48
- constructor(statements?: Statement[]);
49
- get range(): Range;
36
+ constructor(options?: {
37
+ statements?: Statement[];
38
+ });
39
+ readonly statements: Statement[];
40
+ readonly kind = AstNodeKind.Body;
41
+ readonly symbolTable: SymbolTable;
42
+ get location(): Location;
43
+ set location(value: Location);
44
+ private _location;
50
45
  transpile(state: BrsTranspileState): TranspileResult;
51
- getTypedef(state: BrsTranspileState): any[];
46
+ getTypedef(state: BrsTranspileState): TranspileResult;
52
47
  walk(visitor: WalkVisitor, options: WalkOptions): void;
48
+ clone(): Body;
53
49
  }
54
50
  export declare class AssignmentStatement extends Statement {
55
- readonly name: Identifier;
56
- readonly equals: Token;
51
+ constructor(options: {
52
+ name: Identifier;
53
+ equals?: Token;
54
+ value: Expression;
55
+ as?: Token;
56
+ typeExpression?: TypeExpression;
57
+ });
58
+ readonly tokens: {
59
+ readonly equals?: Token;
60
+ readonly name: Identifier;
61
+ readonly as?: Token;
62
+ };
57
63
  readonly value: Expression;
58
- readonly containingFunction: FunctionExpression;
59
- constructor(name: Identifier, equals: Token, value: Expression, containingFunction: FunctionExpression);
60
- readonly range: Range;
61
- transpile(state: BrsTranspileState): TranspileResult;
64
+ readonly typeExpression?: TypeExpression;
65
+ readonly kind = AstNodeKind.AssignmentStatement;
66
+ readonly location: Location | undefined;
67
+ transpile(state: BrsTranspileState): (string | import("source-map").SourceNode | TranspileResult)[];
62
68
  walk(visitor: WalkVisitor, options: WalkOptions): void;
69
+ getType(options: GetTypeOptions): BscType;
70
+ get leadingTrivia(): Token[];
71
+ clone(): AssignmentStatement;
72
+ }
73
+ export declare class AugmentedAssignmentStatement extends Statement {
74
+ constructor(options: {
75
+ item: Expression;
76
+ operator: Token;
77
+ value: Expression;
78
+ });
79
+ readonly tokens: {
80
+ readonly operator?: Token;
81
+ };
82
+ readonly item: Expression;
83
+ readonly value: Expression;
84
+ readonly kind = AstNodeKind.AugmentedAssignmentStatement;
85
+ readonly location: Location | undefined;
86
+ transpile(state: BrsTranspileState): (string | TranspileResult)[];
87
+ walk(visitor: WalkVisitor, options: WalkOptions): void;
88
+ getType(options: GetTypeOptions): BscType;
89
+ get leadingTrivia(): Token[];
90
+ clone(): AugmentedAssignmentStatement;
63
91
  }
64
92
  export declare class Block extends Statement {
93
+ constructor(options: {
94
+ statements: Statement[];
95
+ });
65
96
  readonly statements: Statement[];
66
- readonly startingRange: Range;
67
- constructor(statements: Statement[], startingRange: Range);
68
- readonly range: Range;
97
+ readonly kind = AstNodeKind.Block;
98
+ private buildLocation;
99
+ get location(): Location;
100
+ set location(value: Location);
101
+ private _location;
69
102
  transpile(state: BrsTranspileState): TranspileResult;
103
+ get leadingTrivia(): Token[];
70
104
  walk(visitor: WalkVisitor, options: WalkOptions): void;
105
+ clone(): Block;
71
106
  }
72
107
  export declare class ExpressionStatement extends Statement {
108
+ constructor(options: {
109
+ expression: Expression;
110
+ });
73
111
  readonly expression: Expression;
74
- constructor(expression: Expression);
75
- readonly range: Range;
76
- transpile(state: BrsTranspileState): TranspileResult;
77
- walk(visitor: WalkVisitor, options: WalkOptions): void;
78
- }
79
- export declare class CommentStatement extends Statement implements Expression, TypedefProvider {
80
- comments: Token[];
81
- constructor(comments: Token[]);
82
- range: Range;
83
- get text(): string;
84
- transpile(state: BrsTranspileState): any[];
85
- getTypedef(state: BrsTranspileState): any[];
112
+ readonly kind = AstNodeKind.ExpressionStatement;
113
+ readonly location: Location | undefined;
114
+ transpile(state: BrsTranspileState): TranspileResult[];
115
+ getTypedef(state: BrsTranspileState): TranspileResult;
86
116
  walk(visitor: WalkVisitor, options: WalkOptions): void;
117
+ get leadingTrivia(): Token[];
118
+ clone(): ExpressionStatement;
87
119
  }
88
- export declare class ExitForStatement extends Statement {
89
- readonly tokens: {
90
- exitFor: Token;
91
- };
92
- constructor(tokens: {
93
- exitFor: Token;
120
+ export declare class ExitStatement extends Statement {
121
+ constructor(options?: {
122
+ exit?: Token;
123
+ loopType: Token;
94
124
  });
95
- readonly range: Range;
96
- transpile(state: BrsTranspileState): import("source-map").SourceNode[];
97
- walk(visitor: WalkVisitor, options: WalkOptions): void;
98
- }
99
- export declare class ExitWhileStatement extends Statement {
100
125
  readonly tokens: {
101
- exitWhile: Token;
126
+ readonly exit: Token;
127
+ readonly loopType?: Token;
102
128
  };
103
- constructor(tokens: {
104
- exitWhile: Token;
105
- });
106
- readonly range: Range;
107
- transpile(state: BrsTranspileState): import("source-map").SourceNode[];
129
+ readonly kind = AstNodeKind.ExitStatement;
130
+ readonly location?: Location;
131
+ transpile(state: BrsTranspileState): (string | TranspileResult)[];
108
132
  walk(visitor: WalkVisitor, options: WalkOptions): void;
133
+ get leadingTrivia(): Token[];
134
+ clone(): ExitStatement;
109
135
  }
110
136
  export declare class FunctionStatement extends Statement implements TypedefProvider {
111
- name: Identifier;
112
- func: FunctionExpression;
113
- namespaceName: NamespacedVariableNameExpression;
114
- constructor(name: Identifier, func: FunctionExpression, namespaceName: NamespacedVariableNameExpression);
115
- readonly range: Range;
137
+ constructor(options: {
138
+ name: Identifier;
139
+ func: FunctionExpression;
140
+ });
141
+ readonly tokens: {
142
+ readonly name: Identifier;
143
+ };
144
+ readonly func: FunctionExpression;
145
+ readonly kind: AstNodeKind;
146
+ readonly location: Location | undefined;
116
147
  /**
117
148
  * Get the name of this expression based on the parse mode
118
149
  */
119
150
  getName(parseMode: ParseMode): string;
120
- transpile(state: BrsTranspileState): any[];
121
- getTypedef(state: BrsTranspileState): any[];
151
+ get leadingTrivia(): Token[];
152
+ transpile(state: BrsTranspileState): TranspileResult;
153
+ getTypedef(state: BrsTranspileState): TranspileResult;
122
154
  walk(visitor: WalkVisitor, options: WalkOptions): void;
155
+ getType(options: GetTypeOptions): TypedFunctionType;
156
+ clone(): FunctionStatement;
123
157
  }
124
158
  export declare class IfStatement extends Statement {
125
- readonly tokens: {
126
- if: Token;
159
+ constructor(options: {
160
+ if?: Token;
127
161
  then?: Token;
128
162
  else?: Token;
129
163
  endIf?: Token;
164
+ condition: Expression;
165
+ thenBranch: Block;
166
+ elseBranch?: IfStatement | Block;
167
+ });
168
+ readonly tokens: {
169
+ readonly if?: Token;
170
+ readonly then?: Token;
171
+ readonly else?: Token;
172
+ readonly endIf?: Token;
130
173
  };
131
174
  readonly condition: Expression;
132
175
  readonly thenBranch: Block;
133
176
  readonly elseBranch?: IfStatement | Block;
134
- readonly isInline?: boolean;
135
- constructor(tokens: {
136
- if: Token;
137
- then?: Token;
138
- else?: Token;
139
- endIf?: Token;
140
- }, condition: Expression, thenBranch: Block, elseBranch?: IfStatement | Block, isInline?: boolean);
141
- readonly range: Range;
142
- transpile(state: BrsTranspileState): any[];
177
+ readonly kind = AstNodeKind.IfStatement;
178
+ readonly location: Location | undefined;
179
+ get isInline(): boolean;
180
+ transpile(state: BrsTranspileState): TranspileResult;
143
181
  walk(visitor: WalkVisitor, options: WalkOptions): void;
182
+ get leadingTrivia(): Token[];
183
+ get endTrivia(): Token[];
184
+ clone(): any;
144
185
  }
145
186
  export declare class IncrementStatement extends Statement {
187
+ constructor(options: {
188
+ value: Expression;
189
+ operator: Token;
190
+ });
146
191
  readonly value: Expression;
147
- readonly operator: Token;
148
- constructor(value: Expression, operator: Token);
149
- readonly range: Range;
150
- transpile(state: BrsTranspileState): (string | import("source-map").SourceNode)[];
192
+ readonly tokens: {
193
+ readonly operator: Token;
194
+ };
195
+ readonly kind = AstNodeKind.IncrementStatement;
196
+ readonly location: Location | undefined;
197
+ transpile(state: BrsTranspileState): (string | import("source-map").SourceNode | TranspileResult)[];
151
198
  walk(visitor: WalkVisitor, options: WalkOptions): void;
152
- }
153
- /** Used to indent the current `print` position to the next 16-character-width output zone. */
154
- export interface PrintSeparatorTab extends Token {
155
- kind: TokenKind.Comma;
156
- }
157
- /** Used to insert a single whitespace character at the current `print` position. */
158
- export interface PrintSeparatorSpace extends Token {
159
- kind: TokenKind.Semicolon;
199
+ get leadingTrivia(): Token[];
200
+ clone(): IncrementStatement;
160
201
  }
161
202
  /**
162
203
  * Represents a `print` statement within BrightScript.
163
204
  */
164
205
  export declare class PrintStatement extends Statement {
165
- readonly tokens: {
166
- print: Token;
167
- };
168
- readonly expressions: Array<Expression | PrintSeparatorTab | PrintSeparatorSpace>;
169
206
  /**
170
207
  * Creates a new internal representation of a BrightScript `print` statement.
171
- * @param expressions an array of expressions or `PrintSeparator`s to be
172
- * evaluated and printed.
208
+ * @param options the options for this statement
209
+ * @param options.print a print token
210
+ * @param options.expressions an array of expressions to be evaluated and printed. Wrap PrintSeparator tokens (`;` or `,`) in `PrintSeparatorExpression`
173
211
  */
174
- constructor(tokens: {
175
- print: Token;
176
- }, expressions: Array<Expression | PrintSeparatorTab | PrintSeparatorSpace>);
177
- readonly range: Range;
178
- transpile(state: BrsTranspileState): (string | import("source-map").SourceNode)[];
212
+ constructor(options: {
213
+ print?: Token;
214
+ expressions: Array<Expression>;
215
+ });
216
+ readonly tokens: {
217
+ readonly print?: Token;
218
+ };
219
+ readonly expressions: Array<Expression>;
220
+ readonly kind = AstNodeKind.PrintStatement;
221
+ readonly location: Location | undefined;
222
+ transpile(state: BrsTranspileState): TranspileResult;
179
223
  walk(visitor: WalkVisitor, options: WalkOptions): void;
224
+ get leadingTrivia(): Token[];
225
+ clone(): PrintStatement;
180
226
  }
181
227
  export declare class DimStatement extends Statement {
182
- dimToken: Token;
183
- identifier?: Identifier;
184
- openingSquare?: Token;
185
- dimensions?: Expression[];
186
- closingSquare?: Token;
187
- constructor(dimToken: Token, identifier?: Identifier, openingSquare?: Token, dimensions?: Expression[], closingSquare?: Token);
188
- range: Range;
189
- transpile(state: BrsTranspileState): (string | import("source-map").SourceNode)[];
228
+ constructor(options: {
229
+ dim?: Token;
230
+ name: Identifier;
231
+ openingSquare?: Token;
232
+ dimensions: Expression[];
233
+ closingSquare?: Token;
234
+ });
235
+ readonly tokens: {
236
+ readonly dim?: Token;
237
+ readonly name: Identifier;
238
+ readonly openingSquare?: Token;
239
+ readonly closingSquare?: Token;
240
+ };
241
+ readonly dimensions: Expression[];
242
+ readonly kind = AstNodeKind.DimStatement;
243
+ readonly location: Location | undefined;
244
+ transpile(state: BrsTranspileState): TranspileResult;
190
245
  walk(visitor: WalkVisitor, options: WalkOptions): void;
246
+ getType(options: GetTypeOptions): BscType;
247
+ get leadingTrivia(): Token[];
248
+ clone(): DimStatement;
191
249
  }
192
250
  export declare class GotoStatement extends Statement {
193
- readonly tokens: {
194
- goto: Token;
195
- label: Token;
196
- };
197
- constructor(tokens: {
198
- goto: Token;
251
+ constructor(options: {
252
+ goto?: Token;
199
253
  label: Token;
200
254
  });
201
- readonly range: Range;
202
- transpile(state: BrsTranspileState): (string | import("source-map").SourceNode)[];
255
+ readonly tokens: {
256
+ readonly goto?: Token;
257
+ readonly label: Token;
258
+ };
259
+ readonly kind = AstNodeKind.GotoStatement;
260
+ readonly location: Location | undefined;
261
+ transpile(state: BrsTranspileState): (string | TranspileResult)[];
203
262
  walk(visitor: WalkVisitor, options: WalkOptions): void;
263
+ get leadingTrivia(): Token[];
264
+ clone(): GotoStatement;
204
265
  }
205
266
  export declare class LabelStatement extends Statement {
267
+ constructor(options: {
268
+ name: Token;
269
+ colon?: Token;
270
+ });
206
271
  readonly tokens: {
207
- identifier: Token;
208
- colon: Token;
272
+ readonly name: Token;
273
+ readonly colon: Token;
209
274
  };
210
- constructor(tokens: {
211
- identifier: Token;
212
- colon: Token;
213
- });
214
- readonly range: Range;
215
- transpile(state: BrsTranspileState): import("source-map").SourceNode[];
275
+ readonly kind = AstNodeKind.LabelStatement;
276
+ readonly location: Location | undefined;
277
+ get leadingTrivia(): Token[];
278
+ transpile(state: BrsTranspileState): TranspileResult[];
216
279
  walk(visitor: WalkVisitor, options: WalkOptions): void;
280
+ clone(): LabelStatement;
217
281
  }
218
282
  export declare class ReturnStatement extends Statement {
283
+ constructor(options?: {
284
+ return?: Token;
285
+ value?: Expression;
286
+ });
219
287
  readonly tokens: {
220
- return: Token;
288
+ readonly return?: Token;
221
289
  };
222
290
  readonly value?: Expression;
223
- constructor(tokens: {
224
- return: Token;
225
- }, value?: Expression);
226
- readonly range: Range;
227
- transpile(state: BrsTranspileState): any[];
291
+ readonly kind = AstNodeKind.ReturnStatement;
292
+ readonly location: Location | undefined;
293
+ transpile(state: BrsTranspileState): TranspileResult;
228
294
  walk(visitor: WalkVisitor, options: WalkOptions): void;
295
+ get leadingTrivia(): Token[];
296
+ clone(): ReturnStatement;
229
297
  }
230
298
  export declare class EndStatement extends Statement {
299
+ constructor(options?: {
300
+ end?: Token;
301
+ });
231
302
  readonly tokens: {
232
- end: Token;
303
+ readonly end?: Token;
233
304
  };
234
- constructor(tokens: {
235
- end: Token;
236
- });
237
- readonly range: Range;
238
- transpile(state: BrsTranspileState): import("source-map").SourceNode[];
305
+ readonly kind = AstNodeKind.EndStatement;
306
+ readonly location: Location;
307
+ transpile(state: BrsTranspileState): TranspileResult[];
239
308
  walk(visitor: WalkVisitor, options: WalkOptions): void;
309
+ get leadingTrivia(): Token[];
310
+ clone(): EndStatement;
240
311
  }
241
312
  export declare class StopStatement extends Statement {
313
+ constructor(options?: {
314
+ stop?: Token;
315
+ });
242
316
  readonly tokens: {
243
- stop: Token;
317
+ readonly stop?: Token;
244
318
  };
245
- constructor(tokens: {
246
- stop: Token;
247
- });
248
- readonly range: Range;
249
- transpile(state: BrsTranspileState): import("source-map").SourceNode[];
319
+ readonly kind = AstNodeKind.StopStatement;
320
+ readonly location: Location;
321
+ transpile(state: BrsTranspileState): TranspileResult[];
250
322
  walk(visitor: WalkVisitor, options: WalkOptions): void;
323
+ get leadingTrivia(): Token[];
324
+ clone(): StopStatement;
251
325
  }
252
326
  export declare class ForStatement extends Statement {
253
- forToken: Token;
254
- counterDeclaration: AssignmentStatement;
255
- toToken: Token;
256
- finalValue: Expression;
257
- body: Block;
258
- endForToken: Token;
259
- stepToken?: Token;
260
- increment?: Expression;
261
- constructor(forToken: Token, counterDeclaration: AssignmentStatement, toToken: Token, finalValue: Expression, body: Block, endForToken: Token, stepToken?: Token, increment?: Expression);
262
- readonly range: Range;
263
- transpile(state: BrsTranspileState): any[];
327
+ constructor(options: {
328
+ for?: Token;
329
+ counterDeclaration: AssignmentStatement;
330
+ to?: Token;
331
+ finalValue: Expression;
332
+ body: Block;
333
+ endFor?: Token;
334
+ step?: Token;
335
+ increment?: Expression;
336
+ });
337
+ readonly tokens: {
338
+ readonly for?: Token;
339
+ readonly to?: Token;
340
+ readonly endFor?: Token;
341
+ readonly step?: Token;
342
+ };
343
+ readonly counterDeclaration: AssignmentStatement;
344
+ readonly finalValue: Expression;
345
+ readonly body: Block;
346
+ readonly increment?: Expression;
347
+ readonly kind = AstNodeKind.ForStatement;
348
+ readonly location: Location | undefined;
349
+ transpile(state: BrsTranspileState): TranspileResult;
264
350
  walk(visitor: WalkVisitor, options: WalkOptions): void;
351
+ get leadingTrivia(): Token[];
352
+ get endTrivia(): Token[];
353
+ clone(): ForStatement;
265
354
  }
266
355
  export declare class ForEachStatement extends Statement {
267
- forEachToken: Token;
268
- item: Identifier;
269
- inToken: Token;
270
- target: Expression;
271
- body: Block;
272
- endForToken: Token;
273
- constructor(forEachToken: Token, item: Identifier, inToken: Token, target: Expression, body: Block, endForToken: Token);
274
- readonly range: Range;
275
- transpile(state: BrsTranspileState): any[];
356
+ constructor(options: {
357
+ forEach?: Token;
358
+ item: Token;
359
+ as?: Token;
360
+ typeExpression?: TypeExpression;
361
+ in?: Token;
362
+ target: Expression;
363
+ body: Block;
364
+ endFor?: Token;
365
+ });
366
+ readonly tokens: {
367
+ readonly forEach?: Token;
368
+ readonly item: Token;
369
+ readonly as: Token;
370
+ readonly in?: Token;
371
+ readonly endFor?: Token;
372
+ };
373
+ readonly body: Block;
374
+ readonly target: Expression;
375
+ readonly typeExpression?: TypeExpression;
376
+ readonly kind = AstNodeKind.ForEachStatement;
377
+ readonly location: Location | undefined;
378
+ transpile(state: BrsTranspileState): TranspileResult;
276
379
  walk(visitor: WalkVisitor, options: WalkOptions): void;
380
+ getType(options: GetTypeOptions): BscType;
381
+ getLoopVariableType(options: GetTypeOptions): BscType;
382
+ get leadingTrivia(): Token[];
383
+ get endTrivia(): Token[];
384
+ clone(): ForEachStatement;
277
385
  }
278
386
  export declare class WhileStatement extends Statement {
387
+ constructor(options: {
388
+ while?: Token;
389
+ endWhile?: Token;
390
+ condition: Expression;
391
+ body: Block;
392
+ });
279
393
  readonly tokens: {
280
- while: Token;
281
- endWhile: Token;
394
+ readonly while?: Token;
395
+ readonly endWhile?: Token;
282
396
  };
283
397
  readonly condition: Expression;
284
398
  readonly body: Block;
285
- constructor(tokens: {
286
- while: Token;
287
- endWhile: Token;
288
- }, condition: Expression, body: Block);
289
- readonly range: Range;
290
- transpile(state: BrsTranspileState): any[];
399
+ readonly kind = AstNodeKind.WhileStatement;
400
+ readonly location: Location | undefined;
401
+ transpile(state: BrsTranspileState): TranspileResult;
291
402
  walk(visitor: WalkVisitor, options: WalkOptions): void;
403
+ get leadingTrivia(): Token[];
404
+ get endTrivia(): Token[];
405
+ clone(): WhileStatement;
292
406
  }
293
407
  export declare class DottedSetStatement extends Statement {
408
+ constructor(options: {
409
+ obj: Expression;
410
+ name: Identifier;
411
+ value: Expression;
412
+ dot?: Token;
413
+ equals?: Token;
414
+ });
415
+ readonly tokens: {
416
+ readonly name: Identifier;
417
+ readonly equals?: Token;
418
+ readonly dot?: Token;
419
+ };
294
420
  readonly obj: Expression;
295
- readonly name: Identifier;
296
421
  readonly value: Expression;
297
- constructor(obj: Expression, name: Identifier, value: Expression);
298
- readonly range: Range;
299
- transpile(state: BrsTranspileState): TranspileResult;
422
+ readonly kind = AstNodeKind.DottedSetStatement;
423
+ readonly location: Location | undefined;
424
+ transpile(state: BrsTranspileState): (string | import("source-map").SourceNode | TranspileResult)[];
300
425
  walk(visitor: WalkVisitor, options: WalkOptions): void;
426
+ getType(options: GetTypeOptions): BscType;
427
+ get leadingTrivia(): Token[];
428
+ clone(): DottedSetStatement;
301
429
  }
302
430
  export declare class IndexedSetStatement extends Statement {
431
+ constructor(options: {
432
+ obj: Expression;
433
+ indexes: Expression[];
434
+ value: Expression;
435
+ openingSquare?: Token;
436
+ closingSquare?: Token;
437
+ equals?: Token;
438
+ });
439
+ readonly tokens: {
440
+ readonly openingSquare?: Token;
441
+ readonly closingSquare?: Token;
442
+ readonly equals?: Token;
443
+ };
303
444
  readonly obj: Expression;
304
- readonly index: Expression;
445
+ readonly indexes: Expression[];
305
446
  readonly value: Expression;
306
- readonly openingSquare: Token;
307
- readonly closingSquare: Token;
308
- constructor(obj: Expression, index: Expression, value: Expression, openingSquare: Token, closingSquare: Token);
309
- readonly range: Range;
310
- transpile(state: BrsTranspileState): TranspileResult;
447
+ readonly kind = AstNodeKind.IndexedSetStatement;
448
+ readonly location: Location | undefined;
449
+ transpile(state: BrsTranspileState): any[];
311
450
  walk(visitor: WalkVisitor, options: WalkOptions): void;
451
+ get leadingTrivia(): Token[];
452
+ clone(): IndexedSetStatement;
312
453
  }
313
454
  export declare class LibraryStatement extends Statement implements TypedefProvider {
314
- readonly tokens: {
315
- library: Token;
316
- filePath: Token | undefined;
317
- };
318
- constructor(tokens: {
455
+ constructor(options: {
319
456
  library: Token;
320
- filePath: Token | undefined;
457
+ filePath?: Token;
321
458
  });
322
- readonly range: Range;
323
- transpile(state: BrsTranspileState): any[];
324
- getTypedef(state: BrsTranspileState): any[];
459
+ readonly tokens: {
460
+ readonly library: Token;
461
+ readonly filePath?: Token;
462
+ };
463
+ readonly kind = AstNodeKind.LibraryStatement;
464
+ readonly location: Location | undefined;
465
+ transpile(state: BrsTranspileState): TranspileResult;
466
+ getTypedef(state: BrsTranspileState): TranspileResult;
325
467
  walk(visitor: WalkVisitor, options: WalkOptions): void;
468
+ get leadingTrivia(): Token[];
469
+ clone(): LibraryStatement;
326
470
  }
327
471
  export declare class NamespaceStatement extends Statement implements TypedefProvider {
328
- keyword: Token;
329
- nameExpression: NamespacedVariableNameExpression;
330
- body: Body;
331
- endKeyword: Token;
332
- readonly parentSymbolTable?: SymbolTable;
333
- readonly symbolTable: SymbolTable;
334
- constructor(keyword: Token, nameExpression: NamespacedVariableNameExpression, body: Body, endKeyword: Token, parentSymbolTable?: SymbolTable);
472
+ constructor(options: {
473
+ namespace?: Token;
474
+ nameExpression: VariableExpression | DottedGetExpression;
475
+ body: Body;
476
+ endNamespace?: Token;
477
+ });
478
+ readonly tokens: {
479
+ readonly namespace?: Token;
480
+ readonly endNamespace?: Token;
481
+ };
482
+ readonly nameExpression: VariableExpression | DottedGetExpression;
483
+ readonly body: Body;
484
+ readonly kind = AstNodeKind.NamespaceStatement;
335
485
  /**
336
486
  * The string name for this namespace
337
487
  */
338
- name: string;
339
- get range(): Range;
488
+ get name(): string;
489
+ get location(): Location;
490
+ private _location;
491
+ cacheLocation(): Location;
340
492
  getName(parseMode: ParseMode): string;
341
- transpile(state: BrsTranspileState): TranspileResult;
342
- getTypedef(state: BrsTranspileState): string[];
493
+ get leadingTrivia(): Token[];
494
+ get endTrivia(): Token[];
495
+ getNameParts(): Identifier[];
496
+ transpile(state: BrsTranspileState): TranspileResult[];
497
+ getTypedef(state: BrsTranspileState): TranspileResult;
343
498
  walk(visitor: WalkVisitor, options: WalkOptions): void;
499
+ getType(options: GetTypeOptions): NamespaceType;
500
+ clone(): NamespaceStatement;
344
501
  }
345
502
  export declare class ImportStatement extends Statement implements TypedefProvider {
346
- readonly importToken: Token;
347
- readonly filePathToken: Token;
348
- constructor(importToken: Token, filePathToken: Token);
349
- filePath: string;
350
- range: Range;
351
- transpile(state: BrsTranspileState): (string | import("source-map").SourceNode)[];
503
+ constructor(options: {
504
+ import?: Token;
505
+ path?: Token;
506
+ });
507
+ readonly tokens: {
508
+ readonly import?: Token;
509
+ readonly path: Token;
510
+ };
511
+ readonly kind = AstNodeKind.ImportStatement;
512
+ readonly location: Location;
513
+ readonly filePath: string;
514
+ transpile(state: BrsTranspileState): (string | TranspileResult)[];
352
515
  /**
353
516
  * Get the typedef for this statement
354
517
  */
355
518
  getTypedef(state: BrsTranspileState): string[];
356
519
  walk(visitor: WalkVisitor, options: WalkOptions): void;
520
+ get leadingTrivia(): Token[];
521
+ clone(): ImportStatement;
357
522
  }
358
- export declare class ClassStatement extends Statement implements TypedefProvider {
359
- readonly classKeyword: Token;
523
+ export declare class InterfaceStatement extends Statement implements TypedefProvider {
524
+ constructor(options: {
525
+ interface: Token;
526
+ name: Identifier;
527
+ extends?: Token;
528
+ parentInterfaceName?: TypeExpression;
529
+ body: Statement[];
530
+ endInterface?: Token;
531
+ });
532
+ readonly parentInterfaceName?: TypeExpression;
533
+ readonly body: Statement[];
534
+ readonly kind = AstNodeKind.InterfaceStatement;
535
+ readonly tokens: {
536
+ readonly interface?: Token;
537
+ readonly name: Identifier;
538
+ readonly extends?: Token;
539
+ readonly endInterface?: Token;
540
+ };
541
+ readonly location: Location | undefined;
542
+ get fields(): InterfaceFieldStatement[];
543
+ get methods(): InterfaceMethodStatement[];
544
+ hasParentInterface(): boolean;
545
+ get leadingTrivia(): Token[];
546
+ get endTrivia(): Token[];
360
547
  /**
361
- * The name of the class (without namespace prefix)
548
+ * The name of the interface WITH its leading namespace (if applicable)
362
549
  */
363
- readonly name: Identifier;
364
- body: Statement[];
365
- readonly end: Token;
366
- readonly extendsKeyword?: Token;
367
- readonly parentClassName?: NamespacedVariableNameExpression;
368
- readonly namespaceName?: NamespacedVariableNameExpression;
369
- constructor(classKeyword: Token,
550
+ get fullName(): string;
370
551
  /**
371
- * The name of the class (without namespace prefix)
552
+ * The name of the interface (without the namespace prefix)
553
+ */
554
+ get name(): string;
555
+ /**
556
+ * Get the name of this expression based on the parse mode
372
557
  */
373
- name: Identifier, body: Statement[], end: Token, extendsKeyword?: Token, parentClassName?: NamespacedVariableNameExpression, namespaceName?: NamespacedVariableNameExpression);
374
558
  getName(parseMode: ParseMode): string;
375
- memberMap: Record<string, ClassMemberStatement>;
376
- methods: ClassMethodStatement[];
377
- fields: ClassFieldStatement[];
378
- readonly range: Range;
379
- transpile(state: BrsTranspileState): any[];
559
+ transpile(state: BrsTranspileState): TranspileResult;
560
+ getTypedef(state: BrsTranspileState): TranspileResult;
561
+ walk(visitor: WalkVisitor, options: WalkOptions): void;
562
+ getType(options: GetTypeOptions): InterfaceType;
563
+ clone(): InterfaceStatement;
564
+ }
565
+ export declare class InterfaceFieldStatement extends Statement implements TypedefProvider {
566
+ transpile(state: BrsTranspileState): TranspileResult;
567
+ constructor(options: {
568
+ name: Identifier;
569
+ as?: Token;
570
+ typeExpression?: TypeExpression;
571
+ optional?: Token;
572
+ });
573
+ readonly kind = AstNodeKind.InterfaceFieldStatement;
574
+ readonly typeExpression?: TypeExpression;
575
+ readonly location: Location | undefined;
576
+ readonly tokens: {
577
+ readonly name: Identifier;
578
+ readonly as: Token;
579
+ readonly optional?: Token;
580
+ };
581
+ get leadingTrivia(): Token[];
582
+ get name(): string;
583
+ get isOptional(): boolean;
584
+ walk(visitor: WalkVisitor, options: WalkOptions): void;
585
+ getTypedef(state: BrsTranspileState): TranspileResult;
586
+ getType(options: GetTypeOptions): BscType;
587
+ clone(): InterfaceFieldStatement;
588
+ }
589
+ export declare class InterfaceMethodStatement extends Statement implements TypedefProvider {
590
+ transpile(state: BrsTranspileState): TranspileResult;
591
+ constructor(options: {
592
+ functionType?: Token;
593
+ name: Identifier;
594
+ leftParen?: Token;
595
+ params?: FunctionParameterExpression[];
596
+ rightParen?: Token;
597
+ as?: Token;
598
+ returnTypeExpression?: TypeExpression;
599
+ optional?: Token;
600
+ });
601
+ readonly kind = AstNodeKind.InterfaceMethodStatement;
602
+ get location(): Location;
603
+ /**
604
+ * Get the name of this method.
605
+ */
606
+ getName(parseMode: ParseMode): string;
607
+ readonly tokens: {
608
+ readonly optional?: Token;
609
+ readonly functionType: Token;
610
+ readonly name: Identifier;
611
+ readonly leftParen?: Token;
612
+ readonly rightParen?: Token;
613
+ readonly as?: Token;
614
+ };
615
+ readonly params: FunctionParameterExpression[];
616
+ readonly returnTypeExpression?: TypeExpression;
617
+ get isOptional(): boolean;
618
+ get leadingTrivia(): Token[];
619
+ walk(visitor: WalkVisitor, options: WalkOptions): void;
620
+ getTypedef(state: BrsTranspileState): TranspileResult;
621
+ getType(options: GetTypeOptions): TypedFunctionType;
622
+ clone(): InterfaceMethodStatement;
623
+ }
624
+ export declare class ClassStatement extends Statement implements TypedefProvider {
625
+ constructor(options: {
626
+ class?: Token;
627
+ /**
628
+ * The name of the class (without namespace prefix)
629
+ */
630
+ name: Identifier;
631
+ body: Statement[];
632
+ endClass?: Token;
633
+ extends?: Token;
634
+ parentClassName?: TypeExpression;
635
+ });
636
+ readonly kind = AstNodeKind.ClassStatement;
637
+ readonly tokens: {
638
+ readonly class?: Token;
639
+ /**
640
+ * The name of the class (without namespace prefix)
641
+ */
642
+ readonly name: Identifier;
643
+ readonly endClass?: Token;
644
+ readonly extends?: Token;
645
+ };
646
+ readonly body: Statement[];
647
+ readonly parentClassName: TypeExpression;
648
+ getName(parseMode: ParseMode): string;
649
+ get leadingTrivia(): Token[];
650
+ get endTrivia(): Token[];
651
+ readonly memberMap: Record<string, MemberStatement>;
652
+ readonly methods: MethodStatement[];
653
+ readonly fields: FieldStatement[];
654
+ readonly location: Location | undefined;
655
+ transpile(state: BrsTranspileState): TranspileResult;
380
656
  getTypedef(state: BrsTranspileState): TranspileResult;
381
657
  /**
382
658
  * Find the parent index for this class's parent.
@@ -391,11 +667,18 @@ export declare class ClassStatement extends Statement implements TypedefProvider
391
667
  */
392
668
  getAncestors(state: BrsTranspileState): ClassStatement[];
393
669
  private getBuilderName;
670
+ private getMethodIdentifier;
671
+ getConstructorType(): TypedFunctionType;
394
672
  /**
395
673
  * Get the constructor function for this class (if exists), or undefined if not exist
396
674
  */
397
675
  private getConstructorFunction;
398
- private getEmptyNewFunction;
676
+ /**
677
+ * Return the parameters for the first constructor function for this class
678
+ * @param ancestors The list of ancestors for this class
679
+ * @returns The parameters for the first constructor function for this class
680
+ */
681
+ private getConstructorParams;
399
682
  /**
400
683
  * Determine if the specified field was declared in one of the ancestor classes
401
684
  */
@@ -406,6 +689,15 @@ export declare class ClassStatement extends Statement implements TypedefProvider
406
689
  * without instantiating the parent constructor at that point in time.
407
690
  */
408
691
  private getTranspiledBuilder;
692
+ /**
693
+ * Returns a copy of the class' body, with the constructor function added if it doesn't exist.
694
+ */
695
+ private getTranspiledClassBody;
696
+ /**
697
+ * These are the methods that are defined in this class. They are transpiled outside of the class body
698
+ * to ensure they don't appear as "$anon_#" in stack traces and crash logs.
699
+ */
700
+ private getTranspiledMethods;
409
701
  /**
410
702
  * The class function is the function with the same name as the class. This is the function that
411
703
  * consumers should call to create a new instance of that class.
@@ -413,14 +705,31 @@ export declare class ClassStatement extends Statement implements TypedefProvider
413
705
  */
414
706
  private getTranspiledClassFunction;
415
707
  walk(visitor: WalkVisitor, options: WalkOptions): void;
708
+ getType(options: GetTypeOptions): ClassType;
709
+ clone(): ClassStatement;
416
710
  }
417
- export declare class ClassMethodStatement extends FunctionStatement {
418
- readonly accessModifier: Token;
419
- readonly override: Token;
420
- constructor(accessModifier: Token, name: Identifier, func: FunctionExpression, override: Token);
421
- readonly range: Range;
422
- transpile(state: BrsTranspileState): any[];
423
- getTypedef(state: BrsTranspileState): string[];
711
+ export declare class MethodStatement extends FunctionStatement {
712
+ constructor(options: {
713
+ modifiers?: Token | Token[];
714
+ name: Identifier;
715
+ func: FunctionExpression;
716
+ override?: Token;
717
+ });
718
+ readonly kind: AstNodeKind;
719
+ readonly modifiers: Token[];
720
+ readonly tokens: {
721
+ readonly name: Identifier;
722
+ readonly override?: Token;
723
+ };
724
+ get accessModifier(): Token;
725
+ readonly location: Location | undefined;
726
+ /**
727
+ * Get the name of this method.
728
+ */
729
+ getName(parseMode: ParseMode): string;
730
+ get leadingTrivia(): Token[];
731
+ transpile(state: BrsTranspileState, name?: Identifier): TranspileResult;
732
+ getTypedef(state: BrsTranspileState): TranspileResult;
424
733
  /**
425
734
  * All child classes must call the parent constructor. The type checker will warn users when they don't call it in their own class,
426
735
  * but we still need to call it even if they have omitted it. This injects the super call if it's missing
@@ -431,43 +740,321 @@ export declare class ClassMethodStatement extends FunctionStatement {
431
740
  */
432
741
  private injectFieldInitializersForConstructor;
433
742
  walk(visitor: WalkVisitor, options: WalkOptions): void;
743
+ clone(): MethodStatement;
434
744
  }
435
- export declare class ClassFieldStatement extends Statement implements TypedefProvider {
436
- readonly accessModifier?: Token;
437
- readonly name?: Identifier;
438
- readonly as?: Token;
439
- readonly type?: Token;
440
- readonly equal?: Token;
745
+ export declare class FieldStatement extends Statement implements TypedefProvider {
746
+ constructor(options: {
747
+ accessModifier?: Token;
748
+ name: Identifier;
749
+ as?: Token;
750
+ typeExpression?: TypeExpression;
751
+ equals?: Token;
752
+ initialValue?: Expression;
753
+ optional?: Token;
754
+ });
755
+ readonly tokens: {
756
+ readonly accessModifier?: Token;
757
+ readonly name: Identifier;
758
+ readonly as?: Token;
759
+ readonly equals?: Token;
760
+ readonly optional?: Token;
761
+ };
762
+ readonly typeExpression?: TypeExpression;
441
763
  readonly initialValue?: Expression;
442
- constructor(accessModifier?: Token, name?: Identifier, as?: Token, type?: Token, equal?: Token, initialValue?: Expression);
764
+ readonly kind = AstNodeKind.FieldStatement;
443
765
  /**
444
766
  * Derive a ValueKind from the type token, or the initial value.
445
767
  * Defaults to `DynamicType`
446
768
  */
447
- getType(): import("../types/ObjectType").ObjectType | import("../types/BooleanType").BooleanType | import("../types/InvalidType").InvalidType | import("../types/StringType").StringType | import("../types/VoidType").VoidType;
448
- readonly range: Range;
769
+ getType(options: GetTypeOptions): BscType;
770
+ readonly location: Location | undefined;
771
+ get leadingTrivia(): Token[];
772
+ get isOptional(): boolean;
449
773
  transpile(state: BrsTranspileState): TranspileResult;
450
774
  getTypedef(state: BrsTranspileState): any[];
451
775
  walk(visitor: WalkVisitor, options: WalkOptions): void;
776
+ clone(): FieldStatement;
452
777
  }
453
- export declare type ClassMemberStatement = ClassFieldStatement | ClassMethodStatement;
778
+ export declare type MemberStatement = FieldStatement | MethodStatement;
454
779
  export declare class TryCatchStatement extends Statement {
455
- tryToken: Token;
456
- tryBranch?: Block;
457
- catchToken?: Token;
458
- exceptionVariable?: Identifier;
459
- catchBranch?: Block;
460
- endTryToken?: Token;
461
- constructor(tryToken: Token, tryBranch?: Block, catchToken?: Token, exceptionVariable?: Identifier, catchBranch?: Block, endTryToken?: Token);
462
- get range(): Range;
780
+ constructor(options?: {
781
+ try?: Token;
782
+ endTry?: Token;
783
+ tryBranch?: Block;
784
+ catchStatement?: CatchStatement;
785
+ });
786
+ readonly tokens: {
787
+ readonly try?: Token;
788
+ readonly endTry?: Token;
789
+ };
790
+ readonly tryBranch: Block;
791
+ readonly catchStatement: CatchStatement;
792
+ readonly kind = AstNodeKind.TryCatchStatement;
793
+ readonly location: Location | undefined;
463
794
  transpile(state: BrsTranspileState): TranspileResult;
464
795
  walk(visitor: WalkVisitor, options: WalkOptions): void;
796
+ get leadingTrivia(): Token[];
797
+ get endTrivia(): Token[];
798
+ clone(): TryCatchStatement;
799
+ }
800
+ export declare class CatchStatement extends Statement {
801
+ constructor(options?: {
802
+ catch?: Token;
803
+ exceptionVariableExpression?: Expression;
804
+ catchBranch?: Block;
805
+ });
806
+ readonly tokens: {
807
+ readonly catch?: Token;
808
+ };
809
+ readonly exceptionVariableExpression?: Expression;
810
+ readonly catchBranch?: Block;
811
+ readonly kind = AstNodeKind.CatchStatement;
812
+ readonly location: Location | undefined;
813
+ transpile(state: BrsTranspileState): TranspileResult;
814
+ walk(visitor: WalkVisitor, options: WalkOptions): void;
815
+ get leadingTrivia(): Token[];
816
+ clone(): CatchStatement;
465
817
  }
466
818
  export declare class ThrowStatement extends Statement {
467
- throwToken: Token;
468
- expression?: Expression;
469
- constructor(throwToken: Token, expression?: Expression);
470
- range: Range;
819
+ constructor(options?: {
820
+ throw?: Token;
821
+ expression?: Expression;
822
+ });
823
+ readonly tokens: {
824
+ readonly throw?: Token;
825
+ };
826
+ readonly expression?: Expression;
827
+ readonly kind = AstNodeKind.ThrowStatement;
828
+ readonly location: Location | undefined;
829
+ transpile(state: BrsTranspileState): TranspileResult;
830
+ walk(visitor: WalkVisitor, options: WalkOptions): void;
831
+ get leadingTrivia(): Token[];
832
+ clone(): ThrowStatement;
833
+ }
834
+ export declare class EnumStatement extends Statement implements TypedefProvider {
835
+ constructor(options: {
836
+ enum?: Token;
837
+ name: Identifier;
838
+ endEnum?: Token;
839
+ body: Array<EnumMemberStatement>;
840
+ });
841
+ readonly tokens: {
842
+ readonly enum?: Token;
843
+ readonly name: Identifier;
844
+ readonly endEnum?: Token;
845
+ };
846
+ readonly body: Array<EnumMemberStatement>;
847
+ readonly kind = AstNodeKind.EnumStatement;
848
+ get location(): Location | undefined;
849
+ getMembers(): EnumMemberStatement[];
850
+ get leadingTrivia(): Token[];
851
+ get endTrivia(): Token[];
852
+ /**
853
+ * Get a map of member names and their values.
854
+ * All values are stored as their AST LiteralExpression representation (i.e. string enum values include the wrapping quotes)
855
+ */
856
+ getMemberValueMap(): Map<string, string>;
857
+ getMemberValue(name: string): string;
858
+ /**
859
+ * The name of the enum (without the namespace prefix)
860
+ */
861
+ get name(): string;
862
+ /**
863
+ * The name of the enum WITH its leading namespace (if applicable)
864
+ */
865
+ get fullName(): string;
866
+ transpile(state: BrsTranspileState): any;
867
+ getTypedef(state: BrsTranspileState): TranspileResult;
868
+ walk(visitor: WalkVisitor, options: WalkOptions): void;
869
+ getType(options: GetTypeOptions): any;
870
+ clone(): EnumStatement;
871
+ }
872
+ export declare class EnumMemberStatement extends Statement implements TypedefProvider {
873
+ constructor(options: {
874
+ name: Identifier;
875
+ equals?: Token;
876
+ value?: Expression;
877
+ });
878
+ readonly tokens: {
879
+ readonly name: Identifier;
880
+ readonly equals?: Token;
881
+ };
882
+ readonly value?: Expression;
883
+ readonly kind = AstNodeKind.EnumMemberStatement;
884
+ get location(): Location;
885
+ /**
886
+ * The name of the member
887
+ */
888
+ get name(): string;
889
+ get leadingTrivia(): Token[];
890
+ /**
891
+ * Get the value of this enum. Requires that `.parent` is set
892
+ */
893
+ getValue(): string;
894
+ transpile(state: BrsTranspileState): TranspileResult;
895
+ getTypedef(state: BrsTranspileState): TranspileResult;
896
+ walk(visitor: WalkVisitor, options: WalkOptions): void;
897
+ getType(options: GetTypeOptions): any;
898
+ clone(): EnumMemberStatement;
899
+ }
900
+ export declare class ConstStatement extends Statement implements TypedefProvider {
901
+ constructor(options: {
902
+ const?: Token;
903
+ name: Identifier;
904
+ equals?: Token;
905
+ value: Expression;
906
+ });
907
+ readonly tokens: {
908
+ readonly const: Token;
909
+ readonly name: Identifier;
910
+ readonly equals: Token;
911
+ };
912
+ readonly value: Expression;
913
+ readonly kind = AstNodeKind.ConstStatement;
914
+ readonly location: Location | undefined;
915
+ get name(): string;
916
+ get leadingTrivia(): Token[];
917
+ /**
918
+ * The name of the statement WITH its leading namespace (if applicable)
919
+ */
920
+ get fullName(): string;
921
+ transpile(state: BrsTranspileState): TranspileResult;
922
+ getTypedef(state: BrsTranspileState): TranspileResult;
923
+ walk(visitor: WalkVisitor, options: WalkOptions): void;
924
+ getType(options: GetTypeOptions): BscType;
925
+ clone(): ConstStatement;
926
+ }
927
+ export declare class ContinueStatement extends Statement {
928
+ constructor(options: {
929
+ continue?: Token;
930
+ loopType: Token;
931
+ });
932
+ readonly tokens: {
933
+ readonly continue?: Token;
934
+ readonly loopType: Token;
935
+ };
936
+ readonly kind = AstNodeKind.ContinueStatement;
937
+ readonly location: Location | undefined;
471
938
  transpile(state: BrsTranspileState): (string | import("source-map").SourceNode)[];
472
939
  walk(visitor: WalkVisitor, options: WalkOptions): void;
940
+ get leadingTrivia(): Token[];
941
+ clone(): ContinueStatement;
942
+ }
943
+ export declare class TypecastStatement extends Statement {
944
+ constructor(options: {
945
+ typecast?: Token;
946
+ typecastExpression: TypecastExpression;
947
+ });
948
+ readonly tokens: {
949
+ readonly typecast?: Token;
950
+ };
951
+ readonly typecastExpression: TypecastExpression;
952
+ readonly kind = AstNodeKind.TypecastStatement;
953
+ readonly location: Location;
954
+ transpile(state: BrsTranspileState): (string | TranspileResult)[];
955
+ walk(visitor: WalkVisitor, options: WalkOptions): void;
956
+ get leadingTrivia(): Token[];
957
+ getType(options: GetTypeOptions): BscType;
958
+ clone(): TypecastStatement;
959
+ }
960
+ export declare class ConditionalCompileErrorStatement extends Statement {
961
+ constructor(options: {
962
+ hashError?: Token;
963
+ message: Token;
964
+ });
965
+ readonly tokens: {
966
+ readonly hashError?: Token;
967
+ readonly message: Token;
968
+ };
969
+ readonly kind = AstNodeKind.ConditionalCompileErrorStatement;
970
+ readonly location: Location | undefined;
971
+ transpile(state: BrsTranspileState): (string | TranspileResult)[];
972
+ walk(visitor: WalkVisitor, options: WalkOptions): void;
973
+ get leadingTrivia(): Token[];
974
+ clone(): ConditionalCompileErrorStatement;
975
+ }
976
+ export declare class AliasStatement extends Statement {
977
+ constructor(options: {
978
+ alias?: Token;
979
+ name: Token;
980
+ equals?: Token;
981
+ value: VariableExpression | DottedGetExpression;
982
+ });
983
+ readonly tokens: {
984
+ readonly alias?: Token;
985
+ readonly name: Token;
986
+ readonly equals?: Token;
987
+ };
988
+ readonly value: Expression;
989
+ readonly kind = AstNodeKind.AliasStatement;
990
+ readonly location: Location;
991
+ transpile(state: BrsTranspileState): (string | TranspileResult)[];
992
+ walk(visitor: WalkVisitor, options: WalkOptions): void;
993
+ get leadingTrivia(): Token[];
994
+ getType(options: GetTypeOptions): BscType;
995
+ clone(): AliasStatement;
996
+ }
997
+ export declare class ConditionalCompileStatement extends Statement {
998
+ constructor(options: {
999
+ hashIf?: Token;
1000
+ not?: Token;
1001
+ condition: Token;
1002
+ hashElse?: Token;
1003
+ hashEndIf?: Token;
1004
+ thenBranch: Block;
1005
+ elseBranch?: ConditionalCompileStatement | Block;
1006
+ });
1007
+ readonly tokens: {
1008
+ readonly hashIf?: Token;
1009
+ readonly not?: Token;
1010
+ readonly condition: Token;
1011
+ readonly hashElse?: Token;
1012
+ readonly hashEndIf?: Token;
1013
+ };
1014
+ readonly thenBranch: Block;
1015
+ readonly elseBranch?: ConditionalCompileStatement | Block;
1016
+ readonly kind = AstNodeKind.ConditionalCompileStatement;
1017
+ readonly location: Location | undefined;
1018
+ transpile(state: BrsTranspileState): TranspileResult;
1019
+ walk(visitor: WalkVisitor, options: WalkOptions): void;
1020
+ get leadingTrivia(): Token[];
1021
+ clone(): any;
1022
+ getBranchStatementIndex(stmt: Statement): 1 | -1 | 0;
1023
+ }
1024
+ export declare class ConditionalCompileConstStatement extends Statement {
1025
+ constructor(options: {
1026
+ hashConst?: Token;
1027
+ assignment: AssignmentStatement;
1028
+ });
1029
+ readonly tokens: {
1030
+ readonly hashConst?: Token;
1031
+ };
1032
+ readonly assignment: AssignmentStatement;
1033
+ readonly kind = AstNodeKind.ConditionalCompileConstStatement;
1034
+ readonly location: Location | undefined;
1035
+ transpile(state: BrsTranspileState): (string | import("source-map").SourceNode | TranspileResult)[];
1036
+ walk(visitor: WalkVisitor, options: WalkOptions): void;
1037
+ get leadingTrivia(): Token[];
1038
+ clone(): ConditionalCompileConstStatement;
1039
+ }
1040
+ export declare class TypeStatement extends Statement {
1041
+ constructor(options: {
1042
+ type?: Token;
1043
+ name: Token;
1044
+ equals?: Token;
1045
+ value: TypeExpression;
1046
+ });
1047
+ readonly tokens: {
1048
+ readonly type?: Token;
1049
+ readonly name: Token;
1050
+ readonly equals?: Token;
1051
+ };
1052
+ readonly value: TypeExpression;
1053
+ readonly kind = AstNodeKind.TypeStatement;
1054
+ readonly location: Location;
1055
+ transpile(state: BrsTranspileState): any[];
1056
+ walk(visitor: WalkVisitor, options: WalkOptions): void;
1057
+ get leadingTrivia(): Token[];
1058
+ getType(options: GetTypeOptions): BscType;
1059
+ clone(): TypeStatement;
473
1060
  }