brighterscript 1.0.0-alpha.5 → 1.0.0-alpha.50

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 (715) hide show
  1. package/README.md +76 -138
  2. package/bsconfig.schema.json +121 -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 +72 -39
  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 +12 -4
  20. package/dist/CodeActionUtil.js +22 -5
  21. package/dist/CodeActionUtil.js.map +1 -1
  22. package/dist/CommentFlagProcessor.d.ts +7 -6
  23. package/dist/CommentFlagProcessor.js +11 -8
  24. package/dist/CommentFlagProcessor.js.map +1 -1
  25. package/dist/CrossScopeValidator.d.ts +68 -0
  26. package/dist/CrossScopeValidator.js +642 -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 +82 -0
  38. package/dist/DiagnosticManager.js +406 -0
  39. package/dist/DiagnosticManager.js.map +1 -0
  40. package/dist/DiagnosticMessages.d.ts +558 -196
  41. package/dist/DiagnosticMessages.js +870 -340
  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 +100 -105
  53. package/dist/LanguageServer.js +444 -745
  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 +241 -98
  62. package/dist/Program.js +1432 -717
  63. package/dist/Program.js.map +1 -1
  64. package/dist/ProgramBuilder.d.ts +47 -23
  65. package/dist/ProgramBuilder.js +224 -178
  66. package/dist/ProgramBuilder.js.map +1 -1
  67. package/dist/Scope.d.ts +149 -109
  68. package/dist/Scope.js +557 -550
  69. package/dist/Scope.js.map +1 -1
  70. package/dist/SemanticTokenUtils.js +5 -1
  71. package/dist/SemanticTokenUtils.js.map +1 -1
  72. package/dist/Stopwatch.d.ts +4 -0
  73. package/dist/Stopwatch.js +8 -1
  74. package/dist/Stopwatch.js.map +1 -1
  75. package/dist/SymbolTable.d.ts +136 -24
  76. package/dist/SymbolTable.js +565 -64
  77. package/dist/SymbolTable.js.map +1 -1
  78. package/dist/SymbolTypeFlag.d.ts +9 -0
  79. package/dist/SymbolTypeFlag.js +14 -0
  80. package/dist/SymbolTypeFlag.js.map +1 -0
  81. package/dist/Throttler.d.ts +12 -0
  82. package/dist/Throttler.js +39 -0
  83. package/dist/Throttler.js.map +1 -1
  84. package/dist/Watcher.d.ts +0 -3
  85. package/dist/Watcher.js +0 -3
  86. package/dist/Watcher.js.map +1 -1
  87. package/dist/XmlScope.d.ts +5 -15
  88. package/dist/XmlScope.js +34 -90
  89. package/dist/XmlScope.js.map +1 -1
  90. package/dist/astUtils/CachedLookups.d.ts +50 -0
  91. package/dist/astUtils/CachedLookups.js +334 -0
  92. package/dist/astUtils/CachedLookups.js.map +1 -0
  93. package/dist/astUtils/CachedLookups.spec.js +39 -0
  94. package/dist/astUtils/CachedLookups.spec.js.map +1 -0
  95. package/dist/astUtils/Editor.d.ts +69 -0
  96. package/dist/astUtils/Editor.js +245 -0
  97. package/dist/astUtils/Editor.js.map +1 -0
  98. package/dist/astUtils/Editor.spec.js +258 -0
  99. package/dist/astUtils/Editor.spec.js.map +1 -0
  100. package/dist/astUtils/creators.d.ts +54 -19
  101. package/dist/astUtils/creators.js +242 -42
  102. package/dist/astUtils/creators.js.map +1 -1
  103. package/dist/astUtils/creators.spec.js +5 -5
  104. package/dist/astUtils/creators.spec.js.map +1 -1
  105. package/dist/astUtils/reflection.d.ts +196 -85
  106. package/dist/astUtils/reflection.js +497 -144
  107. package/dist/astUtils/reflection.js.map +1 -1
  108. package/dist/astUtils/reflection.spec.js +267 -167
  109. package/dist/astUtils/reflection.spec.js.map +1 -1
  110. package/dist/astUtils/stackedVisitor.js.map +1 -1
  111. package/dist/astUtils/stackedVisitor.spec.js +14 -14
  112. package/dist/astUtils/stackedVisitor.spec.js.map +1 -1
  113. package/dist/astUtils/visitors.d.ts +116 -53
  114. package/dist/astUtils/visitors.js +95 -15
  115. package/dist/astUtils/visitors.js.map +1 -1
  116. package/dist/astUtils/visitors.spec.js +629 -51
  117. package/dist/astUtils/visitors.spec.js.map +1 -1
  118. package/dist/astUtils/xml.d.ts +9 -8
  119. package/dist/astUtils/xml.js +12 -7
  120. package/dist/astUtils/xml.js.map +1 -1
  121. package/dist/bscPlugin/BscPlugin.d.ts +24 -4
  122. package/dist/bscPlugin/BscPlugin.js +88 -4
  123. package/dist/bscPlugin/BscPlugin.js.map +1 -1
  124. package/dist/bscPlugin/CallExpressionInfo.d.ts +36 -0
  125. package/dist/bscPlugin/CallExpressionInfo.js +143 -0
  126. package/dist/bscPlugin/CallExpressionInfo.js.map +1 -0
  127. package/dist/bscPlugin/FileWriter.d.ts +6 -0
  128. package/dist/bscPlugin/FileWriter.js +24 -0
  129. package/dist/bscPlugin/FileWriter.js.map +1 -0
  130. package/dist/bscPlugin/SignatureHelpUtil.d.ts +10 -0
  131. package/dist/bscPlugin/SignatureHelpUtil.js +137 -0
  132. package/dist/bscPlugin/SignatureHelpUtil.js.map +1 -0
  133. package/dist/bscPlugin/codeActions/CodeActionsProcessor.d.ts +6 -5
  134. package/dist/bscPlugin/codeActions/CodeActionsProcessor.js +173 -27
  135. package/dist/bscPlugin/codeActions/CodeActionsProcessor.js.map +1 -1
  136. package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js +138 -21
  137. package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js.map +1 -1
  138. package/dist/bscPlugin/completions/CompletionsProcessor.d.ts +65 -0
  139. package/dist/bscPlugin/completions/CompletionsProcessor.js +633 -0
  140. package/dist/bscPlugin/completions/CompletionsProcessor.js.map +1 -0
  141. package/dist/bscPlugin/completions/CompletionsProcessor.spec.js +2512 -0
  142. package/dist/bscPlugin/completions/CompletionsProcessor.spec.js.map +1 -0
  143. package/dist/bscPlugin/definition/DefinitionProvider.d.ts +13 -0
  144. package/dist/bscPlugin/definition/DefinitionProvider.js +212 -0
  145. package/dist/bscPlugin/definition/DefinitionProvider.js.map +1 -0
  146. package/dist/bscPlugin/definition/DefinitionProvider.spec.js +87 -0
  147. package/dist/bscPlugin/definition/DefinitionProvider.spec.js.map +1 -0
  148. package/dist/bscPlugin/fileProviders/FileProvider.d.ts +9 -0
  149. package/dist/bscPlugin/fileProviders/FileProvider.js +51 -0
  150. package/dist/bscPlugin/fileProviders/FileProvider.js.map +1 -0
  151. package/dist/bscPlugin/hover/HoverProcessor.d.ts +18 -0
  152. package/dist/bscPlugin/hover/HoverProcessor.js +230 -0
  153. package/dist/bscPlugin/hover/HoverProcessor.js.map +1 -0
  154. package/dist/bscPlugin/hover/HoverProcessor.spec.js +991 -0
  155. package/dist/bscPlugin/hover/HoverProcessor.spec.js.map +1 -0
  156. package/dist/bscPlugin/references/ReferencesProvider.d.ts +12 -0
  157. package/dist/bscPlugin/references/ReferencesProvider.js +57 -0
  158. package/dist/bscPlugin/references/ReferencesProvider.js.map +1 -0
  159. package/dist/bscPlugin/references/ReferencesProvider.spec.d.ts +1 -0
  160. package/dist/bscPlugin/references/ReferencesProvider.spec.js +51 -0
  161. package/dist/bscPlugin/references/ReferencesProvider.spec.js.map +1 -0
  162. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.d.ts +14 -0
  163. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js +164 -0
  164. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js.map +1 -0
  165. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.d.ts +1 -0
  166. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js +564 -0
  167. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js.map +1 -0
  168. package/dist/bscPlugin/serialize/BslibInjector.spec.d.ts +1 -0
  169. package/dist/bscPlugin/serialize/BslibInjector.spec.js +33 -0
  170. package/dist/bscPlugin/serialize/BslibInjector.spec.js.map +1 -0
  171. package/dist/bscPlugin/serialize/BslibManager.d.ts +12 -0
  172. package/dist/bscPlugin/serialize/BslibManager.js +46 -0
  173. package/dist/bscPlugin/serialize/BslibManager.js.map +1 -0
  174. package/dist/bscPlugin/serialize/FileSerializer.d.ts +9 -0
  175. package/dist/bscPlugin/serialize/FileSerializer.js +75 -0
  176. package/dist/bscPlugin/serialize/FileSerializer.js.map +1 -0
  177. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.d.ts +7 -0
  178. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.js +22 -0
  179. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.js.map +1 -0
  180. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.spec.d.ts +1 -0
  181. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.spec.js +291 -0
  182. package/dist/bscPlugin/symbols/DocumentSymbolProcessor.spec.js.map +1 -0
  183. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.d.ts +7 -0
  184. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.js +26 -0
  185. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.js.map +1 -0
  186. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.spec.d.ts +1 -0
  187. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.spec.js +245 -0
  188. package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.spec.js.map +1 -0
  189. package/dist/bscPlugin/symbols/symbolUtils.d.ts +5 -0
  190. package/dist/bscPlugin/symbols/symbolUtils.js +141 -0
  191. package/dist/bscPlugin/symbols/symbolUtils.js.map +1 -0
  192. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.d.ts +27 -0
  193. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js +418 -0
  194. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js.map +1 -0
  195. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.d.ts +1 -0
  196. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.js +75 -0
  197. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.js.map +1 -0
  198. package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.d.ts +12 -0
  199. package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js +99 -0
  200. package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js.map +1 -0
  201. package/dist/bscPlugin/validation/BrsFileAfterValidator.d.ts +7 -0
  202. package/dist/bscPlugin/validation/BrsFileAfterValidator.js +18 -0
  203. package/dist/bscPlugin/validation/BrsFileAfterValidator.js.map +1 -0
  204. package/dist/bscPlugin/validation/BrsFileValidator.d.ts +37 -0
  205. package/dist/bscPlugin/validation/BrsFileValidator.js +638 -0
  206. package/dist/bscPlugin/validation/BrsFileValidator.js.map +1 -0
  207. package/dist/bscPlugin/validation/BrsFileValidator.spec.d.ts +1 -0
  208. package/dist/bscPlugin/validation/BrsFileValidator.spec.js +1517 -0
  209. package/dist/bscPlugin/validation/BrsFileValidator.spec.js.map +1 -0
  210. package/dist/bscPlugin/validation/ProgramValidator.d.ts +11 -0
  211. package/dist/bscPlugin/validation/ProgramValidator.js +33 -0
  212. package/dist/bscPlugin/validation/ProgramValidator.js.map +1 -0
  213. package/dist/bscPlugin/validation/ScopeValidator.d.ts +141 -0
  214. package/dist/bscPlugin/validation/ScopeValidator.js +1323 -0
  215. package/dist/bscPlugin/validation/ScopeValidator.js.map +1 -0
  216. package/dist/bscPlugin/validation/ScopeValidator.spec.d.ts +1 -0
  217. package/dist/bscPlugin/validation/ScopeValidator.spec.js +6135 -0
  218. package/dist/bscPlugin/validation/ScopeValidator.spec.js.map +1 -0
  219. package/dist/bscPlugin/validation/XmlFileValidator.d.ts +8 -0
  220. package/dist/bscPlugin/validation/XmlFileValidator.js +36 -0
  221. package/dist/bscPlugin/validation/XmlFileValidator.js.map +1 -0
  222. package/dist/cli.js +126 -27
  223. package/dist/cli.js.map +1 -1
  224. package/dist/common/Sequencer.d.ts +53 -0
  225. package/dist/common/Sequencer.js +233 -0
  226. package/dist/common/Sequencer.js.map +1 -0
  227. package/dist/common/Sequencer.spec.d.ts +1 -0
  228. package/dist/common/Sequencer.spec.js +75 -0
  229. package/dist/common/Sequencer.spec.js.map +1 -0
  230. package/dist/deferred.d.ts +5 -3
  231. package/dist/deferred.js +10 -0
  232. package/dist/deferred.js.map +1 -1
  233. package/dist/diagnosticUtils.d.ts +10 -3
  234. package/dist/diagnosticUtils.js +64 -25
  235. package/dist/diagnosticUtils.js.map +1 -1
  236. package/dist/examples/plugins/removePrint.d.ts +2 -2
  237. package/dist/examples/plugins/removePrint.js +8 -12
  238. package/dist/examples/plugins/removePrint.js.map +1 -1
  239. package/dist/files/AssetFile.d.ts +24 -0
  240. package/dist/files/AssetFile.js +25 -0
  241. package/dist/files/AssetFile.js.map +1 -0
  242. package/dist/files/BrsFile.Class.spec.js +1213 -259
  243. package/dist/files/BrsFile.Class.spec.js.map +1 -1
  244. package/dist/files/BrsFile.d.ts +145 -87
  245. package/dist/files/BrsFile.js +836 -934
  246. package/dist/files/BrsFile.js.map +1 -1
  247. package/dist/files/BrsFile.spec.js +4226 -902
  248. package/dist/files/BrsFile.spec.js.map +1 -1
  249. package/dist/files/BscFile.d.ts +102 -0
  250. package/dist/files/BscFile.js +15 -0
  251. package/dist/files/BscFile.js.map +1 -0
  252. package/dist/files/Factory.d.ts +25 -0
  253. package/dist/files/Factory.js +22 -0
  254. package/dist/files/Factory.js.map +1 -0
  255. package/dist/files/LazyFileData.d.ts +21 -0
  256. package/dist/files/LazyFileData.js +54 -0
  257. package/dist/files/LazyFileData.js.map +1 -0
  258. package/dist/files/LazyFileData.spec.d.ts +1 -0
  259. package/dist/files/LazyFileData.spec.js +27 -0
  260. package/dist/files/LazyFileData.spec.js.map +1 -0
  261. package/dist/files/XmlFile.d.ts +80 -41
  262. package/dist/files/XmlFile.js +161 -137
  263. package/dist/files/XmlFile.js.map +1 -1
  264. package/dist/files/XmlFile.spec.js +444 -336
  265. package/dist/files/XmlFile.spec.js.map +1 -1
  266. package/dist/files/tests/imports.spec.js +62 -52
  267. package/dist/files/tests/imports.spec.js.map +1 -1
  268. package/dist/files/tests/optionalChaning.spec.d.ts +1 -0
  269. package/dist/files/tests/optionalChaning.spec.js +152 -0
  270. package/dist/files/tests/optionalChaning.spec.js.map +1 -0
  271. package/dist/globalCallables.d.ts +3 -1
  272. package/dist/globalCallables.js +424 -184
  273. package/dist/globalCallables.js.map +1 -1
  274. package/dist/index.d.ts +32 -4
  275. package/dist/index.js +54 -7
  276. package/dist/index.js.map +1 -1
  277. package/dist/interfaces.d.ts +942 -125
  278. package/dist/interfaces.js +21 -0
  279. package/dist/interfaces.js.map +1 -1
  280. package/dist/lexer/Character.spec.js +5 -5
  281. package/dist/lexer/Character.spec.js.map +1 -1
  282. package/dist/lexer/Lexer.d.ts +51 -12
  283. package/dist/lexer/Lexer.js +215 -65
  284. package/dist/lexer/Lexer.js.map +1 -1
  285. package/dist/lexer/Lexer.spec.js +812 -568
  286. package/dist/lexer/Lexer.spec.js.map +1 -1
  287. package/dist/lexer/Token.d.ts +27 -11
  288. package/dist/lexer/Token.js +10 -2
  289. package/dist/lexer/Token.js.map +1 -1
  290. package/dist/lexer/TokenKind.d.ts +40 -2
  291. package/dist/lexer/TokenKind.js +147 -10
  292. package/dist/lexer/TokenKind.js.map +1 -1
  293. package/dist/logging.d.ts +14 -0
  294. package/dist/logging.js +29 -0
  295. package/dist/logging.js.map +1 -0
  296. package/dist/lsp/ActionQueue.d.ts +35 -0
  297. package/dist/lsp/ActionQueue.js +115 -0
  298. package/dist/lsp/ActionQueue.js.map +1 -0
  299. package/dist/lsp/ActionQueue.spec.d.ts +1 -0
  300. package/dist/lsp/ActionQueue.spec.js +80 -0
  301. package/dist/lsp/ActionQueue.spec.js.map +1 -0
  302. package/dist/lsp/DocumentManager.d.ts +63 -0
  303. package/dist/lsp/DocumentManager.js +122 -0
  304. package/dist/lsp/DocumentManager.js.map +1 -0
  305. package/dist/lsp/DocumentManager.spec.d.ts +1 -0
  306. package/dist/lsp/DocumentManager.spec.js +103 -0
  307. package/dist/lsp/DocumentManager.spec.js.map +1 -0
  308. package/dist/lsp/LspProject.d.ts +239 -0
  309. package/dist/lsp/LspProject.js +3 -0
  310. package/dist/lsp/LspProject.js.map +1 -0
  311. package/dist/lsp/PathFilterer.d.ts +75 -0
  312. package/dist/lsp/PathFilterer.js +196 -0
  313. package/dist/lsp/PathFilterer.js.map +1 -0
  314. package/dist/lsp/PathFilterer.spec.d.ts +1 -0
  315. package/dist/lsp/PathFilterer.spec.js +182 -0
  316. package/dist/lsp/PathFilterer.spec.js.map +1 -0
  317. package/dist/lsp/Project.d.ts +168 -0
  318. package/dist/lsp/Project.js +437 -0
  319. package/dist/lsp/Project.js.map +1 -0
  320. package/dist/lsp/Project.spec.d.ts +1 -0
  321. package/dist/lsp/Project.spec.js +267 -0
  322. package/dist/lsp/Project.spec.js.map +1 -0
  323. package/dist/lsp/ProjectManager.d.ts +242 -0
  324. package/dist/lsp/ProjectManager.js +824 -0
  325. package/dist/lsp/ProjectManager.js.map +1 -0
  326. package/dist/lsp/ProjectManager.spec.d.ts +1 -0
  327. package/dist/lsp/ProjectManager.spec.js +913 -0
  328. package/dist/lsp/ProjectManager.spec.js.map +1 -0
  329. package/dist/lsp/ReaderWriterManager.d.ts +21 -0
  330. package/dist/lsp/ReaderWriterManager.js +60 -0
  331. package/dist/lsp/ReaderWriterManager.js.map +1 -0
  332. package/dist/lsp/worker/MessageHandler.d.ts +99 -0
  333. package/dist/lsp/worker/MessageHandler.js +138 -0
  334. package/dist/lsp/worker/MessageHandler.js.map +1 -0
  335. package/dist/lsp/worker/MessageHandler.spec.d.ts +1 -0
  336. package/dist/lsp/worker/MessageHandler.spec.js +64 -0
  337. package/dist/lsp/worker/MessageHandler.spec.js.map +1 -0
  338. package/dist/lsp/worker/WorkerPool.d.ts +38 -0
  339. package/dist/lsp/worker/WorkerPool.js +78 -0
  340. package/dist/lsp/worker/WorkerPool.js.map +1 -0
  341. package/dist/lsp/worker/WorkerPool.spec.d.ts +1 -0
  342. package/dist/lsp/worker/WorkerPool.spec.js +59 -0
  343. package/dist/lsp/worker/WorkerPool.spec.js.map +1 -0
  344. package/dist/lsp/worker/WorkerThreadProject.d.ts +143 -0
  345. package/dist/lsp/worker/WorkerThreadProject.js +189 -0
  346. package/dist/lsp/worker/WorkerThreadProject.js.map +1 -0
  347. package/dist/lsp/worker/WorkerThreadProject.spec.d.ts +2 -0
  348. package/dist/lsp/worker/WorkerThreadProject.spec.js +71 -0
  349. package/dist/lsp/worker/WorkerThreadProject.spec.js.map +1 -0
  350. package/dist/lsp/worker/WorkerThreadProjectRunner.d.ts +15 -0
  351. package/dist/lsp/worker/WorkerThreadProjectRunner.js +58 -0
  352. package/dist/lsp/worker/WorkerThreadProjectRunner.js.map +1 -0
  353. package/dist/lsp/worker/run.d.ts +1 -0
  354. package/dist/lsp/worker/run.js +14 -0
  355. package/dist/lsp/worker/run.js.map +1 -0
  356. package/dist/parser/AstNode.d.ts +203 -0
  357. package/dist/parser/AstNode.js +303 -0
  358. package/dist/parser/AstNode.js.map +1 -0
  359. package/dist/parser/AstNode.spec.d.ts +1 -0
  360. package/dist/parser/AstNode.spec.js +1455 -0
  361. package/dist/parser/AstNode.spec.js.map +1 -0
  362. package/dist/parser/BrightScriptDocParser.d.ts +56 -0
  363. package/dist/parser/BrightScriptDocParser.js +294 -0
  364. package/dist/parser/BrightScriptDocParser.js.map +1 -0
  365. package/dist/parser/BrightScriptDocParser.spec.d.ts +1 -0
  366. package/dist/parser/BrightScriptDocParser.spec.js +310 -0
  367. package/dist/parser/BrightScriptDocParser.spec.js.map +1 -0
  368. package/dist/parser/BrsTranspileState.d.ts +22 -3
  369. package/dist/parser/BrsTranspileState.js +19 -0
  370. package/dist/parser/BrsTranspileState.js.map +1 -1
  371. package/dist/parser/Expression.d.ts +553 -221
  372. package/dist/parser/Expression.js +1414 -505
  373. package/dist/parser/Expression.js.map +1 -1
  374. package/dist/parser/Expression.spec.d.ts +1 -0
  375. package/dist/parser/Expression.spec.js +40 -0
  376. package/dist/parser/Expression.spec.js.map +1 -0
  377. package/dist/parser/Parser.Class.spec.js +255 -125
  378. package/dist/parser/Parser.Class.spec.js.map +1 -1
  379. package/dist/parser/Parser.d.ts +117 -124
  380. package/dist/parser/Parser.js +1669 -982
  381. package/dist/parser/Parser.js.map +1 -1
  382. package/dist/parser/Parser.spec.d.ts +3 -1
  383. package/dist/parser/Parser.spec.js +2111 -525
  384. package/dist/parser/Parser.spec.js.map +1 -1
  385. package/dist/parser/SGParser.d.ts +29 -13
  386. package/dist/parser/SGParser.js +85 -56
  387. package/dist/parser/SGParser.js.map +1 -1
  388. package/dist/parser/SGParser.spec.js +30 -45
  389. package/dist/parser/SGParser.spec.js.map +1 -1
  390. package/dist/parser/SGTypes.d.ts +134 -46
  391. package/dist/parser/SGTypes.js +206 -115
  392. package/dist/parser/SGTypes.js.map +1 -1
  393. package/dist/parser/Statement.d.ts +849 -267
  394. package/dist/parser/Statement.js +2412 -625
  395. package/dist/parser/Statement.js.map +1 -1
  396. package/dist/parser/Statement.spec.js +133 -36
  397. package/dist/parser/Statement.spec.js.map +1 -1
  398. package/dist/parser/TranspileState.d.ts +26 -12
  399. package/dist/parser/TranspileState.js +115 -24
  400. package/dist/parser/TranspileState.js.map +1 -1
  401. package/dist/parser/tests/Parser.spec.d.ts +3 -9
  402. package/dist/parser/tests/Parser.spec.js +7 -13
  403. package/dist/parser/tests/Parser.spec.js.map +1 -1
  404. package/dist/parser/tests/controlFlow/For.spec.js +83 -75
  405. package/dist/parser/tests/controlFlow/For.spec.js.map +1 -1
  406. package/dist/parser/tests/controlFlow/ForEach.spec.js +85 -51
  407. package/dist/parser/tests/controlFlow/ForEach.spec.js.map +1 -1
  408. package/dist/parser/tests/controlFlow/If.spec.js +382 -239
  409. package/dist/parser/tests/controlFlow/If.spec.js.map +1 -1
  410. package/dist/parser/tests/controlFlow/While.spec.js +52 -45
  411. package/dist/parser/tests/controlFlow/While.spec.js.map +1 -1
  412. package/dist/parser/tests/expression/Additive.spec.js +51 -43
  413. package/dist/parser/tests/expression/Additive.spec.js.map +1 -1
  414. package/dist/parser/tests/expression/ArrayLiterals.spec.js +192 -142
  415. package/dist/parser/tests/expression/ArrayLiterals.spec.js.map +1 -1
  416. package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js +236 -160
  417. package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js.map +1 -1
  418. package/dist/parser/tests/expression/Boolean.spec.js +41 -34
  419. package/dist/parser/tests/expression/Boolean.spec.js.map +1 -1
  420. package/dist/parser/tests/expression/Call.spec.js +173 -55
  421. package/dist/parser/tests/expression/Call.spec.js.map +1 -1
  422. package/dist/parser/tests/expression/Exponential.spec.js +20 -20
  423. package/dist/parser/tests/expression/Exponential.spec.js.map +1 -1
  424. package/dist/parser/tests/expression/Function.spec.js +291 -282
  425. package/dist/parser/tests/expression/Function.spec.js.map +1 -1
  426. package/dist/parser/tests/expression/Indexing.spec.js +193 -110
  427. package/dist/parser/tests/expression/Indexing.spec.js.map +1 -1
  428. package/dist/parser/tests/expression/Multiplicative.spec.js +42 -42
  429. package/dist/parser/tests/expression/Multiplicative.spec.js.map +1 -1
  430. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js +260 -115
  431. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js.map +1 -1
  432. package/dist/parser/tests/expression/PrefixUnary.spec.js +58 -52
  433. package/dist/parser/tests/expression/PrefixUnary.spec.js.map +1 -1
  434. package/dist/parser/tests/expression/Primary.spec.js +76 -60
  435. package/dist/parser/tests/expression/Primary.spec.js.map +1 -1
  436. package/dist/parser/tests/expression/RegexLiteralExpression.spec.d.ts +1 -0
  437. package/dist/parser/tests/expression/RegexLiteralExpression.spec.js +171 -0
  438. package/dist/parser/tests/expression/RegexLiteralExpression.spec.js.map +1 -0
  439. package/dist/parser/tests/expression/Relational.spec.js +50 -50
  440. package/dist/parser/tests/expression/Relational.spec.js.map +1 -1
  441. package/dist/parser/tests/expression/SourceLiteralExpression.spec.js +31 -31
  442. package/dist/parser/tests/expression/SourceLiteralExpression.spec.js.map +1 -1
  443. package/dist/parser/tests/expression/TemplateStringExpression.spec.js +281 -94
  444. package/dist/parser/tests/expression/TemplateStringExpression.spec.js.map +1 -1
  445. package/dist/parser/tests/expression/TernaryExpression.spec.js +747 -192
  446. package/dist/parser/tests/expression/TernaryExpression.spec.js.map +1 -1
  447. package/dist/parser/tests/expression/TypeExpression.spec.d.ts +1 -0
  448. package/dist/parser/tests/expression/TypeExpression.spec.js +126 -0
  449. package/dist/parser/tests/expression/TypeExpression.spec.js.map +1 -0
  450. package/dist/parser/tests/expression/UnaryExpression.spec.d.ts +1 -0
  451. package/dist/parser/tests/expression/UnaryExpression.spec.js +52 -0
  452. package/dist/parser/tests/expression/UnaryExpression.spec.js.map +1 -0
  453. package/dist/parser/tests/statement/AssignmentOperators.spec.js +44 -44
  454. package/dist/parser/tests/statement/AssignmentOperators.spec.js.map +1 -1
  455. package/dist/parser/tests/statement/ConstStatement.spec.d.ts +1 -0
  456. package/dist/parser/tests/statement/ConstStatement.spec.js +500 -0
  457. package/dist/parser/tests/statement/ConstStatement.spec.js.map +1 -0
  458. package/dist/parser/tests/statement/Continue.spec.d.ts +1 -0
  459. package/dist/parser/tests/statement/Continue.spec.js +119 -0
  460. package/dist/parser/tests/statement/Continue.spec.js.map +1 -0
  461. package/dist/parser/tests/statement/Declaration.spec.js +61 -55
  462. package/dist/parser/tests/statement/Declaration.spec.js.map +1 -1
  463. package/dist/parser/tests/statement/Dim.spec.js +29 -22
  464. package/dist/parser/tests/statement/Dim.spec.js.map +1 -1
  465. package/dist/parser/tests/statement/Enum.spec.d.ts +1 -0
  466. package/dist/parser/tests/statement/Enum.spec.js +744 -0
  467. package/dist/parser/tests/statement/Enum.spec.js.map +1 -0
  468. package/dist/parser/tests/statement/For.spec.d.ts +1 -0
  469. package/dist/parser/tests/statement/For.spec.js +45 -0
  470. package/dist/parser/tests/statement/For.spec.js.map +1 -0
  471. package/dist/parser/tests/statement/ForEach.spec.d.ts +1 -0
  472. package/dist/parser/tests/statement/ForEach.spec.js +36 -0
  473. package/dist/parser/tests/statement/ForEach.spec.js.map +1 -0
  474. package/dist/parser/tests/statement/Function.spec.js +226 -215
  475. package/dist/parser/tests/statement/Function.spec.js.map +1 -1
  476. package/dist/parser/tests/statement/Goto.spec.js +16 -15
  477. package/dist/parser/tests/statement/Goto.spec.js.map +1 -1
  478. package/dist/parser/tests/statement/Increment.spec.js +64 -61
  479. package/dist/parser/tests/statement/Increment.spec.js.map +1 -1
  480. package/dist/parser/tests/statement/InterfaceStatement.spec.d.ts +1 -0
  481. package/dist/parser/tests/statement/InterfaceStatement.spec.js +110 -0
  482. package/dist/parser/tests/statement/InterfaceStatement.spec.js.map +1 -0
  483. package/dist/parser/tests/statement/LibraryStatement.spec.js +22 -22
  484. package/dist/parser/tests/statement/LibraryStatement.spec.js.map +1 -1
  485. package/dist/parser/tests/statement/Misc.spec.js +127 -168
  486. package/dist/parser/tests/statement/Misc.spec.js.map +1 -1
  487. package/dist/parser/tests/statement/PrintStatement.spec.js +133 -114
  488. package/dist/parser/tests/statement/PrintStatement.spec.js.map +1 -1
  489. package/dist/parser/tests/statement/ReturnStatement.spec.js +57 -54
  490. package/dist/parser/tests/statement/ReturnStatement.spec.js.map +1 -1
  491. package/dist/parser/tests/statement/Set.spec.js +131 -117
  492. package/dist/parser/tests/statement/Set.spec.js.map +1 -1
  493. package/dist/parser/tests/statement/Stop.spec.js +14 -13
  494. package/dist/parser/tests/statement/Stop.spec.js.map +1 -1
  495. package/dist/parser/tests/statement/Throw.spec.js +11 -8
  496. package/dist/parser/tests/statement/Throw.spec.js.map +1 -1
  497. package/dist/parser/tests/statement/TryCatch.spec.js +26 -15
  498. package/dist/parser/tests/statement/TryCatch.spec.js.map +1 -1
  499. package/dist/preprocessor/Manifest.d.ts +6 -6
  500. package/dist/preprocessor/Manifest.js +17 -38
  501. package/dist/preprocessor/Manifest.js.map +1 -1
  502. package/dist/preprocessor/Manifest.spec.d.ts +1 -0
  503. package/dist/preprocessor/Manifest.spec.js +78 -103
  504. package/dist/preprocessor/Manifest.spec.js.map +1 -1
  505. package/dist/roku-types/data.json +20347 -0
  506. package/dist/roku-types/index.d.ts +5726 -0
  507. package/dist/roku-types/index.js +11 -0
  508. package/dist/roku-types/index.js.map +1 -0
  509. package/dist/types/ArrayType.d.ts +12 -5
  510. package/dist/types/ArrayType.js +89 -24
  511. package/dist/types/ArrayType.js.map +1 -1
  512. package/dist/types/ArrayType.spec.js +39 -11
  513. package/dist/types/ArrayType.spec.js.map +1 -1
  514. package/dist/types/AssociativeArrayType.d.ts +15 -0
  515. package/dist/types/AssociativeArrayType.js +64 -0
  516. package/dist/types/AssociativeArrayType.js.map +1 -0
  517. package/dist/types/BaseFunctionType.d.ts +10 -0
  518. package/dist/types/BaseFunctionType.js +26 -0
  519. package/dist/types/BaseFunctionType.js.map +1 -0
  520. package/dist/types/BooleanType.d.ts +9 -5
  521. package/dist/types/BooleanType.js +19 -8
  522. package/dist/types/BooleanType.js.map +1 -1
  523. package/dist/types/BooleanType.spec.js +10 -4
  524. package/dist/types/BooleanType.spec.js.map +1 -1
  525. package/dist/types/BscType.d.ts +41 -3
  526. package/dist/types/BscType.js +152 -0
  527. package/dist/types/BscType.js.map +1 -1
  528. package/dist/types/BscTypeKind.d.ts +28 -0
  529. package/dist/types/BscTypeKind.js +33 -0
  530. package/dist/types/BscTypeKind.js.map +1 -0
  531. package/dist/types/BuiltInInterfaceAdder.d.ts +28 -0
  532. package/dist/types/BuiltInInterfaceAdder.js +212 -0
  533. package/dist/types/BuiltInInterfaceAdder.js.map +1 -0
  534. package/dist/types/BuiltInInterfaceAdder.spec.d.ts +1 -0
  535. package/dist/types/BuiltInInterfaceAdder.spec.js +115 -0
  536. package/dist/types/BuiltInInterfaceAdder.spec.js.map +1 -0
  537. package/dist/types/CallFuncableType.d.ts +24 -0
  538. package/dist/types/CallFuncableType.js +91 -0
  539. package/dist/types/CallFuncableType.js.map +1 -0
  540. package/dist/types/ClassType.d.ts +17 -0
  541. package/dist/types/ClassType.js +60 -0
  542. package/dist/types/ClassType.js.map +1 -0
  543. package/dist/types/ClassType.spec.d.ts +1 -0
  544. package/dist/types/ClassType.spec.js +76 -0
  545. package/dist/types/ClassType.spec.js.map +1 -0
  546. package/dist/types/ComponentType.d.ts +22 -0
  547. package/dist/types/ComponentType.js +107 -0
  548. package/dist/types/ComponentType.js.map +1 -0
  549. package/dist/types/DoubleType.d.ts +10 -5
  550. package/dist/types/DoubleType.js +21 -17
  551. package/dist/types/DoubleType.js.map +1 -1
  552. package/dist/types/DoubleType.spec.js +12 -4
  553. package/dist/types/DoubleType.spec.js.map +1 -1
  554. package/dist/types/DynamicType.d.ts +13 -5
  555. package/dist/types/DynamicType.js +26 -5
  556. package/dist/types/DynamicType.js.map +1 -1
  557. package/dist/types/DynamicType.spec.js +16 -5
  558. package/dist/types/DynamicType.spec.js.map +1 -1
  559. package/dist/types/EnumType.d.ts +42 -0
  560. package/dist/types/EnumType.js +98 -0
  561. package/dist/types/EnumType.js.map +1 -0
  562. package/dist/types/EnumType.spec.d.ts +1 -0
  563. package/dist/types/EnumType.spec.js +33 -0
  564. package/dist/types/EnumType.spec.js.map +1 -0
  565. package/dist/types/FloatType.d.ts +10 -5
  566. package/dist/types/FloatType.js +21 -17
  567. package/dist/types/FloatType.js.map +1 -1
  568. package/dist/types/FloatType.spec.js +4 -4
  569. package/dist/types/FloatType.spec.js.map +1 -1
  570. package/dist/types/FunctionType.d.ts +8 -22
  571. package/dist/types/FunctionType.js +25 -63
  572. package/dist/types/FunctionType.js.map +1 -1
  573. package/dist/types/InheritableType.d.ts +29 -0
  574. package/dist/types/InheritableType.js +173 -0
  575. package/dist/types/InheritableType.js.map +1 -0
  576. package/dist/types/InlineInterfaceType.d.ts +5 -0
  577. package/dist/types/InlineInterfaceType.js +17 -0
  578. package/dist/types/InlineInterfaceType.js.map +1 -0
  579. package/dist/types/IntegerType.d.ts +10 -5
  580. package/dist/types/IntegerType.js +21 -17
  581. package/dist/types/IntegerType.js.map +1 -1
  582. package/dist/types/IntegerType.spec.js +8 -4
  583. package/dist/types/IntegerType.spec.js.map +1 -1
  584. package/dist/types/InterfaceType.d.ts +14 -6
  585. package/dist/types/InterfaceType.js +30 -15
  586. package/dist/types/InterfaceType.js.map +1 -1
  587. package/dist/types/InterfaceType.spec.d.ts +1 -0
  588. package/dist/types/InterfaceType.spec.js +227 -0
  589. package/dist/types/InterfaceType.spec.js.map +1 -0
  590. package/dist/types/IntersectionType.d.ts +29 -0
  591. package/dist/types/IntersectionType.js +253 -0
  592. package/dist/types/IntersectionType.js.map +1 -0
  593. package/dist/types/IntersectionType.spec.d.ts +1 -0
  594. package/dist/types/IntersectionType.spec.js +150 -0
  595. package/dist/types/IntersectionType.spec.js.map +1 -0
  596. package/dist/types/InvalidType.d.ts +10 -5
  597. package/dist/types/InvalidType.js +21 -9
  598. package/dist/types/InvalidType.js.map +1 -1
  599. package/dist/types/InvalidType.spec.js +8 -4
  600. package/dist/types/InvalidType.spec.js.map +1 -1
  601. package/dist/types/LongIntegerType.d.ts +10 -5
  602. package/dist/types/LongIntegerType.js +21 -17
  603. package/dist/types/LongIntegerType.js.map +1 -1
  604. package/dist/types/LongIntegerType.spec.js +10 -4
  605. package/dist/types/LongIntegerType.spec.js.map +1 -1
  606. package/dist/types/NamespaceType.d.ts +12 -0
  607. package/dist/types/NamespaceType.js +28 -0
  608. package/dist/types/NamespaceType.js.map +1 -0
  609. package/dist/types/ObjectType.d.ts +12 -5
  610. package/dist/types/ObjectType.js +25 -8
  611. package/dist/types/ObjectType.js.map +1 -1
  612. package/dist/types/ObjectType.spec.js +3 -3
  613. package/dist/types/ObjectType.spec.js.map +1 -1
  614. package/dist/types/ReferenceType.d.ts +123 -0
  615. package/dist/types/ReferenceType.js +720 -0
  616. package/dist/types/ReferenceType.js.map +1 -0
  617. package/dist/types/ReferenceType.spec.d.ts +1 -0
  618. package/dist/types/ReferenceType.spec.js +151 -0
  619. package/dist/types/ReferenceType.spec.js.map +1 -0
  620. package/dist/types/StringType.d.ts +12 -5
  621. package/dist/types/StringType.js +23 -8
  622. package/dist/types/StringType.js.map +1 -1
  623. package/dist/types/StringType.spec.js +3 -3
  624. package/dist/types/StringType.spec.js.map +1 -1
  625. package/dist/types/TypeStatementType.d.ts +18 -0
  626. package/dist/types/TypeStatementType.js +45 -0
  627. package/dist/types/TypeStatementType.js.map +1 -0
  628. package/dist/types/TypedFunctionType.d.ts +34 -0
  629. package/dist/types/TypedFunctionType.js +147 -0
  630. package/dist/types/TypedFunctionType.js.map +1 -0
  631. package/dist/types/TypedFunctionType.spec.d.ts +1 -0
  632. package/dist/types/TypedFunctionType.spec.js +122 -0
  633. package/dist/types/TypedFunctionType.spec.js.map +1 -0
  634. package/dist/types/UninitializedType.d.ts +11 -6
  635. package/dist/types/UninitializedType.js +20 -11
  636. package/dist/types/UninitializedType.js.map +1 -1
  637. package/dist/types/UnionType.d.ts +27 -0
  638. package/dist/types/UnionType.js +193 -0
  639. package/dist/types/UnionType.js.map +1 -0
  640. package/dist/types/UnionType.spec.d.ts +1 -0
  641. package/dist/types/UnionType.spec.js +205 -0
  642. package/dist/types/UnionType.spec.js.map +1 -0
  643. package/dist/types/VoidType.d.ts +11 -5
  644. package/dist/types/VoidType.js +22 -8
  645. package/dist/types/VoidType.js.map +1 -1
  646. package/dist/types/VoidType.spec.js +3 -3
  647. package/dist/types/VoidType.spec.js.map +1 -1
  648. package/dist/types/helper.spec.d.ts +1 -0
  649. package/dist/types/helper.spec.js +174 -0
  650. package/dist/types/helper.spec.js.map +1 -0
  651. package/dist/types/helpers.d.ts +51 -0
  652. package/dist/types/helpers.js +323 -0
  653. package/dist/types/helpers.js.map +1 -0
  654. package/dist/types/index.d.ts +22 -0
  655. package/dist/types/index.js +39 -0
  656. package/dist/types/index.js.map +1 -0
  657. package/dist/types/roFunctionType.d.ts +11 -0
  658. package/dist/types/roFunctionType.js +37 -0
  659. package/dist/types/roFunctionType.js.map +1 -0
  660. package/dist/types/roFunctionType.spec.d.ts +1 -0
  661. package/dist/types/roFunctionType.spec.js +20 -0
  662. package/dist/types/roFunctionType.spec.js.map +1 -0
  663. package/dist/util.d.ts +288 -187
  664. package/dist/util.js +2018 -575
  665. package/dist/util.js.map +1 -1
  666. package/dist/validators/ClassValidator.d.ts +9 -15
  667. package/dist/validators/ClassValidator.js +93 -138
  668. package/dist/validators/ClassValidator.js.map +1 -1
  669. package/package.json +185 -138
  670. package/CHANGELOG.md +0 -1188
  671. package/dist/astUtils/index.d.ts +0 -7
  672. package/dist/astUtils/index.js +0 -26
  673. package/dist/astUtils/index.js.map +0 -1
  674. package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.d.ts +0 -7
  675. package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.js +0 -63
  676. package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.js.map +0 -1
  677. package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.js +0 -45
  678. package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.js.map +0 -1
  679. package/dist/lexer/index.d.ts +0 -3
  680. package/dist/lexer/index.js +0 -17
  681. package/dist/lexer/index.js.map +0 -1
  682. package/dist/parser/SGTypes.spec.js +0 -351
  683. package/dist/parser/SGTypes.spec.js.map +0 -1
  684. package/dist/parser/index.d.ts +0 -3
  685. package/dist/parser/index.js +0 -16
  686. package/dist/parser/index.js.map +0 -1
  687. package/dist/preprocessor/Chunk.d.ts +0 -82
  688. package/dist/preprocessor/Chunk.js +0 -77
  689. package/dist/preprocessor/Chunk.js.map +0 -1
  690. package/dist/preprocessor/Preprocessor.d.ts +0 -60
  691. package/dist/preprocessor/Preprocessor.js +0 -156
  692. package/dist/preprocessor/Preprocessor.js.map +0 -1
  693. package/dist/preprocessor/Preprocessor.spec.js +0 -152
  694. package/dist/preprocessor/Preprocessor.spec.js.map +0 -1
  695. package/dist/preprocessor/PreprocessorParser.d.ts +0 -61
  696. package/dist/preprocessor/PreprocessorParser.js +0 -194
  697. package/dist/preprocessor/PreprocessorParser.js.map +0 -1
  698. package/dist/preprocessor/PreprocessorParser.spec.js +0 -116
  699. package/dist/preprocessor/PreprocessorParser.spec.js.map +0 -1
  700. package/dist/preprocessor/index.d.ts +0 -3
  701. package/dist/preprocessor/index.js +0 -16
  702. package/dist/preprocessor/index.js.map +0 -1
  703. package/dist/types/CustomType.d.ts +0 -10
  704. package/dist/types/CustomType.js +0 -35
  705. package/dist/types/CustomType.js.map +0 -1
  706. package/dist/types/FunctionType.spec.js +0 -29
  707. package/dist/types/FunctionType.spec.js.map +0 -1
  708. package/dist/types/LazyType.d.ts +0 -15
  709. package/dist/types/LazyType.js +0 -32
  710. package/dist/types/LazyType.js.map +0 -1
  711. /package/dist/{bscPlugin/semanticTokens/SemanticTokensProcessor.spec.d.ts → astUtils/CachedLookups.spec.d.ts} +0 -0
  712. /package/dist/{parser/SGTypes.spec.d.ts → astUtils/Editor.spec.d.ts} +0 -0
  713. /package/dist/{preprocessor/Preprocessor.spec.d.ts → bscPlugin/completions/CompletionsProcessor.spec.d.ts} +0 -0
  714. /package/dist/{preprocessor/PreprocessorParser.spec.d.ts → bscPlugin/definition/DefinitionProvider.spec.d.ts} +0 -0
  715. /package/dist/{types/FunctionType.spec.d.ts → bscPlugin/hover/HoverProcessor.spec.d.ts} +0 -0
