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.
- package/README.md +76 -138
- package/bsconfig.schema.json +121 -5
- package/dist/ActionPipeline.d.ts +10 -0
- package/dist/ActionPipeline.js +40 -0
- package/dist/ActionPipeline.js.map +1 -0
- package/dist/AstValidationSegmenter.d.ts +45 -0
- package/dist/AstValidationSegmenter.js +322 -0
- package/dist/AstValidationSegmenter.js.map +1 -0
- package/dist/BsConfig.d.ts +72 -39
- package/dist/BusyStatusTracker.d.ts +61 -0
- package/dist/BusyStatusTracker.js +148 -0
- package/dist/BusyStatusTracker.js.map +1 -0
- package/dist/Cache.d.ts +3 -8
- package/dist/Cache.js +9 -14
- package/dist/Cache.js.map +1 -1
- package/dist/CacheVerifier.d.ts +7 -0
- package/dist/CacheVerifier.js +20 -0
- package/dist/CacheVerifier.js.map +1 -0
- package/dist/CodeActionUtil.d.ts +12 -4
- package/dist/CodeActionUtil.js +22 -5
- package/dist/CodeActionUtil.js.map +1 -1
- package/dist/CommentFlagProcessor.d.ts +7 -6
- package/dist/CommentFlagProcessor.js +11 -8
- package/dist/CommentFlagProcessor.js.map +1 -1
- package/dist/CrossScopeValidator.d.ts +68 -0
- package/dist/CrossScopeValidator.js +642 -0
- package/dist/CrossScopeValidator.js.map +1 -0
- package/dist/DependencyGraph.d.ts +8 -3
- package/dist/DependencyGraph.js +49 -16
- package/dist/DependencyGraph.js.map +1 -1
- package/dist/DiagnosticCollection.d.ts +21 -5
- package/dist/DiagnosticCollection.js +77 -24
- package/dist/DiagnosticCollection.js.map +1 -1
- package/dist/DiagnosticFilterer.d.ts +27 -6
- package/dist/DiagnosticFilterer.js +273 -60
- package/dist/DiagnosticFilterer.js.map +1 -1
- package/dist/DiagnosticManager.d.ts +82 -0
- package/dist/DiagnosticManager.js +406 -0
- package/dist/DiagnosticManager.js.map +1 -0
- package/dist/DiagnosticMessages.d.ts +558 -196
- package/dist/DiagnosticMessages.js +870 -340
- package/dist/DiagnosticMessages.js.map +1 -1
- package/dist/DiagnosticSeverityAdjuster.d.ts +7 -0
- package/dist/DiagnosticSeverityAdjuster.js +45 -0
- package/dist/DiagnosticSeverityAdjuster.js.map +1 -0
- package/dist/FunctionScope.d.ts +28 -0
- package/dist/FunctionScope.js +52 -0
- package/dist/FunctionScope.js.map +1 -0
- package/dist/KeyedThrottler.d.ts +3 -3
- package/dist/KeyedThrottler.js +3 -3
- package/dist/KeyedThrottler.js.map +1 -1
- package/dist/LanguageServer.d.ts +100 -105
- package/dist/LanguageServer.js +444 -745
- package/dist/LanguageServer.js.map +1 -1
- package/dist/Logger.d.ts +17 -13
- package/dist/Logger.js +64 -34
- package/dist/Logger.js.map +1 -1
- package/dist/PluginInterface.d.ts +32 -10
- package/dist/PluginInterface.js +117 -7
- package/dist/PluginInterface.js.map +1 -1
- package/dist/Program.d.ts +241 -98
- package/dist/Program.js +1432 -717
- package/dist/Program.js.map +1 -1
- package/dist/ProgramBuilder.d.ts +47 -23
- package/dist/ProgramBuilder.js +224 -178
- package/dist/ProgramBuilder.js.map +1 -1
- package/dist/Scope.d.ts +149 -109
- package/dist/Scope.js +557 -550
- package/dist/Scope.js.map +1 -1
- package/dist/SemanticTokenUtils.js +5 -1
- package/dist/SemanticTokenUtils.js.map +1 -1
- package/dist/Stopwatch.d.ts +4 -0
- package/dist/Stopwatch.js +8 -1
- package/dist/Stopwatch.js.map +1 -1
- package/dist/SymbolTable.d.ts +136 -24
- package/dist/SymbolTable.js +565 -64
- package/dist/SymbolTable.js.map +1 -1
- package/dist/SymbolTypeFlag.d.ts +9 -0
- package/dist/SymbolTypeFlag.js +14 -0
- package/dist/SymbolTypeFlag.js.map +1 -0
- package/dist/Throttler.d.ts +12 -0
- package/dist/Throttler.js +39 -0
- package/dist/Throttler.js.map +1 -1
- package/dist/Watcher.d.ts +0 -3
- package/dist/Watcher.js +0 -3
- package/dist/Watcher.js.map +1 -1
- package/dist/XmlScope.d.ts +5 -15
- package/dist/XmlScope.js +34 -90
- package/dist/XmlScope.js.map +1 -1
- package/dist/astUtils/CachedLookups.d.ts +50 -0
- package/dist/astUtils/CachedLookups.js +334 -0
- package/dist/astUtils/CachedLookups.js.map +1 -0
- package/dist/astUtils/CachedLookups.spec.js +39 -0
- package/dist/astUtils/CachedLookups.spec.js.map +1 -0
- package/dist/astUtils/Editor.d.ts +69 -0
- package/dist/astUtils/Editor.js +245 -0
- package/dist/astUtils/Editor.js.map +1 -0
- package/dist/astUtils/Editor.spec.js +258 -0
- package/dist/astUtils/Editor.spec.js.map +1 -0
- package/dist/astUtils/creators.d.ts +54 -19
- package/dist/astUtils/creators.js +242 -42
- package/dist/astUtils/creators.js.map +1 -1
- package/dist/astUtils/creators.spec.js +5 -5
- package/dist/astUtils/creators.spec.js.map +1 -1
- package/dist/astUtils/reflection.d.ts +196 -85
- package/dist/astUtils/reflection.js +497 -144
- package/dist/astUtils/reflection.js.map +1 -1
- package/dist/astUtils/reflection.spec.js +267 -167
- package/dist/astUtils/reflection.spec.js.map +1 -1
- package/dist/astUtils/stackedVisitor.js.map +1 -1
- package/dist/astUtils/stackedVisitor.spec.js +14 -14
- package/dist/astUtils/stackedVisitor.spec.js.map +1 -1
- package/dist/astUtils/visitors.d.ts +116 -53
- package/dist/astUtils/visitors.js +95 -15
- package/dist/astUtils/visitors.js.map +1 -1
- package/dist/astUtils/visitors.spec.js +629 -51
- package/dist/astUtils/visitors.spec.js.map +1 -1
- package/dist/astUtils/xml.d.ts +9 -8
- package/dist/astUtils/xml.js +12 -7
- package/dist/astUtils/xml.js.map +1 -1
- package/dist/bscPlugin/BscPlugin.d.ts +24 -4
- package/dist/bscPlugin/BscPlugin.js +88 -4
- package/dist/bscPlugin/BscPlugin.js.map +1 -1
- package/dist/bscPlugin/CallExpressionInfo.d.ts +36 -0
- package/dist/bscPlugin/CallExpressionInfo.js +143 -0
- package/dist/bscPlugin/CallExpressionInfo.js.map +1 -0
- package/dist/bscPlugin/FileWriter.d.ts +6 -0
- package/dist/bscPlugin/FileWriter.js +24 -0
- package/dist/bscPlugin/FileWriter.js.map +1 -0
- package/dist/bscPlugin/SignatureHelpUtil.d.ts +10 -0
- package/dist/bscPlugin/SignatureHelpUtil.js +137 -0
- package/dist/bscPlugin/SignatureHelpUtil.js.map +1 -0
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.d.ts +6 -5
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js +173 -27
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js.map +1 -1
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js +138 -21
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js.map +1 -1
- package/dist/bscPlugin/completions/CompletionsProcessor.d.ts +65 -0
- package/dist/bscPlugin/completions/CompletionsProcessor.js +633 -0
- package/dist/bscPlugin/completions/CompletionsProcessor.js.map +1 -0
- package/dist/bscPlugin/completions/CompletionsProcessor.spec.js +2512 -0
- package/dist/bscPlugin/completions/CompletionsProcessor.spec.js.map +1 -0
- package/dist/bscPlugin/definition/DefinitionProvider.d.ts +13 -0
- package/dist/bscPlugin/definition/DefinitionProvider.js +212 -0
- package/dist/bscPlugin/definition/DefinitionProvider.js.map +1 -0
- package/dist/bscPlugin/definition/DefinitionProvider.spec.js +87 -0
- package/dist/bscPlugin/definition/DefinitionProvider.spec.js.map +1 -0
- package/dist/bscPlugin/fileProviders/FileProvider.d.ts +9 -0
- package/dist/bscPlugin/fileProviders/FileProvider.js +51 -0
- package/dist/bscPlugin/fileProviders/FileProvider.js.map +1 -0
- package/dist/bscPlugin/hover/HoverProcessor.d.ts +18 -0
- package/dist/bscPlugin/hover/HoverProcessor.js +230 -0
- package/dist/bscPlugin/hover/HoverProcessor.js.map +1 -0
- package/dist/bscPlugin/hover/HoverProcessor.spec.js +991 -0
- package/dist/bscPlugin/hover/HoverProcessor.spec.js.map +1 -0
- package/dist/bscPlugin/references/ReferencesProvider.d.ts +12 -0
- package/dist/bscPlugin/references/ReferencesProvider.js +57 -0
- package/dist/bscPlugin/references/ReferencesProvider.js.map +1 -0
- package/dist/bscPlugin/references/ReferencesProvider.spec.d.ts +1 -0
- package/dist/bscPlugin/references/ReferencesProvider.spec.js +51 -0
- package/dist/bscPlugin/references/ReferencesProvider.spec.js.map +1 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.d.ts +14 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js +164 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js.map +1 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.d.ts +1 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js +564 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js.map +1 -0
- package/dist/bscPlugin/serialize/BslibInjector.spec.d.ts +1 -0
- package/dist/bscPlugin/serialize/BslibInjector.spec.js +33 -0
- package/dist/bscPlugin/serialize/BslibInjector.spec.js.map +1 -0
- package/dist/bscPlugin/serialize/BslibManager.d.ts +12 -0
- package/dist/bscPlugin/serialize/BslibManager.js +46 -0
- package/dist/bscPlugin/serialize/BslibManager.js.map +1 -0
- package/dist/bscPlugin/serialize/FileSerializer.d.ts +9 -0
- package/dist/bscPlugin/serialize/FileSerializer.js +75 -0
- package/dist/bscPlugin/serialize/FileSerializer.js.map +1 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.d.ts +7 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.js +22 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.js.map +1 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.spec.d.ts +1 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.spec.js +291 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.spec.js.map +1 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.d.ts +7 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.js +26 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.js.map +1 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.spec.d.ts +1 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.spec.js +245 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.spec.js.map +1 -0
- package/dist/bscPlugin/symbols/symbolUtils.d.ts +5 -0
- package/dist/bscPlugin/symbols/symbolUtils.js +141 -0
- package/dist/bscPlugin/symbols/symbolUtils.js.map +1 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.d.ts +27 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js +418 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js.map +1 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.d.ts +1 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.js +75 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.js.map +1 -0
- package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.d.ts +12 -0
- package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js +99 -0
- package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js.map +1 -0
- package/dist/bscPlugin/validation/BrsFileAfterValidator.d.ts +7 -0
- package/dist/bscPlugin/validation/BrsFileAfterValidator.js +18 -0
- package/dist/bscPlugin/validation/BrsFileAfterValidator.js.map +1 -0
- package/dist/bscPlugin/validation/BrsFileValidator.d.ts +37 -0
- package/dist/bscPlugin/validation/BrsFileValidator.js +638 -0
- package/dist/bscPlugin/validation/BrsFileValidator.js.map +1 -0
- package/dist/bscPlugin/validation/BrsFileValidator.spec.d.ts +1 -0
- package/dist/bscPlugin/validation/BrsFileValidator.spec.js +1517 -0
- package/dist/bscPlugin/validation/BrsFileValidator.spec.js.map +1 -0
- package/dist/bscPlugin/validation/ProgramValidator.d.ts +11 -0
- package/dist/bscPlugin/validation/ProgramValidator.js +33 -0
- package/dist/bscPlugin/validation/ProgramValidator.js.map +1 -0
- package/dist/bscPlugin/validation/ScopeValidator.d.ts +141 -0
- package/dist/bscPlugin/validation/ScopeValidator.js +1323 -0
- package/dist/bscPlugin/validation/ScopeValidator.js.map +1 -0
- package/dist/bscPlugin/validation/ScopeValidator.spec.d.ts +1 -0
- package/dist/bscPlugin/validation/ScopeValidator.spec.js +6135 -0
- package/dist/bscPlugin/validation/ScopeValidator.spec.js.map +1 -0
- package/dist/bscPlugin/validation/XmlFileValidator.d.ts +8 -0
- package/dist/bscPlugin/validation/XmlFileValidator.js +36 -0
- package/dist/bscPlugin/validation/XmlFileValidator.js.map +1 -0
- package/dist/cli.js +126 -27
- package/dist/cli.js.map +1 -1
- package/dist/common/Sequencer.d.ts +53 -0
- package/dist/common/Sequencer.js +233 -0
- package/dist/common/Sequencer.js.map +1 -0
- package/dist/common/Sequencer.spec.d.ts +1 -0
- package/dist/common/Sequencer.spec.js +75 -0
- package/dist/common/Sequencer.spec.js.map +1 -0
- package/dist/deferred.d.ts +5 -3
- package/dist/deferred.js +10 -0
- package/dist/deferred.js.map +1 -1
- package/dist/diagnosticUtils.d.ts +10 -3
- package/dist/diagnosticUtils.js +64 -25
- package/dist/diagnosticUtils.js.map +1 -1
- package/dist/examples/plugins/removePrint.d.ts +2 -2
- package/dist/examples/plugins/removePrint.js +8 -12
- package/dist/examples/plugins/removePrint.js.map +1 -1
- package/dist/files/AssetFile.d.ts +24 -0
- package/dist/files/AssetFile.js +25 -0
- package/dist/files/AssetFile.js.map +1 -0
- package/dist/files/BrsFile.Class.spec.js +1213 -259
- package/dist/files/BrsFile.Class.spec.js.map +1 -1
- package/dist/files/BrsFile.d.ts +145 -87
- package/dist/files/BrsFile.js +836 -934
- package/dist/files/BrsFile.js.map +1 -1
- package/dist/files/BrsFile.spec.js +4226 -902
- package/dist/files/BrsFile.spec.js.map +1 -1
- package/dist/files/BscFile.d.ts +102 -0
- package/dist/files/BscFile.js +15 -0
- package/dist/files/BscFile.js.map +1 -0
- package/dist/files/Factory.d.ts +25 -0
- package/dist/files/Factory.js +22 -0
- package/dist/files/Factory.js.map +1 -0
- package/dist/files/LazyFileData.d.ts +21 -0
- package/dist/files/LazyFileData.js +54 -0
- package/dist/files/LazyFileData.js.map +1 -0
- package/dist/files/LazyFileData.spec.d.ts +1 -0
- package/dist/files/LazyFileData.spec.js +27 -0
- package/dist/files/LazyFileData.spec.js.map +1 -0
- package/dist/files/XmlFile.d.ts +80 -41
- package/dist/files/XmlFile.js +161 -137
- package/dist/files/XmlFile.js.map +1 -1
- package/dist/files/XmlFile.spec.js +444 -336
- package/dist/files/XmlFile.spec.js.map +1 -1
- package/dist/files/tests/imports.spec.js +62 -52
- package/dist/files/tests/imports.spec.js.map +1 -1
- package/dist/files/tests/optionalChaning.spec.d.ts +1 -0
- package/dist/files/tests/optionalChaning.spec.js +152 -0
- package/dist/files/tests/optionalChaning.spec.js.map +1 -0
- package/dist/globalCallables.d.ts +3 -1
- package/dist/globalCallables.js +424 -184
- package/dist/globalCallables.js.map +1 -1
- package/dist/index.d.ts +32 -4
- package/dist/index.js +54 -7
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +942 -125
- package/dist/interfaces.js +21 -0
- package/dist/interfaces.js.map +1 -1
- package/dist/lexer/Character.spec.js +5 -5
- package/dist/lexer/Character.spec.js.map +1 -1
- package/dist/lexer/Lexer.d.ts +51 -12
- package/dist/lexer/Lexer.js +215 -65
- package/dist/lexer/Lexer.js.map +1 -1
- package/dist/lexer/Lexer.spec.js +812 -568
- package/dist/lexer/Lexer.spec.js.map +1 -1
- package/dist/lexer/Token.d.ts +27 -11
- package/dist/lexer/Token.js +10 -2
- package/dist/lexer/Token.js.map +1 -1
- package/dist/lexer/TokenKind.d.ts +40 -2
- package/dist/lexer/TokenKind.js +147 -10
- package/dist/lexer/TokenKind.js.map +1 -1
- package/dist/logging.d.ts +14 -0
- package/dist/logging.js +29 -0
- package/dist/logging.js.map +1 -0
- package/dist/lsp/ActionQueue.d.ts +35 -0
- package/dist/lsp/ActionQueue.js +115 -0
- package/dist/lsp/ActionQueue.js.map +1 -0
- package/dist/lsp/ActionQueue.spec.d.ts +1 -0
- package/dist/lsp/ActionQueue.spec.js +80 -0
- package/dist/lsp/ActionQueue.spec.js.map +1 -0
- package/dist/lsp/DocumentManager.d.ts +63 -0
- package/dist/lsp/DocumentManager.js +122 -0
- package/dist/lsp/DocumentManager.js.map +1 -0
- package/dist/lsp/DocumentManager.spec.d.ts +1 -0
- package/dist/lsp/DocumentManager.spec.js +103 -0
- package/dist/lsp/DocumentManager.spec.js.map +1 -0
- package/dist/lsp/LspProject.d.ts +239 -0
- package/dist/lsp/LspProject.js +3 -0
- package/dist/lsp/LspProject.js.map +1 -0
- package/dist/lsp/PathFilterer.d.ts +75 -0
- package/dist/lsp/PathFilterer.js +196 -0
- package/dist/lsp/PathFilterer.js.map +1 -0
- package/dist/lsp/PathFilterer.spec.d.ts +1 -0
- package/dist/lsp/PathFilterer.spec.js +182 -0
- package/dist/lsp/PathFilterer.spec.js.map +1 -0
- package/dist/lsp/Project.d.ts +168 -0
- package/dist/lsp/Project.js +437 -0
- package/dist/lsp/Project.js.map +1 -0
- package/dist/lsp/Project.spec.d.ts +1 -0
- package/dist/lsp/Project.spec.js +267 -0
- package/dist/lsp/Project.spec.js.map +1 -0
- package/dist/lsp/ProjectManager.d.ts +242 -0
- package/dist/lsp/ProjectManager.js +824 -0
- package/dist/lsp/ProjectManager.js.map +1 -0
- package/dist/lsp/ProjectManager.spec.d.ts +1 -0
- package/dist/lsp/ProjectManager.spec.js +913 -0
- package/dist/lsp/ProjectManager.spec.js.map +1 -0
- package/dist/lsp/ReaderWriterManager.d.ts +21 -0
- package/dist/lsp/ReaderWriterManager.js +60 -0
- package/dist/lsp/ReaderWriterManager.js.map +1 -0
- package/dist/lsp/worker/MessageHandler.d.ts +99 -0
- package/dist/lsp/worker/MessageHandler.js +138 -0
- package/dist/lsp/worker/MessageHandler.js.map +1 -0
- package/dist/lsp/worker/MessageHandler.spec.d.ts +1 -0
- package/dist/lsp/worker/MessageHandler.spec.js +64 -0
- package/dist/lsp/worker/MessageHandler.spec.js.map +1 -0
- package/dist/lsp/worker/WorkerPool.d.ts +38 -0
- package/dist/lsp/worker/WorkerPool.js +78 -0
- package/dist/lsp/worker/WorkerPool.js.map +1 -0
- package/dist/lsp/worker/WorkerPool.spec.d.ts +1 -0
- package/dist/lsp/worker/WorkerPool.spec.js +59 -0
- package/dist/lsp/worker/WorkerPool.spec.js.map +1 -0
- package/dist/lsp/worker/WorkerThreadProject.d.ts +143 -0
- package/dist/lsp/worker/WorkerThreadProject.js +189 -0
- package/dist/lsp/worker/WorkerThreadProject.js.map +1 -0
- package/dist/lsp/worker/WorkerThreadProject.spec.d.ts +2 -0
- package/dist/lsp/worker/WorkerThreadProject.spec.js +71 -0
- package/dist/lsp/worker/WorkerThreadProject.spec.js.map +1 -0
- package/dist/lsp/worker/WorkerThreadProjectRunner.d.ts +15 -0
- package/dist/lsp/worker/WorkerThreadProjectRunner.js +58 -0
- package/dist/lsp/worker/WorkerThreadProjectRunner.js.map +1 -0
- package/dist/lsp/worker/run.d.ts +1 -0
- package/dist/lsp/worker/run.js +14 -0
- package/dist/lsp/worker/run.js.map +1 -0
- package/dist/parser/AstNode.d.ts +203 -0
- package/dist/parser/AstNode.js +303 -0
- package/dist/parser/AstNode.js.map +1 -0
- package/dist/parser/AstNode.spec.d.ts +1 -0
- package/dist/parser/AstNode.spec.js +1455 -0
- package/dist/parser/AstNode.spec.js.map +1 -0
- package/dist/parser/BrightScriptDocParser.d.ts +56 -0
- package/dist/parser/BrightScriptDocParser.js +294 -0
- package/dist/parser/BrightScriptDocParser.js.map +1 -0
- package/dist/parser/BrightScriptDocParser.spec.d.ts +1 -0
- package/dist/parser/BrightScriptDocParser.spec.js +310 -0
- package/dist/parser/BrightScriptDocParser.spec.js.map +1 -0
- package/dist/parser/BrsTranspileState.d.ts +22 -3
- package/dist/parser/BrsTranspileState.js +19 -0
- package/dist/parser/BrsTranspileState.js.map +1 -1
- package/dist/parser/Expression.d.ts +553 -221
- package/dist/parser/Expression.js +1414 -505
- package/dist/parser/Expression.js.map +1 -1
- package/dist/parser/Expression.spec.d.ts +1 -0
- package/dist/parser/Expression.spec.js +40 -0
- package/dist/parser/Expression.spec.js.map +1 -0
- package/dist/parser/Parser.Class.spec.js +255 -125
- package/dist/parser/Parser.Class.spec.js.map +1 -1
- package/dist/parser/Parser.d.ts +117 -124
- package/dist/parser/Parser.js +1669 -982
- package/dist/parser/Parser.js.map +1 -1
- package/dist/parser/Parser.spec.d.ts +3 -1
- package/dist/parser/Parser.spec.js +2111 -525
- package/dist/parser/Parser.spec.js.map +1 -1
- package/dist/parser/SGParser.d.ts +29 -13
- package/dist/parser/SGParser.js +85 -56
- package/dist/parser/SGParser.js.map +1 -1
- package/dist/parser/SGParser.spec.js +30 -45
- package/dist/parser/SGParser.spec.js.map +1 -1
- package/dist/parser/SGTypes.d.ts +134 -46
- package/dist/parser/SGTypes.js +206 -115
- package/dist/parser/SGTypes.js.map +1 -1
- package/dist/parser/Statement.d.ts +849 -267
- package/dist/parser/Statement.js +2412 -625
- package/dist/parser/Statement.js.map +1 -1
- package/dist/parser/Statement.spec.js +133 -36
- package/dist/parser/Statement.spec.js.map +1 -1
- package/dist/parser/TranspileState.d.ts +26 -12
- package/dist/parser/TranspileState.js +115 -24
- package/dist/parser/TranspileState.js.map +1 -1
- package/dist/parser/tests/Parser.spec.d.ts +3 -9
- package/dist/parser/tests/Parser.spec.js +7 -13
- package/dist/parser/tests/Parser.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/For.spec.js +83 -75
- package/dist/parser/tests/controlFlow/For.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/ForEach.spec.js +85 -51
- package/dist/parser/tests/controlFlow/ForEach.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/If.spec.js +382 -239
- package/dist/parser/tests/controlFlow/If.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/While.spec.js +52 -45
- package/dist/parser/tests/controlFlow/While.spec.js.map +1 -1
- package/dist/parser/tests/expression/Additive.spec.js +51 -43
- package/dist/parser/tests/expression/Additive.spec.js.map +1 -1
- package/dist/parser/tests/expression/ArrayLiterals.spec.js +192 -142
- package/dist/parser/tests/expression/ArrayLiterals.spec.js.map +1 -1
- package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js +236 -160
- package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js.map +1 -1
- package/dist/parser/tests/expression/Boolean.spec.js +41 -34
- package/dist/parser/tests/expression/Boolean.spec.js.map +1 -1
- package/dist/parser/tests/expression/Call.spec.js +173 -55
- package/dist/parser/tests/expression/Call.spec.js.map +1 -1
- package/dist/parser/tests/expression/Exponential.spec.js +20 -20
- package/dist/parser/tests/expression/Exponential.spec.js.map +1 -1
- package/dist/parser/tests/expression/Function.spec.js +291 -282
- package/dist/parser/tests/expression/Function.spec.js.map +1 -1
- package/dist/parser/tests/expression/Indexing.spec.js +193 -110
- package/dist/parser/tests/expression/Indexing.spec.js.map +1 -1
- package/dist/parser/tests/expression/Multiplicative.spec.js +42 -42
- package/dist/parser/tests/expression/Multiplicative.spec.js.map +1 -1
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js +260 -115
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/PrefixUnary.spec.js +58 -52
- package/dist/parser/tests/expression/PrefixUnary.spec.js.map +1 -1
- package/dist/parser/tests/expression/Primary.spec.js +76 -60
- package/dist/parser/tests/expression/Primary.spec.js.map +1 -1
- package/dist/parser/tests/expression/RegexLiteralExpression.spec.d.ts +1 -0
- package/dist/parser/tests/expression/RegexLiteralExpression.spec.js +171 -0
- package/dist/parser/tests/expression/RegexLiteralExpression.spec.js.map +1 -0
- package/dist/parser/tests/expression/Relational.spec.js +50 -50
- package/dist/parser/tests/expression/Relational.spec.js.map +1 -1
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.js +31 -31
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js +281 -94
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TernaryExpression.spec.js +747 -192
- package/dist/parser/tests/expression/TernaryExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TypeExpression.spec.d.ts +1 -0
- package/dist/parser/tests/expression/TypeExpression.spec.js +126 -0
- package/dist/parser/tests/expression/TypeExpression.spec.js.map +1 -0
- package/dist/parser/tests/expression/UnaryExpression.spec.d.ts +1 -0
- package/dist/parser/tests/expression/UnaryExpression.spec.js +52 -0
- package/dist/parser/tests/expression/UnaryExpression.spec.js.map +1 -0
- package/dist/parser/tests/statement/AssignmentOperators.spec.js +44 -44
- package/dist/parser/tests/statement/AssignmentOperators.spec.js.map +1 -1
- package/dist/parser/tests/statement/ConstStatement.spec.d.ts +1 -0
- package/dist/parser/tests/statement/ConstStatement.spec.js +500 -0
- package/dist/parser/tests/statement/ConstStatement.spec.js.map +1 -0
- package/dist/parser/tests/statement/Continue.spec.d.ts +1 -0
- package/dist/parser/tests/statement/Continue.spec.js +119 -0
- package/dist/parser/tests/statement/Continue.spec.js.map +1 -0
- package/dist/parser/tests/statement/Declaration.spec.js +61 -55
- package/dist/parser/tests/statement/Declaration.spec.js.map +1 -1
- package/dist/parser/tests/statement/Dim.spec.js +29 -22
- package/dist/parser/tests/statement/Dim.spec.js.map +1 -1
- package/dist/parser/tests/statement/Enum.spec.d.ts +1 -0
- package/dist/parser/tests/statement/Enum.spec.js +744 -0
- package/dist/parser/tests/statement/Enum.spec.js.map +1 -0
- package/dist/parser/tests/statement/For.spec.d.ts +1 -0
- package/dist/parser/tests/statement/For.spec.js +45 -0
- package/dist/parser/tests/statement/For.spec.js.map +1 -0
- package/dist/parser/tests/statement/ForEach.spec.d.ts +1 -0
- package/dist/parser/tests/statement/ForEach.spec.js +36 -0
- package/dist/parser/tests/statement/ForEach.spec.js.map +1 -0
- package/dist/parser/tests/statement/Function.spec.js +226 -215
- package/dist/parser/tests/statement/Function.spec.js.map +1 -1
- package/dist/parser/tests/statement/Goto.spec.js +16 -15
- package/dist/parser/tests/statement/Goto.spec.js.map +1 -1
- package/dist/parser/tests/statement/Increment.spec.js +64 -61
- package/dist/parser/tests/statement/Increment.spec.js.map +1 -1
- package/dist/parser/tests/statement/InterfaceStatement.spec.d.ts +1 -0
- package/dist/parser/tests/statement/InterfaceStatement.spec.js +110 -0
- package/dist/parser/tests/statement/InterfaceStatement.spec.js.map +1 -0
- package/dist/parser/tests/statement/LibraryStatement.spec.js +22 -22
- package/dist/parser/tests/statement/LibraryStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/Misc.spec.js +127 -168
- package/dist/parser/tests/statement/Misc.spec.js.map +1 -1
- package/dist/parser/tests/statement/PrintStatement.spec.js +133 -114
- package/dist/parser/tests/statement/PrintStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/ReturnStatement.spec.js +57 -54
- package/dist/parser/tests/statement/ReturnStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/Set.spec.js +131 -117
- package/dist/parser/tests/statement/Set.spec.js.map +1 -1
- package/dist/parser/tests/statement/Stop.spec.js +14 -13
- package/dist/parser/tests/statement/Stop.spec.js.map +1 -1
- package/dist/parser/tests/statement/Throw.spec.js +11 -8
- package/dist/parser/tests/statement/Throw.spec.js.map +1 -1
- package/dist/parser/tests/statement/TryCatch.spec.js +26 -15
- package/dist/parser/tests/statement/TryCatch.spec.js.map +1 -1
- package/dist/preprocessor/Manifest.d.ts +6 -6
- package/dist/preprocessor/Manifest.js +17 -38
- package/dist/preprocessor/Manifest.js.map +1 -1
- package/dist/preprocessor/Manifest.spec.d.ts +1 -0
- package/dist/preprocessor/Manifest.spec.js +78 -103
- package/dist/preprocessor/Manifest.spec.js.map +1 -1
- package/dist/roku-types/data.json +20347 -0
- package/dist/roku-types/index.d.ts +5726 -0
- package/dist/roku-types/index.js +11 -0
- package/dist/roku-types/index.js.map +1 -0
- package/dist/types/ArrayType.d.ts +12 -5
- package/dist/types/ArrayType.js +89 -24
- package/dist/types/ArrayType.js.map +1 -1
- package/dist/types/ArrayType.spec.js +39 -11
- package/dist/types/ArrayType.spec.js.map +1 -1
- package/dist/types/AssociativeArrayType.d.ts +15 -0
- package/dist/types/AssociativeArrayType.js +64 -0
- package/dist/types/AssociativeArrayType.js.map +1 -0
- package/dist/types/BaseFunctionType.d.ts +10 -0
- package/dist/types/BaseFunctionType.js +26 -0
- package/dist/types/BaseFunctionType.js.map +1 -0
- package/dist/types/BooleanType.d.ts +9 -5
- package/dist/types/BooleanType.js +19 -8
- package/dist/types/BooleanType.js.map +1 -1
- package/dist/types/BooleanType.spec.js +10 -4
- package/dist/types/BooleanType.spec.js.map +1 -1
- package/dist/types/BscType.d.ts +41 -3
- package/dist/types/BscType.js +152 -0
- package/dist/types/BscType.js.map +1 -1
- package/dist/types/BscTypeKind.d.ts +28 -0
- package/dist/types/BscTypeKind.js +33 -0
- package/dist/types/BscTypeKind.js.map +1 -0
- package/dist/types/BuiltInInterfaceAdder.d.ts +28 -0
- package/dist/types/BuiltInInterfaceAdder.js +212 -0
- package/dist/types/BuiltInInterfaceAdder.js.map +1 -0
- package/dist/types/BuiltInInterfaceAdder.spec.d.ts +1 -0
- package/dist/types/BuiltInInterfaceAdder.spec.js +115 -0
- package/dist/types/BuiltInInterfaceAdder.spec.js.map +1 -0
- package/dist/types/CallFuncableType.d.ts +24 -0
- package/dist/types/CallFuncableType.js +91 -0
- package/dist/types/CallFuncableType.js.map +1 -0
- package/dist/types/ClassType.d.ts +17 -0
- package/dist/types/ClassType.js +60 -0
- package/dist/types/ClassType.js.map +1 -0
- package/dist/types/ClassType.spec.d.ts +1 -0
- package/dist/types/ClassType.spec.js +76 -0
- package/dist/types/ClassType.spec.js.map +1 -0
- package/dist/types/ComponentType.d.ts +22 -0
- package/dist/types/ComponentType.js +107 -0
- package/dist/types/ComponentType.js.map +1 -0
- package/dist/types/DoubleType.d.ts +10 -5
- package/dist/types/DoubleType.js +21 -17
- package/dist/types/DoubleType.js.map +1 -1
- package/dist/types/DoubleType.spec.js +12 -4
- package/dist/types/DoubleType.spec.js.map +1 -1
- package/dist/types/DynamicType.d.ts +13 -5
- package/dist/types/DynamicType.js +26 -5
- package/dist/types/DynamicType.js.map +1 -1
- package/dist/types/DynamicType.spec.js +16 -5
- package/dist/types/DynamicType.spec.js.map +1 -1
- package/dist/types/EnumType.d.ts +42 -0
- package/dist/types/EnumType.js +98 -0
- package/dist/types/EnumType.js.map +1 -0
- package/dist/types/EnumType.spec.d.ts +1 -0
- package/dist/types/EnumType.spec.js +33 -0
- package/dist/types/EnumType.spec.js.map +1 -0
- package/dist/types/FloatType.d.ts +10 -5
- package/dist/types/FloatType.js +21 -17
- package/dist/types/FloatType.js.map +1 -1
- package/dist/types/FloatType.spec.js +4 -4
- package/dist/types/FloatType.spec.js.map +1 -1
- package/dist/types/FunctionType.d.ts +8 -22
- package/dist/types/FunctionType.js +25 -63
- package/dist/types/FunctionType.js.map +1 -1
- package/dist/types/InheritableType.d.ts +29 -0
- package/dist/types/InheritableType.js +173 -0
- package/dist/types/InheritableType.js.map +1 -0
- package/dist/types/InlineInterfaceType.d.ts +5 -0
- package/dist/types/InlineInterfaceType.js +17 -0
- package/dist/types/InlineInterfaceType.js.map +1 -0
- package/dist/types/IntegerType.d.ts +10 -5
- package/dist/types/IntegerType.js +21 -17
- package/dist/types/IntegerType.js.map +1 -1
- package/dist/types/IntegerType.spec.js +8 -4
- package/dist/types/IntegerType.spec.js.map +1 -1
- package/dist/types/InterfaceType.d.ts +14 -6
- package/dist/types/InterfaceType.js +30 -15
- package/dist/types/InterfaceType.js.map +1 -1
- package/dist/types/InterfaceType.spec.d.ts +1 -0
- package/dist/types/InterfaceType.spec.js +227 -0
- package/dist/types/InterfaceType.spec.js.map +1 -0
- package/dist/types/IntersectionType.d.ts +29 -0
- package/dist/types/IntersectionType.js +253 -0
- package/dist/types/IntersectionType.js.map +1 -0
- package/dist/types/IntersectionType.spec.d.ts +1 -0
- package/dist/types/IntersectionType.spec.js +150 -0
- package/dist/types/IntersectionType.spec.js.map +1 -0
- package/dist/types/InvalidType.d.ts +10 -5
- package/dist/types/InvalidType.js +21 -9
- package/dist/types/InvalidType.js.map +1 -1
- package/dist/types/InvalidType.spec.js +8 -4
- package/dist/types/InvalidType.spec.js.map +1 -1
- package/dist/types/LongIntegerType.d.ts +10 -5
- package/dist/types/LongIntegerType.js +21 -17
- package/dist/types/LongIntegerType.js.map +1 -1
- package/dist/types/LongIntegerType.spec.js +10 -4
- package/dist/types/LongIntegerType.spec.js.map +1 -1
- package/dist/types/NamespaceType.d.ts +12 -0
- package/dist/types/NamespaceType.js +28 -0
- package/dist/types/NamespaceType.js.map +1 -0
- package/dist/types/ObjectType.d.ts +12 -5
- package/dist/types/ObjectType.js +25 -8
- package/dist/types/ObjectType.js.map +1 -1
- package/dist/types/ObjectType.spec.js +3 -3
- package/dist/types/ObjectType.spec.js.map +1 -1
- package/dist/types/ReferenceType.d.ts +123 -0
- package/dist/types/ReferenceType.js +720 -0
- package/dist/types/ReferenceType.js.map +1 -0
- package/dist/types/ReferenceType.spec.d.ts +1 -0
- package/dist/types/ReferenceType.spec.js +151 -0
- package/dist/types/ReferenceType.spec.js.map +1 -0
- package/dist/types/StringType.d.ts +12 -5
- package/dist/types/StringType.js +23 -8
- package/dist/types/StringType.js.map +1 -1
- package/dist/types/StringType.spec.js +3 -3
- package/dist/types/StringType.spec.js.map +1 -1
- package/dist/types/TypeStatementType.d.ts +18 -0
- package/dist/types/TypeStatementType.js +45 -0
- package/dist/types/TypeStatementType.js.map +1 -0
- package/dist/types/TypedFunctionType.d.ts +34 -0
- package/dist/types/TypedFunctionType.js +147 -0
- package/dist/types/TypedFunctionType.js.map +1 -0
- package/dist/types/TypedFunctionType.spec.d.ts +1 -0
- package/dist/types/TypedFunctionType.spec.js +122 -0
- package/dist/types/TypedFunctionType.spec.js.map +1 -0
- package/dist/types/UninitializedType.d.ts +11 -6
- package/dist/types/UninitializedType.js +20 -11
- package/dist/types/UninitializedType.js.map +1 -1
- package/dist/types/UnionType.d.ts +27 -0
- package/dist/types/UnionType.js +193 -0
- package/dist/types/UnionType.js.map +1 -0
- package/dist/types/UnionType.spec.d.ts +1 -0
- package/dist/types/UnionType.spec.js +205 -0
- package/dist/types/UnionType.spec.js.map +1 -0
- package/dist/types/VoidType.d.ts +11 -5
- package/dist/types/VoidType.js +22 -8
- package/dist/types/VoidType.js.map +1 -1
- package/dist/types/VoidType.spec.js +3 -3
- package/dist/types/VoidType.spec.js.map +1 -1
- package/dist/types/helper.spec.d.ts +1 -0
- package/dist/types/helper.spec.js +174 -0
- package/dist/types/helper.spec.js.map +1 -0
- package/dist/types/helpers.d.ts +51 -0
- package/dist/types/helpers.js +323 -0
- package/dist/types/helpers.js.map +1 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/index.js +39 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/roFunctionType.d.ts +11 -0
- package/dist/types/roFunctionType.js +37 -0
- package/dist/types/roFunctionType.js.map +1 -0
- package/dist/types/roFunctionType.spec.d.ts +1 -0
- package/dist/types/roFunctionType.spec.js +20 -0
- package/dist/types/roFunctionType.spec.js.map +1 -0
- package/dist/util.d.ts +288 -187
- package/dist/util.js +2018 -575
- package/dist/util.js.map +1 -1
- package/dist/validators/ClassValidator.d.ts +9 -15
- package/dist/validators/ClassValidator.js +93 -138
- package/dist/validators/ClassValidator.js.map +1 -1
- package/package.json +185 -138
- package/CHANGELOG.md +0 -1188
- package/dist/astUtils/index.d.ts +0 -7
- package/dist/astUtils/index.js +0 -26
- package/dist/astUtils/index.js.map +0 -1
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.d.ts +0 -7
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.js +0 -63
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.js.map +0 -1
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.js +0 -45
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.js.map +0 -1
- package/dist/lexer/index.d.ts +0 -3
- package/dist/lexer/index.js +0 -17
- package/dist/lexer/index.js.map +0 -1
- package/dist/parser/SGTypes.spec.js +0 -351
- package/dist/parser/SGTypes.spec.js.map +0 -1
- package/dist/parser/index.d.ts +0 -3
- package/dist/parser/index.js +0 -16
- package/dist/parser/index.js.map +0 -1
- package/dist/preprocessor/Chunk.d.ts +0 -82
- package/dist/preprocessor/Chunk.js +0 -77
- package/dist/preprocessor/Chunk.js.map +0 -1
- package/dist/preprocessor/Preprocessor.d.ts +0 -60
- package/dist/preprocessor/Preprocessor.js +0 -156
- package/dist/preprocessor/Preprocessor.js.map +0 -1
- package/dist/preprocessor/Preprocessor.spec.js +0 -152
- package/dist/preprocessor/Preprocessor.spec.js.map +0 -1
- package/dist/preprocessor/PreprocessorParser.d.ts +0 -61
- package/dist/preprocessor/PreprocessorParser.js +0 -194
- package/dist/preprocessor/PreprocessorParser.js.map +0 -1
- package/dist/preprocessor/PreprocessorParser.spec.js +0 -116
- package/dist/preprocessor/PreprocessorParser.spec.js.map +0 -1
- package/dist/preprocessor/index.d.ts +0 -3
- package/dist/preprocessor/index.js +0 -16
- package/dist/preprocessor/index.js.map +0 -1
- package/dist/types/CustomType.d.ts +0 -10
- package/dist/types/CustomType.js +0 -35
- package/dist/types/CustomType.js.map +0 -1
- package/dist/types/FunctionType.spec.js +0 -29
- package/dist/types/FunctionType.spec.js.map +0 -1
- package/dist/types/LazyType.d.ts +0 -15
- package/dist/types/LazyType.js +0 -32
- package/dist/types/LazyType.js.map +0 -1
- /package/dist/{bscPlugin/semanticTokens/SemanticTokensProcessor.spec.d.ts → astUtils/CachedLookups.spec.d.ts} +0 -0
- /package/dist/{parser/SGTypes.spec.d.ts → astUtils/Editor.spec.d.ts} +0 -0
- /package/dist/{preprocessor/Preprocessor.spec.d.ts → bscPlugin/completions/CompletionsProcessor.spec.d.ts} +0 -0
- /package/dist/{preprocessor/PreprocessorParser.spec.d.ts → bscPlugin/definition/DefinitionProvider.spec.d.ts} +0 -0
- /package/dist/{types/FunctionType.spec.d.ts → bscPlugin/hover/HoverProcessor.spec.d.ts} +0 -0
|
@@ -1,252 +1,398 @@
|
|
|
1
|
-
import type { Token, Identifier } from '../lexer';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { Token, Identifier } from '../lexer/Token';
|
|
2
|
+
import type { PrintSeparatorToken } from '../lexer/TokenKind';
|
|
3
|
+
import type { Block } from './Statement';
|
|
4
|
+
import type { Location } from 'vscode-languageserver';
|
|
4
5
|
import type { BrsTranspileState } from './BrsTranspileState';
|
|
5
6
|
import { ParseMode } from './Parser';
|
|
6
7
|
import type { WalkOptions, WalkVisitor } from '../astUtils/visitors';
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
8
|
+
import type { GetTypeOptions, TranspileResult, TypedefProvider } from '../interfaces';
|
|
9
|
+
import { VoidType } from '../types/VoidType';
|
|
10
|
+
import { DynamicType } from '../types/DynamicType';
|
|
9
11
|
import type { BscType } from '../types/BscType';
|
|
10
|
-
import {
|
|
12
|
+
import { AstNodeKind, Expression } from './AstNode';
|
|
13
|
+
import { SourceNode } from 'source-map';
|
|
14
|
+
import type { TranspileState } from './TranspileState';
|
|
15
|
+
import { StringType } from '../types/StringType';
|
|
16
|
+
import { TypedFunctionType } from '../types/TypedFunctionType';
|
|
17
|
+
import { InvalidType } from '../types/InvalidType';
|
|
11
18
|
import { FunctionType } from '../types/FunctionType';
|
|
12
19
|
export declare type ExpressionVisitor = (expression: Expression, parent: Expression) => void;
|
|
13
|
-
/** A BrightScript expression */
|
|
14
|
-
export declare abstract class Expression {
|
|
15
|
-
/**
|
|
16
|
-
* The starting and ending location of the expression.
|
|
17
|
-
*/
|
|
18
|
-
abstract range: Range;
|
|
19
|
-
abstract transpile(state: BrsTranspileState): TranspileResult;
|
|
20
|
-
/**
|
|
21
|
-
* When being considered by the walk visitor, this describes what type of element the current class is.
|
|
22
|
-
*/
|
|
23
|
-
visitMode: InternalWalkMode;
|
|
24
|
-
abstract walk(visitor: WalkVisitor, options: WalkOptions): any;
|
|
25
|
-
}
|
|
26
20
|
export declare class BinaryExpression extends Expression {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
constructor(options: {
|
|
22
|
+
left: Expression;
|
|
23
|
+
operator: Token;
|
|
24
|
+
right: Expression;
|
|
25
|
+
});
|
|
26
|
+
readonly tokens: {
|
|
27
|
+
readonly operator: Token;
|
|
28
|
+
};
|
|
29
|
+
readonly left: Expression;
|
|
30
|
+
readonly right: Expression;
|
|
31
|
+
readonly kind = AstNodeKind.BinaryExpression;
|
|
32
|
+
readonly location: Location | undefined;
|
|
33
|
+
transpile(state: BrsTranspileState): TranspileResult;
|
|
33
34
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
35
|
+
getType(options: GetTypeOptions): BscType;
|
|
36
|
+
get leadingTrivia(): Token[];
|
|
37
|
+
clone(): BinaryExpression;
|
|
34
38
|
}
|
|
35
39
|
export declare class CallExpression extends Expression {
|
|
36
|
-
readonly callee: Expression;
|
|
37
|
-
readonly openingParen: Token;
|
|
38
|
-
readonly closingParen: Token;
|
|
39
|
-
readonly args: Expression[];
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Number of parameters that can be defined on a function
|
|
42
|
+
*
|
|
43
|
+
* Prior to Roku OS 11.5, this was 32
|
|
44
|
+
* As of Roku OS 11.5, this is 63
|
|
42
45
|
*/
|
|
43
|
-
readonly namespaceName: NamespacedVariableNameExpression;
|
|
44
46
|
static MaximumArguments: number;
|
|
45
|
-
constructor(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
constructor(options: {
|
|
48
|
+
callee: Expression;
|
|
49
|
+
openingParen?: Token;
|
|
50
|
+
args?: Expression[];
|
|
51
|
+
closingParen?: Token;
|
|
52
|
+
});
|
|
53
|
+
readonly callee: Expression;
|
|
54
|
+
readonly args: Expression[];
|
|
55
|
+
readonly tokens: {
|
|
56
|
+
/**
|
|
57
|
+
* Can either be `(`, or `?(` for optional chaining - defaults to '('
|
|
58
|
+
*/
|
|
59
|
+
readonly openingParen?: Token;
|
|
60
|
+
readonly closingParen?: Token;
|
|
61
|
+
};
|
|
62
|
+
readonly kind = AstNodeKind.CallExpression;
|
|
63
|
+
readonly location: Location | undefined;
|
|
64
|
+
transpile(state: BrsTranspileState, nameOverride?: string): TranspileResult;
|
|
52
65
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
66
|
+
getType(options: GetTypeOptions): BscType;
|
|
67
|
+
get leadingTrivia(): Token[];
|
|
68
|
+
clone(): CallExpression;
|
|
53
69
|
}
|
|
54
70
|
export declare class FunctionExpression extends Expression implements TypedefProvider {
|
|
71
|
+
constructor(options: {
|
|
72
|
+
functionType?: Token;
|
|
73
|
+
leftParen?: Token;
|
|
74
|
+
parameters?: FunctionParameterExpression[];
|
|
75
|
+
rightParen?: Token;
|
|
76
|
+
as?: Token;
|
|
77
|
+
returnTypeExpression?: TypeExpression;
|
|
78
|
+
body: Block;
|
|
79
|
+
endFunctionType?: Token;
|
|
80
|
+
});
|
|
81
|
+
readonly kind = AstNodeKind.FunctionExpression;
|
|
55
82
|
readonly parameters: FunctionParameterExpression[];
|
|
56
|
-
body: Block;
|
|
57
|
-
readonly
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
readonly namespaceName?: NamespacedVariableNameExpression;
|
|
68
|
-
readonly parentSymbolTable?: SymbolTable;
|
|
69
|
-
constructor(parameters: FunctionParameterExpression[], body: Block, functionType: Token | null, end: Token, leftParen: Token, rightParen: Token, asToken?: Token, returnTypeToken?: Token,
|
|
70
|
-
/**
|
|
71
|
-
* If this function is enclosed within another function, this will reference that parent function
|
|
72
|
-
*/
|
|
73
|
-
parentFunction?: FunctionExpression, namespaceName?: NamespacedVariableNameExpression, parentSymbolTable?: SymbolTable);
|
|
74
|
-
readonly symbolTable: SymbolTable;
|
|
75
|
-
labelStatements: LabelStatement[];
|
|
76
|
-
/**
|
|
77
|
-
* The type this function returns
|
|
78
|
-
*/
|
|
79
|
-
returnType: BscType;
|
|
80
|
-
/**
|
|
81
|
-
* The list of function calls that are declared within this function scope. This excludes CallExpressions
|
|
82
|
-
* declared in child functions
|
|
83
|
-
*/
|
|
84
|
-
callExpressions: CallExpression[];
|
|
85
|
-
/**
|
|
86
|
-
* If this function is part of a FunctionStatement, this will be set. Otherwise this will be undefined
|
|
87
|
-
*/
|
|
88
|
-
functionStatement?: FunctionStatement;
|
|
89
|
-
/**
|
|
90
|
-
* A list of all child functions declared directly within this function
|
|
91
|
-
*/
|
|
92
|
-
childFunctionExpressions: FunctionExpression[];
|
|
83
|
+
readonly body: Block;
|
|
84
|
+
readonly returnTypeExpression?: TypeExpression;
|
|
85
|
+
readonly tokens: {
|
|
86
|
+
readonly functionType?: Token;
|
|
87
|
+
readonly endFunctionType?: Token;
|
|
88
|
+
readonly leftParen?: Token;
|
|
89
|
+
readonly rightParen?: Token;
|
|
90
|
+
readonly as?: Token;
|
|
91
|
+
};
|
|
92
|
+
get leadingTrivia(): Token[];
|
|
93
|
+
get endTrivia(): Token[];
|
|
93
94
|
/**
|
|
94
95
|
* The range of the function, starting at the 'f' in function or 's' in sub (or the open paren if the keyword is missing),
|
|
95
96
|
* and ending with the last n' in 'end function' or 'b' in 'end sub'
|
|
96
97
|
*/
|
|
97
|
-
get
|
|
98
|
-
transpile(state: BrsTranspileState, name?: Identifier, includeBody?: boolean):
|
|
99
|
-
getTypedef(state: BrsTranspileState
|
|
98
|
+
get location(): Location;
|
|
99
|
+
transpile(state: BrsTranspileState, name?: Identifier, includeBody?: boolean): TranspileResult;
|
|
100
|
+
getTypedef(state: BrsTranspileState): SourceNode[];
|
|
100
101
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
101
|
-
|
|
102
|
+
getType(options: GetTypeOptions): TypedFunctionType;
|
|
103
|
+
private get requiresReturnType();
|
|
104
|
+
clone(): FunctionExpression;
|
|
102
105
|
}
|
|
103
106
|
export declare class FunctionParameterExpression extends Expression {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
readonly
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
transpile(state: BrsTranspileState):
|
|
122
|
-
|
|
123
|
-
getName(parseMode: ParseMode): string;
|
|
107
|
+
constructor(options: {
|
|
108
|
+
name: Identifier;
|
|
109
|
+
equals?: Token;
|
|
110
|
+
defaultValue?: Expression;
|
|
111
|
+
as?: Token;
|
|
112
|
+
typeExpression?: TypeExpression;
|
|
113
|
+
});
|
|
114
|
+
readonly kind = AstNodeKind.FunctionParameterExpression;
|
|
115
|
+
readonly tokens: {
|
|
116
|
+
readonly name: Identifier;
|
|
117
|
+
readonly equals?: Token;
|
|
118
|
+
readonly as?: Token;
|
|
119
|
+
};
|
|
120
|
+
readonly defaultValue?: Expression;
|
|
121
|
+
readonly typeExpression?: TypeExpression;
|
|
122
|
+
getType(options: GetTypeOptions): BscType;
|
|
123
|
+
get location(): Location | undefined;
|
|
124
|
+
transpile(state: BrsTranspileState): TranspileResult;
|
|
125
|
+
getTypedef(state: BrsTranspileState): TranspileResult;
|
|
124
126
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
127
|
+
get leadingTrivia(): Token[];
|
|
128
|
+
clone(): FunctionParameterExpression;
|
|
125
129
|
}
|
|
126
130
|
export declare class DottedGetExpression extends Expression {
|
|
131
|
+
constructor(options: {
|
|
132
|
+
obj: Expression;
|
|
133
|
+
name: Identifier;
|
|
134
|
+
/**
|
|
135
|
+
* Can either be `.`, or `?.` for optional chaining - defaults in transpile to '.'
|
|
136
|
+
*/
|
|
137
|
+
dot?: Token;
|
|
138
|
+
});
|
|
139
|
+
readonly tokens: {
|
|
140
|
+
readonly name: Identifier;
|
|
141
|
+
readonly dot?: Token;
|
|
142
|
+
};
|
|
127
143
|
readonly obj: Expression;
|
|
128
|
-
readonly
|
|
129
|
-
readonly
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
transpile(state: BrsTranspileState): (string | import("source-map").SourceNode)[];
|
|
144
|
+
readonly kind = AstNodeKind.DottedGetExpression;
|
|
145
|
+
readonly location: Location | undefined;
|
|
146
|
+
transpile(state: BrsTranspileState): (string | SourceNode | TranspileResult)[];
|
|
147
|
+
getTypedef(state: BrsTranspileState): (string | SourceNode | TranspileResult)[];
|
|
133
148
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
149
|
+
getType(options: GetTypeOptions): BscType;
|
|
150
|
+
getName(parseMode: ParseMode): string;
|
|
151
|
+
get leadingTrivia(): Token[];
|
|
152
|
+
clone(): DottedGetExpression;
|
|
134
153
|
}
|
|
135
154
|
export declare class XmlAttributeGetExpression extends Expression {
|
|
155
|
+
constructor(options: {
|
|
156
|
+
obj: Expression;
|
|
157
|
+
/**
|
|
158
|
+
* Can either be `@`, or `?@` for optional chaining - defaults to '@'
|
|
159
|
+
*/
|
|
160
|
+
at?: Token;
|
|
161
|
+
name: Identifier;
|
|
162
|
+
});
|
|
163
|
+
readonly kind = AstNodeKind.XmlAttributeGetExpression;
|
|
164
|
+
readonly tokens: {
|
|
165
|
+
name: Identifier;
|
|
166
|
+
at?: Token;
|
|
167
|
+
};
|
|
136
168
|
readonly obj: Expression;
|
|
137
|
-
readonly
|
|
138
|
-
|
|
139
|
-
constructor(obj: Expression, name: Identifier, at: Token);
|
|
140
|
-
readonly range: Range;
|
|
141
|
-
transpile(state: BrsTranspileState): (string | import("source-map").SourceNode)[];
|
|
169
|
+
readonly location: Location | undefined;
|
|
170
|
+
transpile(state: BrsTranspileState): (string | SourceNode | TranspileResult)[];
|
|
142
171
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
172
|
+
get leadingTrivia(): Token[];
|
|
173
|
+
clone(): XmlAttributeGetExpression;
|
|
143
174
|
}
|
|
144
175
|
export declare class IndexedGetExpression extends Expression {
|
|
176
|
+
constructor(options: {
|
|
177
|
+
obj: Expression;
|
|
178
|
+
indexes: Expression[];
|
|
179
|
+
/**
|
|
180
|
+
* Can either be `[` or `?[`. If `?.[` is used, this will be `[` and `optionalChainingToken` will be `?.` - defaults to '[' in transpile
|
|
181
|
+
*/
|
|
182
|
+
openingSquare?: Token;
|
|
183
|
+
closingSquare?: Token;
|
|
184
|
+
questionDot?: Token;
|
|
185
|
+
});
|
|
186
|
+
readonly kind = AstNodeKind.IndexedGetExpression;
|
|
145
187
|
readonly obj: Expression;
|
|
146
|
-
readonly
|
|
147
|
-
readonly
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
188
|
+
readonly indexes: Expression[];
|
|
189
|
+
readonly tokens: {
|
|
190
|
+
/**
|
|
191
|
+
* Can either be `[` or `?[`. If `?.[` is used, this will be `[` and `optionalChainingToken` will be `?.` - defaults to '[' in transpile
|
|
192
|
+
*/
|
|
193
|
+
readonly openingSquare?: Token;
|
|
194
|
+
readonly closingSquare?: Token;
|
|
195
|
+
readonly questionDot?: Token;
|
|
196
|
+
};
|
|
197
|
+
readonly location: Location | undefined;
|
|
198
|
+
transpile(state: BrsTranspileState): any[];
|
|
152
199
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
200
|
+
getType(options: GetTypeOptions): BscType;
|
|
201
|
+
get leadingTrivia(): Token[];
|
|
202
|
+
clone(): IndexedGetExpression;
|
|
153
203
|
}
|
|
154
204
|
export declare class GroupingExpression extends Expression {
|
|
205
|
+
constructor(options: {
|
|
206
|
+
leftParen?: Token;
|
|
207
|
+
rightParen?: Token;
|
|
208
|
+
expression: Expression;
|
|
209
|
+
});
|
|
155
210
|
readonly tokens: {
|
|
156
|
-
|
|
157
|
-
|
|
211
|
+
readonly leftParen?: Token;
|
|
212
|
+
readonly rightParen?: Token;
|
|
158
213
|
};
|
|
159
|
-
expression: Expression;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}, expression: Expression);
|
|
164
|
-
readonly range: Range;
|
|
165
|
-
transpile(state: BrsTranspileState): (string | import("source-map").SourceNode)[];
|
|
214
|
+
readonly expression: Expression;
|
|
215
|
+
readonly kind = AstNodeKind.GroupingExpression;
|
|
216
|
+
readonly location: Location | undefined;
|
|
217
|
+
transpile(state: BrsTranspileState): TranspileResult;
|
|
166
218
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
219
|
+
getType(options: GetTypeOptions): BscType;
|
|
220
|
+
get leadingTrivia(): Token[];
|
|
221
|
+
clone(): GroupingExpression;
|
|
167
222
|
}
|
|
168
223
|
export declare class LiteralExpression extends Expression {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
224
|
+
constructor(options: {
|
|
225
|
+
value: Token;
|
|
226
|
+
});
|
|
227
|
+
readonly tokens: {
|
|
228
|
+
readonly value: Token;
|
|
229
|
+
};
|
|
230
|
+
readonly kind = AstNodeKind.LiteralExpression;
|
|
231
|
+
get location(): Location;
|
|
232
|
+
getType(options?: GetTypeOptions): DynamicType | import("..").ObjectType | VoidType | InvalidType | import("..").BooleanType | import("..").DoubleType | import("..").FloatType | FunctionType | import("..").IntegerType | import("..").LongIntegerType | StringType;
|
|
233
|
+
transpile(state: BrsTranspileState): TranspileResult[];
|
|
177
234
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
235
|
+
get leadingTrivia(): Token[];
|
|
236
|
+
clone(): LiteralExpression;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* The print statement can have a mix of expressions and separators. These separators represent actual output to the screen,
|
|
240
|
+
* so this AstNode represents those separators (comma, semicolon, and whitespace)
|
|
241
|
+
*/
|
|
242
|
+
export declare class PrintSeparatorExpression extends Expression {
|
|
243
|
+
constructor(options: {
|
|
244
|
+
separator: PrintSeparatorToken;
|
|
245
|
+
});
|
|
246
|
+
readonly tokens: {
|
|
247
|
+
readonly separator: PrintSeparatorToken;
|
|
248
|
+
};
|
|
249
|
+
readonly kind = AstNodeKind.PrintSeparatorExpression;
|
|
250
|
+
location: Location;
|
|
251
|
+
transpile(state: BrsTranspileState): (string | SourceNode | TranspileResult)[];
|
|
252
|
+
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
253
|
+
get leadingTrivia(): Token[];
|
|
254
|
+
clone(): PrintSeparatorExpression;
|
|
178
255
|
}
|
|
179
256
|
/**
|
|
180
257
|
* This is a special expression only used within template strings. It exists so we can prevent producing lots of empty strings
|
|
181
258
|
* during template string transpile by identifying these expressions explicitly and skipping the bslib_toString around them
|
|
182
259
|
*/
|
|
183
260
|
export declare class EscapedCharCodeLiteralExpression extends Expression {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
charCode: number;
|
|
261
|
+
constructor(options: {
|
|
262
|
+
value: Token & {
|
|
263
|
+
charCode: number;
|
|
264
|
+
};
|
|
189
265
|
});
|
|
190
|
-
readonly
|
|
191
|
-
|
|
266
|
+
readonly kind = AstNodeKind.EscapedCharCodeLiteralExpression;
|
|
267
|
+
readonly tokens: {
|
|
268
|
+
readonly value: Token & {
|
|
269
|
+
charCode: number;
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
readonly location: Location;
|
|
273
|
+
transpile(state: BrsTranspileState): SourceNode[];
|
|
192
274
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
275
|
+
clone(): EscapedCharCodeLiteralExpression;
|
|
193
276
|
}
|
|
194
277
|
export declare class ArrayLiteralExpression extends Expression {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
readonly
|
|
201
|
-
|
|
278
|
+
constructor(options: {
|
|
279
|
+
elements: Array<Expression>;
|
|
280
|
+
open?: Token;
|
|
281
|
+
close?: Token;
|
|
282
|
+
});
|
|
283
|
+
readonly elements: Array<Expression>;
|
|
284
|
+
readonly tokens: {
|
|
285
|
+
readonly open?: Token;
|
|
286
|
+
readonly close?: Token;
|
|
287
|
+
};
|
|
288
|
+
readonly kind = AstNodeKind.ArrayLiteralExpression;
|
|
289
|
+
readonly location: Location | undefined;
|
|
290
|
+
transpile(state: BrsTranspileState): TranspileResult;
|
|
202
291
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
292
|
+
getType(options: GetTypeOptions): BscType;
|
|
293
|
+
get leadingTrivia(): Token[];
|
|
294
|
+
get endTrivia(): Token[];
|
|
295
|
+
clone(): ArrayLiteralExpression;
|
|
203
296
|
}
|
|
204
297
|
export declare class AAMemberExpression extends Expression {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
298
|
+
constructor(options: {
|
|
299
|
+
key: Token;
|
|
300
|
+
colon?: Token;
|
|
301
|
+
/** The expression evaluated to determine the member's initial value. */
|
|
302
|
+
value: Expression;
|
|
303
|
+
comma?: Token;
|
|
304
|
+
});
|
|
305
|
+
readonly kind = AstNodeKind.AAMemberExpression;
|
|
306
|
+
readonly location: Location | undefined;
|
|
307
|
+
readonly tokens: {
|
|
308
|
+
readonly key: Token;
|
|
309
|
+
readonly colon?: Token;
|
|
310
|
+
readonly comma?: Token;
|
|
311
|
+
};
|
|
210
312
|
/** The expression evaluated to determine the member's initial value. */
|
|
211
|
-
value: Expression
|
|
212
|
-
range: Range;
|
|
313
|
+
readonly value: Expression;
|
|
213
314
|
transpile(state: BrsTranspileState): any[];
|
|
214
315
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
316
|
+
getType(options: GetTypeOptions): BscType;
|
|
317
|
+
get leadingTrivia(): Token[];
|
|
318
|
+
clone(): AAMemberExpression;
|
|
215
319
|
}
|
|
216
320
|
export declare class AALiteralExpression extends Expression {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
321
|
+
constructor(options: {
|
|
322
|
+
elements: Array<AAMemberExpression>;
|
|
323
|
+
open?: Token;
|
|
324
|
+
close?: Token;
|
|
325
|
+
});
|
|
326
|
+
readonly elements: Array<AAMemberExpression>;
|
|
327
|
+
readonly tokens: {
|
|
328
|
+
readonly open?: Token;
|
|
329
|
+
readonly close?: Token;
|
|
330
|
+
};
|
|
331
|
+
readonly kind = AstNodeKind.AALiteralExpression;
|
|
332
|
+
readonly location: Location | undefined;
|
|
333
|
+
transpile(state: BrsTranspileState): TranspileResult;
|
|
223
334
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
335
|
+
getType(options: GetTypeOptions): BscType;
|
|
336
|
+
get leadingTrivia(): Token[];
|
|
337
|
+
get endTrivia(): Token[];
|
|
338
|
+
clone(): AALiteralExpression;
|
|
224
339
|
}
|
|
225
340
|
export declare class UnaryExpression extends Expression {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
341
|
+
constructor(options: {
|
|
342
|
+
operator: Token;
|
|
343
|
+
right: Expression;
|
|
344
|
+
});
|
|
345
|
+
readonly kind = AstNodeKind.UnaryExpression;
|
|
346
|
+
readonly location: Location | undefined;
|
|
347
|
+
readonly tokens: {
|
|
348
|
+
readonly operator: Token;
|
|
349
|
+
};
|
|
350
|
+
readonly right: Expression;
|
|
351
|
+
transpile(state: BrsTranspileState): (string | SourceNode | TranspileResult)[];
|
|
231
352
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
353
|
+
getType(options: GetTypeOptions): BscType;
|
|
354
|
+
get leadingTrivia(): Token[];
|
|
355
|
+
clone(): UnaryExpression;
|
|
232
356
|
}
|
|
233
357
|
export declare class VariableExpression extends Expression {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
readonly
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
358
|
+
constructor(options: {
|
|
359
|
+
name: Identifier;
|
|
360
|
+
});
|
|
361
|
+
readonly tokens: {
|
|
362
|
+
readonly name: Identifier;
|
|
363
|
+
};
|
|
364
|
+
readonly kind = AstNodeKind.VariableExpression;
|
|
365
|
+
readonly location: Location;
|
|
366
|
+
getName(parseMode?: ParseMode): string;
|
|
367
|
+
transpile(state: BrsTranspileState): TranspileResult;
|
|
368
|
+
getTypedef(state: BrsTranspileState): TranspileResult[];
|
|
241
369
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
370
|
+
getType(options: GetTypeOptions): BscType;
|
|
371
|
+
get leadingTrivia(): Token[];
|
|
372
|
+
clone(): VariableExpression;
|
|
242
373
|
}
|
|
243
374
|
export declare class SourceLiteralExpression extends Expression {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
375
|
+
constructor(options: {
|
|
376
|
+
value: Token;
|
|
377
|
+
});
|
|
378
|
+
readonly location: Location;
|
|
379
|
+
readonly kind = AstNodeKind.SourceLiteralExpression;
|
|
380
|
+
readonly tokens: {
|
|
381
|
+
readonly value: Token;
|
|
382
|
+
};
|
|
383
|
+
/**
|
|
384
|
+
* Find the index of the function in its parent
|
|
385
|
+
*/
|
|
386
|
+
private findFunctionIndex;
|
|
247
387
|
private getFunctionName;
|
|
248
|
-
|
|
388
|
+
/**
|
|
389
|
+
* Get the line number from our token or from the closest ancestor that has a range
|
|
390
|
+
*/
|
|
391
|
+
private getClosestLineNumber;
|
|
392
|
+
transpile(state: BrsTranspileState): SourceNode[];
|
|
249
393
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
394
|
+
get leadingTrivia(): Token[];
|
|
395
|
+
clone(): SourceLiteralExpression;
|
|
250
396
|
}
|
|
251
397
|
/**
|
|
252
398
|
* This expression transpiles and acts exactly like a CallExpression,
|
|
@@ -254,99 +400,285 @@ export declare class SourceLiteralExpression extends Expression {
|
|
|
254
400
|
* do more type checking.
|
|
255
401
|
*/
|
|
256
402
|
export declare class NewExpression extends Expression {
|
|
257
|
-
|
|
403
|
+
constructor(options: {
|
|
404
|
+
new?: Token;
|
|
405
|
+
call: CallExpression;
|
|
406
|
+
});
|
|
407
|
+
readonly kind = AstNodeKind.NewExpression;
|
|
408
|
+
readonly location: Location | undefined;
|
|
409
|
+
readonly tokens: {
|
|
410
|
+
readonly new?: Token;
|
|
411
|
+
};
|
|
258
412
|
readonly call: CallExpression;
|
|
259
|
-
constructor(newKeyword: Token, call: CallExpression);
|
|
260
413
|
/**
|
|
261
414
|
* The name of the class to initialize (with optional namespace prefixed)
|
|
262
415
|
*/
|
|
263
|
-
get className():
|
|
264
|
-
|
|
265
|
-
readonly range: Range;
|
|
266
|
-
transpile(state: BrsTranspileState): any[];
|
|
416
|
+
get className(): DottedGetExpression | VariableExpression;
|
|
417
|
+
transpile(state: BrsTranspileState): TranspileResult;
|
|
267
418
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
419
|
+
getType(options: GetTypeOptions): BscType;
|
|
420
|
+
get leadingTrivia(): Token[];
|
|
421
|
+
clone(): NewExpression;
|
|
268
422
|
}
|
|
269
423
|
export declare class CallfuncExpression extends Expression {
|
|
424
|
+
constructor(options: {
|
|
425
|
+
callee: Expression;
|
|
426
|
+
operator?: Token;
|
|
427
|
+
methodName: Identifier;
|
|
428
|
+
openingParen?: Token;
|
|
429
|
+
args?: Expression[];
|
|
430
|
+
closingParen?: Token;
|
|
431
|
+
});
|
|
270
432
|
readonly callee: Expression;
|
|
271
|
-
readonly operator: Token;
|
|
272
|
-
readonly methodName: Identifier;
|
|
273
|
-
readonly openingParen: Token;
|
|
274
433
|
readonly args: Expression[];
|
|
275
|
-
readonly
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
434
|
+
readonly tokens: {
|
|
435
|
+
readonly operator: Token;
|
|
436
|
+
readonly methodName: Identifier;
|
|
437
|
+
readonly openingParen?: Token;
|
|
438
|
+
readonly closingParen?: Token;
|
|
439
|
+
};
|
|
440
|
+
readonly kind = AstNodeKind.CallfuncExpression;
|
|
441
|
+
readonly location: Location | undefined;
|
|
442
|
+
transpile(state: BrsTranspileState): TranspileResult;
|
|
279
443
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
444
|
+
getType(options: GetTypeOptions): BscType;
|
|
445
|
+
get leadingTrivia(): Token[];
|
|
446
|
+
clone(): CallfuncExpression;
|
|
280
447
|
}
|
|
281
448
|
/**
|
|
282
449
|
* Since template strings can contain newlines, we need to concatenate multiple strings together with chr() calls.
|
|
283
450
|
* This is a single expression that represents the string contatenation of all parts of a single quasi.
|
|
284
451
|
*/
|
|
285
452
|
export declare class TemplateStringQuasiExpression extends Expression {
|
|
453
|
+
constructor(options: {
|
|
454
|
+
expressions: Array<LiteralExpression | EscapedCharCodeLiteralExpression>;
|
|
455
|
+
});
|
|
286
456
|
readonly expressions: Array<LiteralExpression | EscapedCharCodeLiteralExpression>;
|
|
287
|
-
|
|
288
|
-
readonly
|
|
289
|
-
transpile(state: BrsTranspileState, skipEmptyStrings?: boolean):
|
|
457
|
+
readonly kind = AstNodeKind.TemplateStringQuasiExpression;
|
|
458
|
+
readonly location: Location | undefined;
|
|
459
|
+
transpile(state: BrsTranspileState, skipEmptyStrings?: boolean): TranspileResult;
|
|
290
460
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
461
|
+
clone(): TemplateStringQuasiExpression;
|
|
291
462
|
}
|
|
292
463
|
export declare class TemplateStringExpression extends Expression {
|
|
293
|
-
|
|
464
|
+
constructor(options: {
|
|
465
|
+
openingBacktick?: Token;
|
|
466
|
+
quasis: TemplateStringQuasiExpression[];
|
|
467
|
+
expressions: Expression[];
|
|
468
|
+
closingBacktick?: Token;
|
|
469
|
+
});
|
|
470
|
+
readonly kind = AstNodeKind.TemplateStringExpression;
|
|
471
|
+
readonly tokens: {
|
|
472
|
+
readonly openingBacktick?: Token;
|
|
473
|
+
readonly closingBacktick?: Token;
|
|
474
|
+
};
|
|
294
475
|
readonly quasis: TemplateStringQuasiExpression[];
|
|
295
476
|
readonly expressions: Expression[];
|
|
296
|
-
readonly
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
transpile(state: BrsTranspileState): any[];
|
|
477
|
+
readonly location: Location | undefined;
|
|
478
|
+
getType(options: GetTypeOptions): StringType;
|
|
479
|
+
transpile(state: BrsTranspileState): TranspileResult;
|
|
300
480
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
481
|
+
clone(): TemplateStringExpression;
|
|
301
482
|
}
|
|
302
483
|
export declare class TaggedTemplateStringExpression extends Expression {
|
|
303
|
-
|
|
304
|
-
|
|
484
|
+
constructor(options: {
|
|
485
|
+
tagName: Identifier;
|
|
486
|
+
openingBacktick?: Token;
|
|
487
|
+
quasis: TemplateStringQuasiExpression[];
|
|
488
|
+
expressions: Expression[];
|
|
489
|
+
closingBacktick?: Token;
|
|
490
|
+
});
|
|
491
|
+
readonly kind = AstNodeKind.TaggedTemplateStringExpression;
|
|
492
|
+
readonly tokens: {
|
|
493
|
+
readonly tagName: Identifier;
|
|
494
|
+
readonly openingBacktick?: Token;
|
|
495
|
+
readonly closingBacktick?: Token;
|
|
496
|
+
};
|
|
305
497
|
readonly quasis: TemplateStringQuasiExpression[];
|
|
306
498
|
readonly expressions: Expression[];
|
|
307
|
-
readonly
|
|
308
|
-
|
|
309
|
-
readonly range: Range;
|
|
310
|
-
transpile(state: BrsTranspileState): any[];
|
|
499
|
+
readonly location: Location | undefined;
|
|
500
|
+
transpile(state: BrsTranspileState): TranspileResult;
|
|
311
501
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
502
|
+
clone(): TaggedTemplateStringExpression;
|
|
312
503
|
}
|
|
313
504
|
export declare class AnnotationExpression extends Expression {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
505
|
+
constructor(options: {
|
|
506
|
+
at?: Token;
|
|
507
|
+
name: Token;
|
|
508
|
+
call?: CallExpression;
|
|
509
|
+
});
|
|
510
|
+
readonly kind = AstNodeKind.AnnotationExpression;
|
|
511
|
+
readonly tokens: {
|
|
512
|
+
readonly at: Token;
|
|
513
|
+
readonly name: Token;
|
|
514
|
+
};
|
|
515
|
+
get location(): Location | undefined;
|
|
516
|
+
readonly name: string;
|
|
319
517
|
call: CallExpression;
|
|
320
518
|
/**
|
|
321
519
|
* Convert annotation arguments to JavaScript types
|
|
322
520
|
* @param strict If false, keep Expression objects not corresponding to JS types
|
|
323
521
|
*/
|
|
324
522
|
getArguments(strict?: boolean): ExpressionValue[];
|
|
325
|
-
|
|
523
|
+
get leadingTrivia(): Token[];
|
|
524
|
+
transpile(state: BrsTranspileState): (string | SourceNode)[];
|
|
326
525
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
327
|
-
getTypedef(state: BrsTranspileState):
|
|
526
|
+
getTypedef(state: BrsTranspileState): (string | SourceNode | TranspileResult)[];
|
|
527
|
+
clone(): AnnotationExpression;
|
|
328
528
|
}
|
|
329
529
|
export declare class TernaryExpression extends Expression {
|
|
530
|
+
constructor(options: {
|
|
531
|
+
test: Expression;
|
|
532
|
+
questionMark?: Token;
|
|
533
|
+
consequent?: Expression;
|
|
534
|
+
colon?: Token;
|
|
535
|
+
alternate?: Expression;
|
|
536
|
+
});
|
|
537
|
+
readonly kind = AstNodeKind.TernaryExpression;
|
|
538
|
+
readonly location: Location | undefined;
|
|
539
|
+
readonly tokens: {
|
|
540
|
+
readonly questionMark?: Token;
|
|
541
|
+
readonly colon?: Token;
|
|
542
|
+
};
|
|
330
543
|
readonly test: Expression;
|
|
331
|
-
readonly questionMarkToken: Token;
|
|
332
544
|
readonly consequent?: Expression;
|
|
333
|
-
readonly colonToken?: Token;
|
|
334
545
|
readonly alternate?: Expression;
|
|
335
|
-
|
|
336
|
-
range: Range;
|
|
337
|
-
transpile(state: BrsTranspileState): any[];
|
|
546
|
+
transpile(state: BrsTranspileState): TranspileResult;
|
|
338
547
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
548
|
+
get leadingTrivia(): Token[];
|
|
549
|
+
clone(): TernaryExpression;
|
|
339
550
|
}
|
|
340
551
|
export declare class NullCoalescingExpression extends Expression {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
552
|
+
constructor(options: {
|
|
553
|
+
consequent: Expression;
|
|
554
|
+
questionQuestion?: Token;
|
|
555
|
+
alternate: Expression;
|
|
556
|
+
});
|
|
557
|
+
readonly kind = AstNodeKind.NullCoalescingExpression;
|
|
558
|
+
readonly location: Location | undefined;
|
|
559
|
+
readonly tokens: {
|
|
560
|
+
readonly questionQuestion?: Token;
|
|
561
|
+
};
|
|
562
|
+
readonly consequent: Expression;
|
|
563
|
+
readonly alternate: Expression;
|
|
564
|
+
transpile(state: BrsTranspileState): TranspileResult;
|
|
565
|
+
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
566
|
+
get leadingTrivia(): Token[];
|
|
567
|
+
clone(): NullCoalescingExpression;
|
|
568
|
+
}
|
|
569
|
+
export declare class RegexLiteralExpression extends Expression {
|
|
570
|
+
constructor(options: {
|
|
571
|
+
regexLiteral: Token;
|
|
572
|
+
});
|
|
573
|
+
readonly kind = AstNodeKind.RegexLiteralExpression;
|
|
574
|
+
readonly tokens: {
|
|
575
|
+
readonly regexLiteral: Token;
|
|
576
|
+
};
|
|
577
|
+
get location(): Location;
|
|
578
|
+
transpile(state: BrsTranspileState): TranspileResult;
|
|
347
579
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
580
|
+
clone(): RegexLiteralExpression;
|
|
581
|
+
get leadingTrivia(): Token[];
|
|
348
582
|
}
|
|
349
583
|
declare type ExpressionValue = string | number | boolean | Expression | ExpressionValue[] | {
|
|
350
584
|
[key: string]: ExpressionValue;
|
|
351
|
-
};
|
|
585
|
+
} | null;
|
|
586
|
+
export declare class TypeExpression extends Expression implements TypedefProvider {
|
|
587
|
+
constructor(options: {
|
|
588
|
+
/**
|
|
589
|
+
* The standard AST expression that represents the type for this TypeExpression.
|
|
590
|
+
*/
|
|
591
|
+
expression: Expression;
|
|
592
|
+
});
|
|
593
|
+
readonly kind = AstNodeKind.TypeExpression;
|
|
594
|
+
/**
|
|
595
|
+
* The standard AST expression that represents the type for this TypeExpression.
|
|
596
|
+
*/
|
|
597
|
+
readonly expression: Expression;
|
|
598
|
+
readonly location: Location;
|
|
599
|
+
transpile(state: BrsTranspileState): TranspileResult;
|
|
600
|
+
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
601
|
+
getType(options: GetTypeOptions): BscType;
|
|
602
|
+
getTypedef(state: TranspileState): TranspileResult;
|
|
603
|
+
getName(parseMode?: ParseMode): string;
|
|
604
|
+
getNameParts(): string[];
|
|
605
|
+
clone(): TypeExpression;
|
|
606
|
+
}
|
|
607
|
+
export declare class TypecastExpression extends Expression {
|
|
608
|
+
constructor(options: {
|
|
609
|
+
obj: Expression;
|
|
610
|
+
as?: Token;
|
|
611
|
+
typeExpression?: TypeExpression;
|
|
612
|
+
});
|
|
613
|
+
readonly kind = AstNodeKind.TypecastExpression;
|
|
614
|
+
readonly obj: Expression;
|
|
615
|
+
readonly tokens: {
|
|
616
|
+
readonly as?: Token;
|
|
617
|
+
};
|
|
618
|
+
typeExpression?: TypeExpression;
|
|
619
|
+
readonly location: Location;
|
|
620
|
+
transpile(state: BrsTranspileState): TranspileResult;
|
|
621
|
+
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
622
|
+
getType(options: GetTypeOptions): BscType;
|
|
623
|
+
clone(): TypecastExpression;
|
|
624
|
+
}
|
|
625
|
+
export declare class TypedArrayExpression extends Expression {
|
|
626
|
+
constructor(options: {
|
|
627
|
+
innerType: Expression;
|
|
628
|
+
leftBracket?: Token;
|
|
629
|
+
rightBracket?: Token;
|
|
630
|
+
});
|
|
631
|
+
readonly tokens: {
|
|
632
|
+
readonly leftBracket?: Token;
|
|
633
|
+
readonly rightBracket?: Token;
|
|
634
|
+
};
|
|
635
|
+
readonly innerType: Expression;
|
|
636
|
+
readonly kind = AstNodeKind.TypedArrayExpression;
|
|
637
|
+
readonly location: Location;
|
|
638
|
+
transpile(state: BrsTranspileState): TranspileResult;
|
|
639
|
+
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
640
|
+
getType(options: GetTypeOptions): BscType;
|
|
641
|
+
clone(): TypedArrayExpression;
|
|
642
|
+
}
|
|
643
|
+
export declare class InlineInterfaceExpression extends Expression {
|
|
644
|
+
constructor(options: {
|
|
645
|
+
open?: Token;
|
|
646
|
+
members: InlineInterfaceMemberExpression[];
|
|
647
|
+
close?: Token;
|
|
648
|
+
});
|
|
649
|
+
readonly tokens: {
|
|
650
|
+
readonly open?: Token;
|
|
651
|
+
readonly close?: Token;
|
|
652
|
+
};
|
|
653
|
+
readonly members: InlineInterfaceMemberExpression[];
|
|
654
|
+
readonly kind = AstNodeKind.InlineInterfaceExpression;
|
|
655
|
+
readonly location: Location;
|
|
656
|
+
get leadingTrivia(): Token[];
|
|
657
|
+
transpile(state: BrsTranspileState): TranspileResult;
|
|
658
|
+
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
659
|
+
getType(options: GetTypeOptions): BscType;
|
|
660
|
+
clone(): InlineInterfaceExpression;
|
|
661
|
+
}
|
|
662
|
+
export declare class InlineInterfaceMemberExpression extends Expression {
|
|
663
|
+
constructor(options: {
|
|
664
|
+
optional?: Token;
|
|
665
|
+
name: Token;
|
|
666
|
+
as?: Token;
|
|
667
|
+
typeExpression?: TypeExpression;
|
|
668
|
+
});
|
|
669
|
+
readonly kind = AstNodeKind.InlineInterfaceMemberExpression;
|
|
670
|
+
readonly tokens: {
|
|
671
|
+
readonly optional?: Token;
|
|
672
|
+
readonly name: Token;
|
|
673
|
+
readonly as?: Token;
|
|
674
|
+
};
|
|
675
|
+
readonly typeExpression?: TypeExpression;
|
|
676
|
+
readonly location: Location;
|
|
677
|
+
get leadingTrivia(): Token[];
|
|
678
|
+
transpile(state: BrsTranspileState): TranspileResult;
|
|
679
|
+
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
680
|
+
getType(options: GetTypeOptions): BscType;
|
|
681
|
+
get isOptional(): boolean;
|
|
682
|
+
clone(): InlineInterfaceMemberExpression;
|
|
683
|
+
}
|
|
352
684
|
export {};
|