@@ -0,0 +1,196 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PathCollection = exports.PathFilterer = void 0;
4
+ const micromatch = require("micromatch");
5
+ const path = require("path");
6
+ const logging_1 = require("../logging");
7
+ const util_1 = require("../util");
8
+ /**
9
+ * Manage collections of glob patterns used to filter paths.
10
+ *
11
+ * excludeLists are evaluated first to see if a path should be excluded. If the path is excluded, we then test it against the includeLists.
12
+ * If the path matches an includeList, it will be included. If not, it will remain excluded.
13
+ */
14
+ class PathFilterer {
15
+ constructor(options) {
16
+ var _a;
17
+ this.includeCollections = [];
18
+ this.excludeCollections = [];
19
+ this.logger = (_a = options === null || options === void 0 ? void 0 : options.logger) !== null && _a !== void 0 ? _a : (0, logging_1.createLogger)();
20
+ }
21
+ /**
22
+ * Filter the given list of entries based on the registered include and exclude lists.
23
+ * @param entries the list of paths (or objects having paths) to filter
24
+ * @param fetcher a function that can extract the path from the entry if it's not a string
25
+ * @returns the filtered list of entries
26
+ */
27
+ filter(entries, fetcher) {
28
+ var _a;
29
+ //if there are no exclude lists, then all files should be included
30
+ if (this.excludeCollections.length === 0) {
31
+ return entries;
32
+ }
33
+ let results = [];
34
+ //process each path
35
+ for (let entry of entries) {
36
+ let srcPath = (_a = fetcher === null || fetcher === void 0 ? void 0 : fetcher(entry)) !== null && _a !== void 0 ? _a : entry;
37
+ //if this path is excluded
38
+ if (this.isExclusionsMatch(srcPath)) {
39
+ //if this path is re-included, keep it
40
+ if (this.isInclusionsMatch(srcPath)) {
41
+ results.push(entry);
42
+ }
43
+ else {
44
+ //this path should be excluded
45
+ }
46
+ //this path is not excluded, so keep it
47
+ }
48
+ else {
49
+ results.push(entry);
50
+ }
51
+ }
52
+ return results;
53
+ }
54
+ /**
55
+ * Does the path match at least one of the exclusions lists
56
+ */
57
+ isExclusionsMatch(path) {
58
+ //does this path match an exclusion list?
59
+ for (const collection of this.excludeCollections) {
60
+ if (collection.isMatch(path)) {
61
+ return true;
62
+ }
63
+ }
64
+ return false;
65
+ }
66
+ /**
67
+ * Does the path match at least one of the inclusions lists
68
+ */
69
+ isInclusionsMatch(path) {
70
+ //does this path match an exclusion list?
71
+ for (const collection of this.includeCollections) {
72
+ if (collection.isMatch(path)) {
73
+ return true;
74
+ }
75
+ }
76
+ return false;
77
+ }
78
+ /**
79
+ * Register a list of inclusive globs that should be evaluated together
80
+ * These should be things like the `files` array from a bsconfig.json
81
+ */
82
+ registerIncludeList(rootDir, globs) {
83
+ this.logger.debug('registerIncludeList', { rootDir: rootDir, globs: globs });
84
+ let collection = new PathCollection({
85
+ rootDir: rootDir,
86
+ globs: globs
87
+ });
88
+ this.includeCollections.push(collection);
89
+ return () => {
90
+ this.removeCollection(collection);
91
+ };
92
+ }
93
+ /**
94
+ * Register glob patterns for files that should be _excluded_. positive patterns mean a file is excluded,
95
+ * and negative patterns mean a file that was previously matched (excluded) should be unmatched (included)
96
+ * These should be things like .gitignore or vscode's `files.exclude`.
97
+ *
98
+ * @example
99
+ * ```typescript
100
+ * [
101
+ * '.git',
102
+ * 'node_modules'
103
+ * '!node_modules/@rokucommunity/bslib'
104
+ * ]
105
+ * ```
106
+ * would exclude all files in the `.git` and `node_modules` directories, but would include the `node_modules/@rokucommunity/bslib` directory
107
+ */
108
+ registerExcludeList(rootDir, globs) {
109
+ this.logger.debug('registerExcludeList', { rootDir: rootDir, globs: globs });
110
+ let collection = new PathCollection({
111
+ rootDir: rootDir,
112
+ globs: globs
113
+ });
114
+ this.excludeCollections.push(collection);
115
+ return () => {
116
+ this.removeCollection(collection);
117
+ };
118
+ }
119
+ registerExcludeMatcher(matcher) {
120
+ this.logger.debug('registerExcludeMatcher', matcher);
121
+ const collection = new PathCollection({
122
+ matcher: matcher,
123
+ isExcludePattern: false
124
+ });
125
+ this.excludeCollections.push(collection);
126
+ return () => {
127
+ this.removeCollection(collection);
128
+ };
129
+ }
130
+ removeCollection(collection) {
131
+ let idx = this.includeCollections.indexOf(collection);
132
+ if (idx > -1) {
133
+ this.includeCollections.splice(idx, 1);
134
+ }
135
+ idx = this.excludeCollections.indexOf(collection);
136
+ if (idx > -1) {
137
+ this.excludeCollections.splice(idx, 1);
138
+ }
139
+ }
140
+ /**
141
+ * Remove all registered collections
142
+ */
143
+ clear() {
144
+ this.includeCollections = [];
145
+ this.excludeCollections = [];
146
+ }
147
+ }
148
+ exports.PathFilterer = PathFilterer;
149
+ class PathCollection {
150
+ constructor(options) {
151
+ var _a;
152
+ this.options = options;
153
+ this.matchers = [];
154
+ if ('globs' in options) {
155
+ //build matcher patterns from the globs
156
+ for (let glob of (_a = options.globs) !== null && _a !== void 0 ? _a : []) {
157
+ let isExcludePattern = glob.startsWith('!');
158
+ if (isExcludePattern) {
159
+ glob = glob.substring(1);
160
+ }
161
+ const pattern = path.resolve(options.rootDir, glob).replace(/\\+/g, '/');
162
+ this.matchers.push({
163
+ pattern: pattern,
164
+ isMatch: micromatch.matcher(pattern),
165
+ isExcludePattern: isExcludePattern
166
+ });
167
+ }
168
+ }
169
+ else {
170
+ this.matchers.push({
171
+ isMatch: options.matcher,
172
+ isExcludePattern: options.isExcludePattern
173
+ });
174
+ }
175
+ }
176
+ isMatch(path) {
177
+ let keep = false;
178
+ //coerce the path into a normalized form and unix slashes
179
+ path = util_1.default.standardizePath(path).replace(/\\+/g, '/');
180
+ for (let matcher of this.matchers) {
181
+ //exclusion pattern: do not keep the path if it matches
182
+ if (matcher.isExcludePattern) {
183
+ if (matcher.isMatch(path)) {
184
+ keep = false;
185
+ }
186
+ //inclusion pattern: keep the path if it matches
187
+ }
188
+ else {
189
+ keep = keep || matcher.isMatch(path);
190
+ }
191
+ }
192
+ return keep;
193
+ }
194
+ }
195
+ exports.PathCollection = PathCollection;
196
+ //# sourceMappingURL=PathFilterer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PathFilterer.js","sourceRoot":"","sources":["../../src/lsp/PathFilterer.ts"],"names":[],"mappings":";;;AAAA,yCAAyC;AACzC,6BAA6B;AAE7B,wCAA0C;AAC1C,kCAA2B;AAE3B;;;;;GAKG;AACH,MAAa,YAAY;IACrB,YACI,OAEC;;QAOG,uBAAkB,GAAqB,EAAE,CAAC;QAE1C,uBAAkB,GAAqB,EAAE,CAAC;QAP9C,IAAI,CAAC,MAAM,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,mCAAI,IAAA,sBAAY,GAAE,CAAC;IACpD,CAAC;IAQD;;;;;OAKG;IACI,MAAM,CAAa,OAAY,EAAE,OAA6B;;QACjE,kEAAkE;QAClE,IAAI,IAAI,CAAC,kBAAkB,CAAC,MAAM,KAAK,CAAC,EAAE;YACtC,OAAO,OAAO,CAAC;SAClB;QAED,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AAO,CAAC,gBAAgB;aAC7C,CAAC,CAAC;SACN;IACL,CAAC;IAQM,OAAO,CAAC,IAAY;QACvB,IAAI,IAAI,GAAG,KAAK,CAAC;QACjB,yDAAyD;QACzD,IAAI,GAAG,cAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACvD,KAAK,IAAI,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;YAC/B,uDAAuD;YACvD,IAAI,OAAO,CAAC,gBAAgB,EAAE;gBAC1B,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;oBACvB,IAAI,GAAG,KAAK,CAAC;iBAChB;gBACD,gDAAgD;aACnD;iBAAM;gBACH,IAAI,GAAG,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;aACxC;SACJ;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AA1DD,wCA0DC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,182 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const PathFilterer_1 = require("./PathFilterer");
4
+ const testHelpers_spec_1 = require("../testHelpers.spec");
5
+ const chai_1 = require("chai");
6
+ const util_1 = require("../util");
7
+ const sinon_1 = require("sinon");
8
+ const sinon = (0, sinon_1.createSandbox)();
9
+ describe('PathFilterer', () => {
10
+ let filterer;
11
+ beforeEach(() => {
12
+ filterer = new PathFilterer_1.PathFilterer();
13
+ sinon.restore();
14
+ });
15
+ afterEach(() => {
16
+ sinon.restore();
17
+ });
18
+ it('allows all files through when no filters exist', () => {
19
+ (0, chai_1.expect)(filterer.filter([
20
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/a.brs`,
21
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/a/b/c/d.xml`,
22
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/e.txt`
23
+ ])).to.eql([
24
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/a.brs`,
25
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/a/b/c/d.xml`,
26
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/e.txt`
27
+ ]);
28
+ });
29
+ it('supports standalone workspace style', () => {
30
+ const filterer = new PathFilterer_1.PathCollection({
31
+ rootDir: (0, util_1.standardizePath) `${testHelpers_spec_1.cwd}/src/lsp/standalone-project-1`,
32
+ globs: [(0, util_1.standardizePath) `${testHelpers_spec_1.cwd}/.tmp/rootDir/source/main.bs`]
33
+ });
34
+ (0, chai_1.expect)(filterer.isMatch(`${testHelpers_spec_1.cwd}/.tmp/rootDir/source/main.bs`)).to.be.true;
35
+ });
36
+ it('filters files', () => {
37
+ filterer.registerExcludeList(testHelpers_spec_1.rootDir, ['**/*.brs']);
38
+ (0, chai_1.expect)(filterer.filter([
39
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/a.brs`,
40
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/b.txt`,
41
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/c.brs`
42
+ ])).to.eql([
43
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/b.txt`
44
+ ]);
45
+ });
46
+ it('filters files but re-includes them if part of an include list', () => {
47
+ filterer.registerExcludeList(testHelpers_spec_1.rootDir, ['**/*.brs']);
48
+ filterer.registerIncludeList(testHelpers_spec_1.rootDir, ['**/a*.brs']);
49
+ (0, chai_1.expect)(filterer.filter([
50
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/a.brs`,
51
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/b.txt`,
52
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/c.brs`
53
+ ])).to.eql([
54
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/a.brs`,
55
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/b.txt`
56
+ ]);
57
+ });
58
+ it('supports removing lists', () => {
59
+ const removeExclude = filterer.registerExcludeList(testHelpers_spec_1.rootDir, ['**/*.brs']);
60
+ const removeInclude = filterer.registerIncludeList(testHelpers_spec_1.rootDir, ['**/a*.brs']);
61
+ (0, chai_1.expect)(filterer.filter([
62
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/a.brs`,
63
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/b.txt`,
64
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/c.brs`
65
+ ])).to.eql([
66
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/a.brs`,
67
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/b.txt`
68
+ ]);
69
+ removeInclude();
70
+ (0, chai_1.expect)(filterer.filter([
71
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/a.brs`,
72
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/b.txt`,
73
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/c.brs`
74
+ ])).to.eql([
75
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/b.txt`
76
+ ]);
77
+ removeExclude();
78
+ (0, chai_1.expect)(filterer.filter([
79
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/a.brs`,
80
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/b.txt`,
81
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/c.brs`
82
+ ])).to.eql([
83
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/a.brs`,
84
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/b.txt`,
85
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/c.brs`
86
+ ]);
87
+ });
88
+ it('clear removes all exclude and include lists', () => {
89
+ filterer.registerExcludeList(testHelpers_spec_1.rootDir, ['**/components/**/*.brs']);
90
+ (0, chai_1.expect)(filterer.filter([
91
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/components/a.brs`,
92
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/components/b.brs`,
93
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/components/c.brs`
94
+ ])).to.eql([]);
95
+ filterer.clear();
96
+ (0, chai_1.expect)(filterer.filter([
97
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/components/a.brs`,
98
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/components/b.brs`,
99
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/components/c.brs`
100
+ ])).to.eql([
101
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/components/a.brs`,
102
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/components/b.brs`,
103
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/components/c.brs`
104
+ ]);
105
+ });
106
+ it('works with null exclude list', () => {
107
+ filterer.registerExcludeList(testHelpers_spec_1.rootDir, null);
108
+ (0, chai_1.expect)(filterer.filter([
109
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/components/a.brs`,
110
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/components/b.brs`,
111
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/components/c.brs`
112
+ ])).to.eql([
113
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/components/a.brs`,
114
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/components/b.brs`,
115
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/components/c.brs`
116
+ ]);
117
+ });
118
+ it('works with null include list', () => {
119
+ filterer.registerExcludeList(testHelpers_spec_1.rootDir, ['**/*']);
120
+ filterer.registerIncludeList(testHelpers_spec_1.rootDir, null);
121
+ (0, chai_1.expect)(filterer.filter([
122
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/components/a.brs`,
123
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/components/b.brs`,
124
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/components/c.brs`
125
+ ])).to.eql([]);
126
+ });
127
+ describe('registerExcludeMatcher', () => {
128
+ it('calls the callback function on every path', () => {
129
+ const spy = sinon.spy();
130
+ filterer.registerExcludeMatcher(spy);
131
+ filterer.filter([
132
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/a.brs`,
133
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/b.txt`,
134
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/c.brs`
135
+ ]);
136
+ (0, chai_1.expect)(spy.getCalls().map(x => (0, util_1.standardizePath) `${x.args[0]}`)).to.eql([
137
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/a.brs`,
138
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/b.txt`,
139
+ (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/c.brs`
140
+ ]);
141
+ });
142
+ });
143
+ });
144
+ describe('PathCollection', () => {
145
+ function doTest(globs, filePath, expected) {
146
+ const collection = new PathFilterer_1.PathCollection({
147
+ rootDir: testHelpers_spec_1.rootDir,
148
+ globs: globs
149
+ });
150
+ (0, chai_1.expect)(collection.isMatch(filePath)).to.equal(expected);
151
+ }
152
+ it('includes a file that matches a single pattern', () => {
153
+ doTest([
154
+ '**/*.brs'
155
+ ], (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/alpha.brs`, true);
156
+ });
157
+ it('includes a file that matches the 2nd pattern', () => {
158
+ doTest([
159
+ '**/*beta*.brs',
160
+ '**/*alpha*.brs'
161
+ ], (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/alpha.brs`, true);
162
+ });
163
+ it('includes a file that is included then excluded then included again', () => {
164
+ doTest([
165
+ '**/*.brs',
166
+ '!**/a*.brs',
167
+ '**/alpha.brs'
168
+ ], (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/alpha.brs`, true);
169
+ });
170
+ it('excludes a file that does not match the pattern', () => {
171
+ doTest([
172
+ '**/beta.brs'
173
+ ], (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/alpha.brs`, false);
174
+ });
175
+ it('excludes a file that matches first pattern but is excluded from the second pattern', () => {
176
+ doTest([
177
+ '**/*.brs',
178
+ '!**/alpha.brs'
179
+ ], (0, util_1.standardizePath) `${testHelpers_spec_1.rootDir}/alpha.brs`, false);
180
+ });
181
+ });
182
+ //# sourceMappingURL=PathFilterer.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PathFilterer.spec.js","sourceRoot":"","sources":["../../src/lsp/PathFilterer.spec.ts"],"names":[],"mappings":";;AAAA,iDAA8D;AAC9D,0DAAmD;AACnD,+BAA8B;AAC9B,kCAA+C;AAC/C,iCAAsC;AACtC,MAAM,KAAK,GAAG,IAAA,qBAAa,GAAE,CAAC;AAE9B,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC1B,IAAI,QAAsB,CAAC;IAE3B,UAAU,CAAC,GAAG,EAAE;QACZ,QAAQ,GAAG,IAAI,2BAAY,EAAE,CAAC;QAC9B,KAAK,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IACH,SAAS,CAAC,GAAG,EAAE;QACX,KAAK,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;QACtD,IAAA,aAAM,EACF,QAAQ,CAAC,MAAM,CAAC;YACZ,IAAA,sBAAC,EAAA,GAAG,0BAAO,QAAQ;YACnB,IAAA,sBAAC,EAAA,GAAG,0BAAO,cAAc;YACzB,IAAA,sBAAC,EAAA,GAAG,0BAAO,QAAQ;SACtB,CAAC,CACL,CAAC,EAAE,CAAC,GAAG,CAAC;YACL,IAAA,sBAAC,EAAA,GAAG,0BAAO,QAAQ;YACnB,IAAA,sBAAC,EAAA,GAAG,0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CAAC;IAEH,EAAE,CAAC,oEAAoE,EAAE,GAAG,EAAE;QAC1E,MAAM,CAAC;YACH,UAAU;YACV,YAAY;YACZ,cAAc;SACjB,EAAE,IAAA,sBAAC,EAAA,GAAG,0BAAO,YAAY,EAAE,IAAI,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACvD,MAAM,CAAC;YACH,aAAa;SAChB,EAAE,IAAA,sBAAC,EAAA,GAAG,0BAAO,YAAY,EAAE,KAAK,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oFAAoF,EAAE,GAAG,EAAE;QAC1F,MAAM,CAAC;YACH,UAAU;YACV,eAAe;SAClB,EAAE,IAAA,sBAAC,EAAA,GAAG,0BAAO,YAAY,EAAE,KAAK,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -0,0 +1,168 @@
1
+ import type { ProjectConfig, ActivateResponse, LspDiagnostic, LspProject } from './LspProject';
2
+ import type { Hover, MaybePromise } from '../interfaces';
3
+ import type { DocumentSymbol, Position, Range, Location, WorkspaceSymbol } from 'vscode-languageserver-protocol';
4
+ import { CompletionList } from 'vscode-languageserver-protocol';
5
+ import type { DocumentAction, DocumentActionWithStatus } from './DocumentManager';
6
+ import type { SignatureInfoObj } from '../Program';
7
+ import type { BsConfig } from '../BsConfig';
8
+ import type { Logger } from '../logging';
9
+ export declare class Project implements LspProject {
10
+ constructor(options?: {
11
+ logger?: Logger;
12
+ });
13
+ /**
14
+ * Activates this project. Every call to `activate` should completely reset the project, clear all used ram and start from scratch.
15
+ */
16
+ activate(options: ProjectConfig): Promise<ActivateResponse>;
17
+ isStandaloneProject: boolean;
18
+ logger: Logger;
19
+ /**
20
+ * Options used to activate this project
21
+ */
22
+ activateOptions: ProjectConfig;
23
+ get rootDir(): string;
24
+ /**
25
+ * The file patterns from bsconfig.json that were used to find all files for this project
26
+ */
27
+ get filePatterns(): string[];
28
+ /**
29
+ * Gets resolved when the project has finished activating
30
+ */
31
+ private activationDeferred;
32
+ /**
33
+ * Promise that resolves when the project finishes activating
34
+ * @returns a promise that resolves when the project finishes activating
35
+ */
36
+ whenActivated(): Promise<void>;
37
+ private validationCancelToken;
38
+ /**
39
+ * Validate the project. This will trigger a full validation on any scopes that were changed since the last validation,
40
+ * and will also eventually emit a new 'diagnostics' event that includes all diagnostics for the project.
41
+ *
42
+ * This will cancel any currently running validation and then run a new one.
43
+ */
44
+ validate(): Promise<void>;
45
+ /**
46
+ * Cancel any active running validation
47
+ */
48
+ cancelValidate(): void;
49
+ getDiagnostics(): LspDiagnostic[];
50
+ /**
51
+ * Promise that resolves the next time the system is idle. If the system is already idle, it will resolve immediately
52
+ */
53
+ private onIdle;
54
+ /**
55
+ * Add or replace the in-memory contents of the file at the specified path. This is typically called as the user is typing.
56
+ * This will cancel any pending validation cycles and queue a future validation cycle instead.
57
+ */
58
+ applyFileChanges(documentActions: DocumentAction[]): Promise<DocumentActionWithStatus[]>;
59
+ /**
60
+ * Determine if this project will accept the file at the specified path (i.e. does it match a pattern in the project's files array)
61
+ */
62
+ static willAcceptFile(srcPath: string, files: BsConfig['files'], rootDir: string): boolean;
63
+ /**
64
+ * Set new contents for a file. This is safe to call any time. Changes will be queued and flushed at the correct times
65
+ * during the program's lifecycle flow
66
+ * @param srcPath absolute source path of the file
67
+ * @param fileContents the text contents of the file
68
+ * @returns true if this program accepted and added the file. false if the program didn't want the file, or if the contents didn't change
69
+ */
70
+ private setFile;
71
+ /**
72
+ * Remove the in-memory file at the specified path. This is typically called when the user (or file system watcher) triggers a file delete
73
+ * @param srcPath absolute path to the File
74
+ * @returns true if we found and removed at least one file, or false if no files were removed
75
+ */
76
+ private removeFileOrDirectory;
77
+ /**
78
+ * Get the full list of semantic tokens for the given file path
79
+ * @param options options for getting semantic tokens
80
+ * @param options.srcPath absolute path to the source file
81
+ */
82
+ getSemanticTokens(options: {
83
+ srcPath: string;
84
+ }): Promise<import("../interfaces").SemanticToken[]>;
85
+ transpileFile(options: {
86
+ srcPath: string;
87
+ }): Promise<import("../Program").FileTranspileResult>;
88
+ getHover(options: {
89
+ srcPath: string;
90
+ position: Position;
91
+ }): Promise<Hover[]>;
92
+ getDefinition(options: {
93
+ srcPath: string;
94
+ position: Position;
95
+ }): Promise<Location[]>;
96
+ getSignatureHelp(options: {
97
+ srcPath: string;
98
+ position: Position;
99
+ }): Promise<SignatureInfoObj[]>;
100
+ getDocumentSymbol(options: {
101
+ srcPath: string;
102
+ }): Promise<DocumentSymbol[]>;
103
+ getWorkspaceSymbol(): Promise<WorkspaceSymbol[]>;
104
+ getReferences(options: {
105
+ srcPath: string;
106
+ position: Position;
107
+ }): Promise<Location[]>;
108
+ getCodeActions(options: {
109
+ srcPath: string;
110
+ range: Range;
111
+ }): Promise<import("vscode-languageserver-types").CodeAction[]>;
112
+ getCompletions(options: {
113
+ srcPath: string;
114
+ position: Position;
115
+ }): Promise<CompletionList>;
116
+ /**
117
+ * Manages the BrighterScript program. The main interface into the compiler/validator
118
+ */
119
+ private builder;
120
+ /**
121
+ * A unique key to represent this project. The format of this key may change, but it will always be unique to this project and can be used for comparison purposes.
122
+ *
123
+ * For directory-only projects, this is the path to the dir. For bsconfig.json projects, this is the path to the config file (typically bsconfig.json).
124
+ */
125
+ projectKey: string;
126
+ /**
127
+ * The directory for the root of this project (typically where the bsconfig.json or manifest is located)
128
+ */
129
+ projectDir: string;
130
+ /**
131
+ * A unique number for this project, generated during this current language server session. Mostly used so we can identify which project is doing logging
132
+ */
133
+ projectNumber: number;
134
+ /**
135
+ * The path to the workspace where this project resides. A workspace can have multiple projects (by adding a bsconfig.json to each folder).
136
+ * Defaults to `.projectPath` if not set
137
+ */
138
+ workspaceFolder: string;
139
+ /**
140
+ * Path to a bsconfig.json file that will be used for this project
141
+ */
142
+ bsconfigPath?: string;
143
+ /**
144
+ * The contents of the bsconfig.json file. This is used to detect when the bsconfig file has not actually been changed (even if the fs says it did).
145
+ *
146
+ * Only available after `.activate()` has completed.
147
+ * @deprecated do not depend on this property. This will certainly be removed in a future release
148
+ */
149
+ bsconfigFileContents?: string;
150
+ /**
151
+ * Find the path to the bsconfig.json file for this project
152
+ * @returns path to bsconfig.json, or undefined if unable to find it
153
+ */
154
+ private getConfigFilePath;
155
+ on(eventName: 'validate-begin', handler: (data: any) => MaybePromise<void>): any;
156
+ on(eventName: 'validate-end', handler: (data: any) => MaybePromise<void>): any;
157
+ on(eventName: 'critical-failure', handler: (data: {
158
+ message: string;
159
+ }) => MaybePromise<void>): any;
160
+ on(eventName: 'diagnostics', handler: (data: {
161
+ diagnostics: LspDiagnostic[];
162
+ }) => MaybePromise<void>): any;
163
+ on(eventName: 'all', handler: (eventName: string, data: any) => MaybePromise<void>): any;
164
+ private emit;
165
+ private emitter;
166
+ disposables: LspProject['disposables'];
167
+ dispose(): void;
168
+ }