brighterscript 1.0.0-alpha.5 → 1.0.0-alpha.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -138
- package/bsconfig.schema.json +196 -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 +161 -43
- 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 +29 -4
- package/dist/CodeActionUtil.js +22 -5
- package/dist/CodeActionUtil.js.map +1 -1
- package/dist/CommentFlagProcessor.d.ts +20 -15
- package/dist/CommentFlagProcessor.js +143 -58
- package/dist/CommentFlagProcessor.js.map +1 -1
- package/dist/CrossScopeValidator.d.ts +68 -0
- package/dist/CrossScopeValidator.js +650 -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 +83 -0
- package/dist/DiagnosticManager.js +422 -0
- package/dist/DiagnosticManager.js.map +1 -0
- package/dist/DiagnosticMessages.d.ts +602 -196
- package/dist/DiagnosticMessages.js +926 -342
- 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 +136 -104
- package/dist/LanguageServer.js +577 -741
- 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 +302 -98
- package/dist/Program.js +1613 -726
- package/dist/Program.js.map +1 -1
- package/dist/ProgramBuilder.d.ts +39 -22
- package/dist/ProgramBuilder.js +245 -179
- package/dist/ProgramBuilder.js.map +1 -1
- package/dist/Scope.d.ts +227 -106
- package/dist/Scope.js +609 -557
- package/dist/Scope.js.map +1 -1
- package/dist/ScopeNamespaceLookup.d.ts +73 -0
- package/dist/ScopeNamespaceLookup.js +242 -0
- package/dist/ScopeNamespaceLookup.js.map +1 -0
- 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 +145 -26
- package/dist/SymbolTable.js +575 -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 +337 -0
- package/dist/astUtils/CachedLookups.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/creators.d.ts +54 -19
- package/dist/astUtils/creators.js +242 -42
- package/dist/astUtils/creators.js.map +1 -1
- package/dist/astUtils/reflection.d.ts +199 -85
- package/dist/astUtils/reflection.js +518 -145
- package/dist/astUtils/reflection.js.map +1 -1
- package/dist/astUtils/stackedVisitor.js.map +1 -1
- package/dist/astUtils/visitors.d.ts +117 -53
- package/dist/astUtils/visitors.js +95 -15
- package/dist/astUtils/visitors.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 +26 -4
- package/dist/bscPlugin/BscPlugin.js +96 -4
- package/dist/bscPlugin/BscPlugin.js.map +1 -1
- package/dist/bscPlugin/CallExpressionInfo.d.ts +36 -0
- package/dist/bscPlugin/CallExpressionInfo.js +142 -0
- package/dist/bscPlugin/CallExpressionInfo.js.map +1 -0
- package/dist/bscPlugin/FileWriter.d.ts +19 -0
- package/dist/bscPlugin/FileWriter.js +79 -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 +109 -7
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js +676 -26
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js.map +1 -1
- package/dist/bscPlugin/codeActions/FixAllCodeActionsProcessor.d.ts +17 -0
- package/dist/bscPlugin/codeActions/FixAllCodeActionsProcessor.js +66 -0
- package/dist/bscPlugin/codeActions/FixAllCodeActionsProcessor.js.map +1 -0
- package/dist/bscPlugin/codeActions/codeActionHelpers.d.ts +18 -0
- package/dist/bscPlugin/codeActions/codeActionHelpers.js +31 -0
- package/dist/bscPlugin/codeActions/codeActionHelpers.js.map +1 -0
- 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/definition/DefinitionProvider.d.ts +13 -0
- package/dist/bscPlugin/definition/DefinitionProvider.js +220 -0
- package/dist/bscPlugin/definition/DefinitionProvider.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 +238 -0
- package/dist/bscPlugin/hover/HoverProcessor.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/selectionRanges/SelectionRangesProcessor.d.ts +7 -0
- package/dist/bscPlugin/selectionRanges/SelectionRangesProcessor.js +77 -0
- package/dist/bscPlugin/selectionRanges/SelectionRangesProcessor.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/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 +80 -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/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/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 +34 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js +504 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.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 +51 -0
- package/dist/bscPlugin/validation/BrsFileValidator.js +714 -0
- package/dist/bscPlugin/validation/BrsFileValidator.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 +158 -0
- package/dist/bscPlugin/validation/ScopeValidator.js +1481 -0
- package/dist/bscPlugin/validation/ScopeValidator.js.map +1 -0
- package/dist/bscPlugin/validation/XmlFileValidator.d.ts +8 -0
- package/dist/bscPlugin/validation/XmlFileValidator.js +50 -0
- package/dist/bscPlugin/validation/XmlFileValidator.js.map +1 -0
- package/dist/cli.js +140 -28
- 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/deferred.d.ts +5 -3
- package/dist/deferred.js +10 -0
- package/dist/deferred.js.map +1 -1
- package/dist/diagnosticUtils.d.ts +61 -4
- package/dist/diagnosticUtils.js +285 -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.d.ts +161 -87
- package/dist/files/BrsFile.js +919 -936
- package/dist/files/BrsFile.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/XmlFile.d.ts +80 -41
- package/dist/files/XmlFile.js +162 -137
- package/dist/files/XmlFile.js.map +1 -1
- 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 +987 -125
- package/dist/interfaces.js +21 -0
- package/dist/interfaces.js.map +1 -1
- package/dist/lexer/Lexer.d.ts +51 -12
- package/dist/lexer/Lexer.js +214 -65
- package/dist/lexer/Lexer.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 +48 -2
- package/dist/lexer/TokenKind.js +167 -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/DocumentManager.d.ts +63 -0
- package/dist/lsp/DocumentManager.js +122 -0
- package/dist/lsp/DocumentManager.js.map +1 -0
- package/dist/lsp/LspProject.d.ts +287 -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/Project.d.ts +200 -0
- package/dist/lsp/Project.js +562 -0
- package/dist/lsp/Project.js.map +1 -0
- package/dist/lsp/ProjectManager.d.ts +288 -0
- package/dist/lsp/ProjectManager.js +967 -0
- package/dist/lsp/ProjectManager.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/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/WorkerThreadProject.d.ts +168 -0
- package/dist/lsp/worker/WorkerThreadProject.js +205 -0
- package/dist/lsp/worker/WorkerThreadProject.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.js +14 -0
- package/dist/lsp/worker/run.js.map +1 -0
- package/dist/parser/AstNode.d.ts +205 -0
- package/dist/parser/AstNode.js +305 -0
- package/dist/parser/AstNode.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/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 +601 -220
- package/dist/parser/Expression.js +1516 -502
- package/dist/parser/Expression.js.map +1 -1
- package/dist/parser/Parser.d.ts +137 -121
- package/dist/parser/Parser.js +1808 -982
- package/dist/parser/Parser.js.map +1 -1
- package/dist/parser/SGParser.d.ts +30 -13
- package/dist/parser/SGParser.js +94 -56
- package/dist/parser/SGParser.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 +854 -267
- package/dist/parser/Statement.js +2416 -621
- package/dist/parser/Statement.js.map +1 -1
- package/dist/parser/TranspileState.d.ts +30 -14
- package/dist/parser/TranspileState.js +124 -27
- package/dist/parser/TranspileState.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/roku-types/data.json +20554 -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 +95 -25
- package/dist/types/ArrayType.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/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/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 +63 -0
- package/dist/types/ClassType.js.map +1 -0
- package/dist/types/ComponentType.d.ts +22 -0
- package/dist/types/ComponentType.js +110 -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/DynamicType.d.ts +13 -5
- package/dist/types/DynamicType.js +26 -5
- package/dist/types/DynamicType.js.map +1 -1
- package/dist/types/EnumType.d.ts +42 -0
- package/dist/types/EnumType.js +101 -0
- package/dist/types/EnumType.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/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/InterfaceType.d.ts +14 -6
- package/dist/types/InterfaceType.js +30 -15
- package/dist/types/InterfaceType.js.map +1 -1
- package/dist/types/IntersectionType.d.ts +29 -0
- package/dist/types/IntersectionType.js +256 -0
- package/dist/types/IntersectionType.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/LongIntegerType.d.ts +10 -5
- package/dist/types/LongIntegerType.js +21 -17
- package/dist/types/LongIntegerType.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/ReferenceType.d.ts +123 -0
- package/dist/types/ReferenceType.js +726 -0
- package/dist/types/ReferenceType.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/TypeStatementType.d.ts +19 -0
- package/dist/types/TypeStatementType.js +56 -0
- package/dist/types/TypeStatementType.js.map +1 -0
- package/dist/types/TypedFunctionType.d.ts +34 -0
- package/dist/types/TypedFunctionType.js +157 -0
- package/dist/types/TypedFunctionType.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 +196 -0
- package/dist/types/UnionType.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/helpers.d.ts +51 -0
- package/dist/types/helpers.js +329 -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/util.d.ts +325 -185
- package/dist/util.js +2135 -568
- 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 +183 -138
- package/CHANGELOG.md +0 -1188
- package/dist/astUtils/creators.spec.js +0 -21
- package/dist/astUtils/creators.spec.js.map +0 -1
- 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/astUtils/reflection.spec.d.ts +0 -1
- package/dist/astUtils/reflection.spec.js +0 -292
- package/dist/astUtils/reflection.spec.js.map +0 -1
- package/dist/astUtils/stackedVisitor.spec.d.ts +0 -1
- package/dist/astUtils/stackedVisitor.spec.js +0 -79
- package/dist/astUtils/stackedVisitor.spec.js.map +0 -1
- package/dist/astUtils/visitors.spec.d.ts +0 -1
- package/dist/astUtils/visitors.spec.js +0 -854
- package/dist/astUtils/visitors.spec.js.map +0 -1
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.d.ts +0 -1
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js +0 -194
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.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.d.ts +0 -1
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.js +0 -45
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.js.map +0 -1
- package/dist/files/BrsFile.Class.spec.d.ts +0 -1
- package/dist/files/BrsFile.Class.spec.js +0 -1081
- package/dist/files/BrsFile.Class.spec.js.map +0 -1
- package/dist/files/BrsFile.spec.d.ts +0 -1
- package/dist/files/BrsFile.spec.js +0 -2524
- package/dist/files/BrsFile.spec.js.map +0 -1
- package/dist/files/XmlFile.spec.d.ts +0 -1
- package/dist/files/XmlFile.spec.js +0 -1065
- package/dist/files/XmlFile.spec.js.map +0 -1
- package/dist/files/tests/imports.spec.d.ts +0 -1
- package/dist/files/tests/imports.spec.js +0 -241
- package/dist/files/tests/imports.spec.js.map +0 -1
- package/dist/lexer/Character.spec.d.ts +0 -1
- package/dist/lexer/Character.spec.js +0 -27
- package/dist/lexer/Character.spec.js.map +0 -1
- package/dist/lexer/Lexer.spec.d.ts +0 -1
- package/dist/lexer/Lexer.spec.js +0 -1101
- package/dist/lexer/Lexer.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/Parser.Class.spec.d.ts +0 -1
- package/dist/parser/Parser.Class.spec.js +0 -390
- package/dist/parser/Parser.Class.spec.js.map +0 -1
- package/dist/parser/Parser.spec.d.ts +0 -4
- package/dist/parser/Parser.spec.js +0 -1216
- package/dist/parser/Parser.spec.js.map +0 -1
- package/dist/parser/SGParser.spec.d.ts +0 -1
- package/dist/parser/SGParser.spec.js +0 -145
- package/dist/parser/SGParser.spec.js.map +0 -1
- package/dist/parser/SGTypes.spec.d.ts +0 -1
- package/dist/parser/SGTypes.spec.js +0 -351
- package/dist/parser/SGTypes.spec.js.map +0 -1
- package/dist/parser/Statement.spec.d.ts +0 -1
- package/dist/parser/Statement.spec.js +0 -94
- package/dist/parser/Statement.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/parser/tests/Parser.spec.d.ts +0 -18
- package/dist/parser/tests/Parser.spec.js +0 -35
- package/dist/parser/tests/Parser.spec.js.map +0 -1
- package/dist/parser/tests/controlFlow/For.spec.d.ts +0 -1
- package/dist/parser/tests/controlFlow/For.spec.js +0 -161
- package/dist/parser/tests/controlFlow/For.spec.js.map +0 -1
- package/dist/parser/tests/controlFlow/ForEach.spec.d.ts +0 -1
- package/dist/parser/tests/controlFlow/ForEach.spec.js +0 -106
- package/dist/parser/tests/controlFlow/ForEach.spec.js.map +0 -1
- package/dist/parser/tests/controlFlow/If.spec.d.ts +0 -1
- package/dist/parser/tests/controlFlow/If.spec.js +0 -551
- package/dist/parser/tests/controlFlow/If.spec.js.map +0 -1
- package/dist/parser/tests/controlFlow/While.spec.d.ts +0 -1
- package/dist/parser/tests/controlFlow/While.spec.js +0 -107
- package/dist/parser/tests/controlFlow/While.spec.js.map +0 -1
- package/dist/parser/tests/expression/Additive.spec.d.ts +0 -1
- package/dist/parser/tests/expression/Additive.spec.js +0 -99
- package/dist/parser/tests/expression/Additive.spec.js.map +0 -1
- package/dist/parser/tests/expression/ArrayLiterals.spec.d.ts +0 -1
- package/dist/parser/tests/expression/ArrayLiterals.spec.js +0 -254
- package/dist/parser/tests/expression/ArrayLiterals.spec.js.map +0 -1
- package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.d.ts +0 -1
- package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js +0 -266
- package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js.map +0 -1
- package/dist/parser/tests/expression/Boolean.spec.d.ts +0 -1
- package/dist/parser/tests/expression/Boolean.spec.js +0 -83
- package/dist/parser/tests/expression/Boolean.spec.js.map +0 -1
- package/dist/parser/tests/expression/Call.spec.d.ts +0 -1
- package/dist/parser/tests/expression/Call.spec.js +0 -134
- package/dist/parser/tests/expression/Call.spec.js.map +0 -1
- package/dist/parser/tests/expression/Exponential.spec.d.ts +0 -1
- package/dist/parser/tests/expression/Exponential.spec.js +0 -37
- package/dist/parser/tests/expression/Exponential.spec.js.map +0 -1
- package/dist/parser/tests/expression/Function.spec.d.ts +0 -1
- package/dist/parser/tests/expression/Function.spec.js +0 -403
- package/dist/parser/tests/expression/Function.spec.js.map +0 -1
- package/dist/parser/tests/expression/Indexing.spec.d.ts +0 -1
- package/dist/parser/tests/expression/Indexing.spec.js +0 -219
- package/dist/parser/tests/expression/Indexing.spec.js.map +0 -1
- package/dist/parser/tests/expression/Multiplicative.spec.d.ts +0 -1
- package/dist/parser/tests/expression/Multiplicative.spec.js +0 -67
- package/dist/parser/tests/expression/Multiplicative.spec.js.map +0 -1
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.d.ts +0 -1
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js +0 -201
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js.map +0 -1
- package/dist/parser/tests/expression/PrefixUnary.spec.d.ts +0 -1
- package/dist/parser/tests/expression/PrefixUnary.spec.js +0 -105
- package/dist/parser/tests/expression/PrefixUnary.spec.js.map +0 -1
- package/dist/parser/tests/expression/Primary.spec.d.ts +0 -1
- package/dist/parser/tests/expression/Primary.spec.js +0 -149
- package/dist/parser/tests/expression/Primary.spec.js.map +0 -1
- package/dist/parser/tests/expression/Relational.spec.d.ts +0 -1
- package/dist/parser/tests/expression/Relational.spec.js +0 -83
- package/dist/parser/tests/expression/Relational.spec.js.map +0 -1
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.d.ts +0 -1
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.js +0 -201
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.js.map +0 -1
- package/dist/parser/tests/expression/TemplateStringExpression.spec.d.ts +0 -1
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js +0 -202
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js.map +0 -1
- package/dist/parser/tests/expression/TernaryExpression.spec.d.ts +0 -1
- package/dist/parser/tests/expression/TernaryExpression.spec.js +0 -323
- package/dist/parser/tests/expression/TernaryExpression.spec.js.map +0 -1
- package/dist/parser/tests/statement/AssignmentOperators.spec.d.ts +0 -1
- package/dist/parser/tests/statement/AssignmentOperators.spec.js +0 -79
- package/dist/parser/tests/statement/AssignmentOperators.spec.js.map +0 -1
- package/dist/parser/tests/statement/Declaration.spec.d.ts +0 -1
- package/dist/parser/tests/statement/Declaration.spec.js +0 -108
- package/dist/parser/tests/statement/Declaration.spec.js.map +0 -1
- package/dist/parser/tests/statement/Dim.spec.d.ts +0 -1
- package/dist/parser/tests/statement/Dim.spec.js +0 -73
- package/dist/parser/tests/statement/Dim.spec.js.map +0 -1
- package/dist/parser/tests/statement/Function.spec.d.ts +0 -1
- package/dist/parser/tests/statement/Function.spec.js +0 -332
- package/dist/parser/tests/statement/Function.spec.js.map +0 -1
- package/dist/parser/tests/statement/Goto.spec.d.ts +0 -1
- package/dist/parser/tests/statement/Goto.spec.js +0 -50
- package/dist/parser/tests/statement/Goto.spec.js.map +0 -1
- package/dist/parser/tests/statement/Increment.spec.d.ts +0 -1
- package/dist/parser/tests/statement/Increment.spec.js +0 -117
- package/dist/parser/tests/statement/Increment.spec.js.map +0 -1
- package/dist/parser/tests/statement/LibraryStatement.spec.d.ts +0 -1
- package/dist/parser/tests/statement/LibraryStatement.spec.js +0 -74
- package/dist/parser/tests/statement/LibraryStatement.spec.js.map +0 -1
- package/dist/parser/tests/statement/Misc.spec.d.ts +0 -1
- package/dist/parser/tests/statement/Misc.spec.js +0 -333
- package/dist/parser/tests/statement/Misc.spec.js.map +0 -1
- package/dist/parser/tests/statement/PrintStatement.spec.d.ts +0 -1
- package/dist/parser/tests/statement/PrintStatement.spec.js +0 -181
- package/dist/parser/tests/statement/PrintStatement.spec.js.map +0 -1
- package/dist/parser/tests/statement/ReturnStatement.spec.d.ts +0 -1
- package/dist/parser/tests/statement/ReturnStatement.spec.js +0 -94
- package/dist/parser/tests/statement/ReturnStatement.spec.js.map +0 -1
- package/dist/parser/tests/statement/Set.spec.d.ts +0 -1
- package/dist/parser/tests/statement/Set.spec.js +0 -218
- package/dist/parser/tests/statement/Set.spec.js.map +0 -1
- package/dist/parser/tests/statement/Stop.spec.d.ts +0 -1
- package/dist/parser/tests/statement/Stop.spec.js +0 -37
- package/dist/parser/tests/statement/Stop.spec.js.map +0 -1
- package/dist/parser/tests/statement/Throw.spec.d.ts +0 -1
- package/dist/parser/tests/statement/Throw.spec.js +0 -35
- package/dist/parser/tests/statement/Throw.spec.js.map +0 -1
- package/dist/parser/tests/statement/TryCatch.spec.d.ts +0 -1
- package/dist/parser/tests/statement/TryCatch.spec.js +0 -140
- package/dist/parser/tests/statement/TryCatch.spec.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/Manifest.spec.d.ts +0 -0
- package/dist/preprocessor/Manifest.spec.js +0 -105
- package/dist/preprocessor/Manifest.spec.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.d.ts +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.d.ts +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/ArrayType.spec.d.ts +0 -1
- package/dist/types/ArrayType.spec.js +0 -30
- package/dist/types/ArrayType.spec.js.map +0 -1
- package/dist/types/BooleanType.spec.d.ts +0 -1
- package/dist/types/BooleanType.spec.js +0 -12
- package/dist/types/BooleanType.spec.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/DoubleType.spec.d.ts +0 -1
- package/dist/types/DoubleType.spec.js +0 -12
- package/dist/types/DoubleType.spec.js.map +0 -1
- package/dist/types/DynamicType.spec.d.ts +0 -1
- package/dist/types/DynamicType.spec.js +0 -12
- package/dist/types/DynamicType.spec.js.map +0 -1
- package/dist/types/FloatType.spec.d.ts +0 -1
- package/dist/types/FloatType.spec.js +0 -12
- package/dist/types/FloatType.spec.js.map +0 -1
- package/dist/types/FunctionType.spec.d.ts +0 -1
- package/dist/types/FunctionType.spec.js +0 -29
- package/dist/types/FunctionType.spec.js.map +0 -1
- package/dist/types/IntegerType.spec.d.ts +0 -1
- package/dist/types/IntegerType.spec.js +0 -12
- package/dist/types/IntegerType.spec.js.map +0 -1
- package/dist/types/InvalidType.spec.d.ts +0 -1
- package/dist/types/InvalidType.spec.js +0 -12
- package/dist/types/InvalidType.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/types/LongIntegerType.spec.d.ts +0 -1
- package/dist/types/LongIntegerType.spec.js +0 -12
- package/dist/types/LongIntegerType.spec.js.map +0 -1
- package/dist/types/ObjectType.spec.d.ts +0 -1
- package/dist/types/ObjectType.spec.js +0 -12
- package/dist/types/ObjectType.spec.js.map +0 -1
- package/dist/types/StringType.spec.d.ts +0 -1
- package/dist/types/StringType.spec.js +0 -12
- package/dist/types/StringType.spec.js.map +0 -1
- package/dist/types/VoidType.spec.d.ts +0 -1
- package/dist/types/VoidType.spec.js +0 -12
- package/dist/types/VoidType.spec.js.map +0 -1
- /package/dist/{astUtils/creators.spec.d.ts → lsp/worker/run.d.ts} +0 -0
package/dist/files/BrsFile.d.ts
CHANGED
|
@@ -1,73 +1,130 @@
|
|
|
1
1
|
import type { CodeWithSourceMap } from 'source-map';
|
|
2
|
-
import type { CompletionItem,
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import type {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
2
|
+
import type { CompletionItem, Position, Location } from 'vscode-languageserver';
|
|
3
|
+
import type { NamespaceFileContribution } from '../Scope';
|
|
4
|
+
import { SymbolTable } from '../SymbolTable';
|
|
5
|
+
import { FunctionScope } from '../FunctionScope';
|
|
6
|
+
import type { Callable, CommentFlag, FileReference, FileLink, SerializedCodeFile } from '../interfaces';
|
|
7
|
+
import type { NamespaceContainer } from '../Scope';
|
|
8
|
+
import type { Token } from '../lexer/Token';
|
|
9
|
+
import { TokenKind } from '../lexer/TokenKind';
|
|
10
|
+
import { Parser, ParseMode } from '../parser/Parser';
|
|
11
|
+
import type { FunctionExpression } from '../parser/Expression';
|
|
12
|
+
import type { ClassStatement, NamespaceStatement, MethodStatement } from '../parser/Statement';
|
|
13
|
+
import type { Program } from '../Program';
|
|
14
|
+
import type { DependencyChangedEvent, DependencyGraph } from '../DependencyGraph';
|
|
15
|
+
import type { AstNode, Expression } from '../parser/AstNode';
|
|
16
|
+
import type { UnresolvedSymbol, AssignedSymbol } from '../AstValidationSegmenter';
|
|
17
|
+
import { AstValidationSegmenter } from '../AstValidationSegmenter';
|
|
18
|
+
import type { BscSymbol } from '../SymbolTable';
|
|
19
|
+
import { SymbolTypeFlag } from '../SymbolTypeFlag';
|
|
20
|
+
import { Editor } from '../astUtils/Editor';
|
|
21
|
+
import type { BscFile } from './BscFile';
|
|
22
|
+
export interface ProvidedSymbol {
|
|
23
|
+
symbol: BscSymbol;
|
|
24
|
+
duplicates: BscSymbol[];
|
|
25
|
+
requiredSymbolNames?: Set<string>;
|
|
26
|
+
}
|
|
27
|
+
export declare type ProvidedSymbolMap = Map<SymbolTypeFlag, Map<string, ProvidedSymbol>>;
|
|
28
|
+
export declare type ChangedSymbolMap = Map<SymbolTypeFlag, Set<string>>;
|
|
29
|
+
export interface ProvidedSymbolInfo {
|
|
30
|
+
symbolMap: ProvidedSymbolMap;
|
|
31
|
+
changes: ChangedSymbolMap;
|
|
32
|
+
}
|
|
13
33
|
/**
|
|
14
34
|
* Holds all details about this file within the scope of the whole program
|
|
15
35
|
*/
|
|
16
|
-
export declare class BrsFile {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
36
|
+
export declare class BrsFile implements BscFile {
|
|
37
|
+
constructor(options: {
|
|
38
|
+
/**
|
|
39
|
+
* The path to the file in its source location (where the source code lives in the file system)
|
|
40
|
+
*/
|
|
41
|
+
srcPath: string;
|
|
42
|
+
/**
|
|
43
|
+
* The path to the file where it should exist in the program. This is similar to pkgPath, but retains its original file extensions from srcPath
|
|
44
|
+
*/
|
|
45
|
+
destPath: string;
|
|
46
|
+
/**
|
|
47
|
+
* The final path in the zip. This has the extensions changed. Typically this is the same as destPath, but with file extensions changed for transpiled files.
|
|
48
|
+
*/
|
|
49
|
+
pkgPath?: string;
|
|
50
|
+
program: Program;
|
|
51
|
+
});
|
|
52
|
+
type: string;
|
|
20
53
|
srcPath: string;
|
|
21
|
-
|
|
22
|
-
* The full pkg path (i.e. `pkg:/path/to/file.brs`)
|
|
23
|
-
*/
|
|
54
|
+
destPath: string;
|
|
24
55
|
pkgPath: string;
|
|
25
56
|
program: Program;
|
|
26
|
-
|
|
57
|
+
private _cachedLookups;
|
|
27
58
|
/**
|
|
28
|
-
*
|
|
59
|
+
* An editor assigned during the build flow that manages edits that will be undone once the build process is complete.
|
|
29
60
|
*/
|
|
30
|
-
|
|
61
|
+
editor?: Editor;
|
|
31
62
|
/**
|
|
32
|
-
*
|
|
63
|
+
* Will this file result in only comment or whitespace output? If so, it can be excluded from the output if that bsconfig setting is enabled.
|
|
33
64
|
*/
|
|
34
|
-
|
|
65
|
+
get canBePruned(): boolean;
|
|
35
66
|
/**
|
|
36
67
|
* The parseMode used for the parser for this file
|
|
37
68
|
*/
|
|
38
69
|
parseMode: ParseMode;
|
|
39
70
|
/**
|
|
40
|
-
* The key used to identify this file in the dependency graph
|
|
71
|
+
* The key used to identify this file in the dependency graph. This is set by the BrighterScript program and should not be set by plugins
|
|
41
72
|
*/
|
|
42
73
|
dependencyGraphKey: string;
|
|
43
|
-
/**
|
|
44
|
-
* The all-lowercase extension for this file (including the leading dot)
|
|
45
|
-
*/
|
|
46
|
-
extension: string;
|
|
47
74
|
/**
|
|
48
75
|
* Indicates whether this file needs to be validated.
|
|
76
|
+
* Files are only ever validated a single time
|
|
49
77
|
*/
|
|
50
78
|
isValidated: boolean;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
79
|
+
/**
|
|
80
|
+
* The all-lowercase extension for this file (including the leading dot)
|
|
81
|
+
*/
|
|
82
|
+
extension: string;
|
|
54
83
|
commentFlags: CommentFlag[];
|
|
55
|
-
|
|
56
|
-
|
|
84
|
+
private _functionScopes;
|
|
85
|
+
get functionScopes(): FunctionScope[];
|
|
86
|
+
private get cache();
|
|
87
|
+
/**
|
|
88
|
+
* Return this file's per-namespace contributions. Cached on the file's parser-level
|
|
89
|
+
* cache, so the result is invalidated automatically when the file re-parses.
|
|
90
|
+
*
|
|
91
|
+
* Each entry covers a single dotted name part (so a `namespace A.B.C` declaration
|
|
92
|
+
* produces entries for `A`, `A.B`, and `A.B.C`). Intermediates carry only structural
|
|
93
|
+
* fields; leaves populate the relevant statement collections plus a single-file
|
|
94
|
+
* symbolTable. The symbolTable has no parent provider (see Phase 4 design notes).
|
|
95
|
+
*
|
|
96
|
+
* The returned Map is shared across every Scope that pulls in this file, which is
|
|
97
|
+
* the core sharing primitive Phase 4 relies on.
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
protected getNamespaceContributions(): Map<string, NamespaceFileContribution>;
|
|
57
101
|
/**
|
|
58
102
|
* files referenced by import statements
|
|
59
103
|
*/
|
|
60
|
-
ownScriptImports: FileReference[];
|
|
104
|
+
get ownScriptImports(): FileReference[];
|
|
61
105
|
/**
|
|
62
106
|
* Does this file need to be transpiled?
|
|
107
|
+
* @deprecated use the `.editor` property to push changes to the file, which will force transpilation
|
|
63
108
|
*/
|
|
64
|
-
needsTranspiled: boolean;
|
|
109
|
+
get needsTranspiled(): boolean;
|
|
110
|
+
set needsTranspiled(value: boolean);
|
|
111
|
+
_needsTranspiled: boolean;
|
|
65
112
|
/**
|
|
66
113
|
* The AST for this file
|
|
67
114
|
*/
|
|
68
|
-
get ast(): import("../parser").Body;
|
|
69
|
-
|
|
70
|
-
|
|
115
|
+
get ast(): import("../parser/Statement").Body;
|
|
116
|
+
/**
|
|
117
|
+
* Get the token at the specified position
|
|
118
|
+
*/
|
|
119
|
+
getTokenAt(position: Position): Token;
|
|
120
|
+
/**
|
|
121
|
+
* Get the token at the specified position, or the next token
|
|
122
|
+
*/
|
|
123
|
+
getCurrentOrNextTokenAt(position: Position): Token;
|
|
124
|
+
/**
|
|
125
|
+
* Walk the AST and find the expression that this token is most specifically contained within
|
|
126
|
+
*/
|
|
127
|
+
getClosestExpression(position: Position): AstNode;
|
|
71
128
|
get parser(): Parser;
|
|
72
129
|
private _parser;
|
|
73
130
|
fileContents: string;
|
|
@@ -76,10 +133,10 @@ export declare class BrsFile {
|
|
|
76
133
|
*/
|
|
77
134
|
isTypedef: boolean;
|
|
78
135
|
/**
|
|
79
|
-
* The
|
|
136
|
+
* The key to find the typedef file in the program's files map.
|
|
80
137
|
* A falsey value means this file is ineligable for a typedef
|
|
81
138
|
*/
|
|
82
|
-
|
|
139
|
+
typedefKey?: string;
|
|
83
140
|
/**
|
|
84
141
|
* If the file was given type definitions during parse
|
|
85
142
|
*/
|
|
@@ -88,26 +145,26 @@ export declare class BrsFile {
|
|
|
88
145
|
* A reference to the typedef file (if one exists)
|
|
89
146
|
*/
|
|
90
147
|
typedefFile?: BrsFile;
|
|
91
|
-
/**
|
|
92
|
-
* An unsubscribe function for the dependencyGraph subscription
|
|
93
|
-
*/
|
|
94
|
-
private unsubscribeFromDependencyGraph;
|
|
95
148
|
/**
|
|
96
149
|
* Find and set the typedef variables (if a matching typedef file exists)
|
|
97
150
|
*/
|
|
98
151
|
private resolveTypedef;
|
|
152
|
+
onDependenciesChanged(event: DependencyChangedEvent): void;
|
|
99
153
|
/**
|
|
100
154
|
* Attach the file to the dependency graph so it can monitor changes.
|
|
101
155
|
* Also notify the dependency graph of our current dependencies so other dependents can be notified.
|
|
156
|
+
* @deprecated this does nothing. This functionality is now handled by the file api and will be deleted in v1
|
|
102
157
|
*/
|
|
103
158
|
attachDependencyGraph(dependencyGraph: DependencyGraph): void;
|
|
159
|
+
/**
|
|
160
|
+
* The list of files that this file depends on
|
|
161
|
+
*/
|
|
162
|
+
get dependencies(): string[];
|
|
104
163
|
/**
|
|
105
164
|
* Calculate the AST for this file
|
|
106
|
-
* @param fileContents
|
|
165
|
+
* @param fileContents the raw source code to parse
|
|
107
166
|
*/
|
|
108
167
|
parse(fileContents: string): void;
|
|
109
|
-
validate(): void;
|
|
110
|
-
findAndValidateImportAndImportStatements(): void;
|
|
111
168
|
/**
|
|
112
169
|
* Find a class. This scans all scopes for this file, and returns the first matching class that is found.
|
|
113
170
|
* Returns undefined if not found.
|
|
@@ -121,78 +178,95 @@ export declare class BrsFile {
|
|
|
121
178
|
get propertyNameCompletions(): CompletionItem[];
|
|
122
179
|
/**
|
|
123
180
|
* Find all comment flags in the source code. These enable or disable diagnostic messages.
|
|
124
|
-
* @param
|
|
181
|
+
* @param tokens - an array of tokens of which to find `TokenKind.Comment` from
|
|
125
182
|
*/
|
|
126
183
|
getCommentFlags(tokens: Token[]): void;
|
|
127
|
-
|
|
128
|
-
private findFunctionCalls;
|
|
184
|
+
scopesByFunc: Map<FunctionExpression, FunctionScope>;
|
|
129
185
|
/**
|
|
130
|
-
*
|
|
186
|
+
* Create a scope for every function in this file
|
|
131
187
|
*/
|
|
132
|
-
|
|
188
|
+
private createFunctionScopes;
|
|
189
|
+
staticCallables: Callable[];
|
|
190
|
+
get callables(): Callable[];
|
|
133
191
|
/**
|
|
134
|
-
*
|
|
192
|
+
* Find the function scope at the given position.
|
|
193
|
+
* @param position the position used to find the deepest scope that contains it
|
|
135
194
|
*/
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
private getNamespaceDefinitions;
|
|
195
|
+
getFunctionScopeAtPosition(position: Position): FunctionScope;
|
|
196
|
+
_getFunctionScopeAtPosition(position: Position, functionScopes?: FunctionScope[]): FunctionScope;
|
|
197
|
+
/**
|
|
198
|
+
* Find the NamespaceStatement enclosing the given position
|
|
199
|
+
*/
|
|
200
|
+
getNamespaceStatementForPosition(position: Position): NamespaceStatement;
|
|
143
201
|
/**
|
|
144
202
|
* Given a current token, walk
|
|
145
203
|
*/
|
|
146
204
|
getPartialVariableName(currentToken: Token, excludeTokens?: TokenKind[]): string;
|
|
147
|
-
|
|
148
|
-
|
|
205
|
+
isPositionNextToTokenKind(position: Position, tokenKind: TokenKind): boolean;
|
|
206
|
+
isTokenNextToTokenKind(closestToken: Token, tokenKind: TokenKind): boolean;
|
|
207
|
+
getTokenBefore(currentToken: Token, tokenKind?: TokenKind): Token;
|
|
208
|
+
tokenFollows(currentToken: Token, tokenKind: TokenKind): boolean;
|
|
209
|
+
getTokensUntil(currentToken: Token, tokenKind: TokenKind, direction?: -1 | 1): any[];
|
|
210
|
+
getNextTokenByPredicate(currentToken: Token, test: (Token: any) => boolean, direction?: -1 | 1): Token;
|
|
211
|
+
getPreviousToken(token: Token): Token;
|
|
212
|
+
/**
|
|
213
|
+
* Finds the first scope for this file, then returns true if there's a namespace with this name.
|
|
149
214
|
* Returns false if no namespace was found with that name
|
|
150
215
|
*/
|
|
151
216
|
calleeStartsWithNamespace(callee: Expression): boolean;
|
|
152
217
|
/**
|
|
153
|
-
*
|
|
218
|
+
* Get the token closest to the position. if no token is found, the previous token is returned
|
|
154
219
|
*/
|
|
155
|
-
|
|
220
|
+
getClosestToken(position: Position): Token;
|
|
156
221
|
/**
|
|
157
222
|
* Builds a list of document symbols for this file. Used by LanguageServer's onDocumentSymbol functionality
|
|
223
|
+
* @deprecated use `DocumentSymbolProvider.process()` instead
|
|
158
224
|
*/
|
|
159
|
-
getDocumentSymbols(): DocumentSymbol[];
|
|
225
|
+
getDocumentSymbols(): import("vscode-languageserver-types").DocumentSymbol[];
|
|
160
226
|
/**
|
|
161
227
|
* Builds a list of workspace symbols for this file. Used by LanguageServer's onWorkspaceSymbol functionality
|
|
162
228
|
*/
|
|
163
|
-
getWorkspaceSymbols():
|
|
164
|
-
/**
|
|
165
|
-
* Builds a single DocumentSymbol object for use by LanguageServer's onDocumentSymbol functionality
|
|
166
|
-
*/
|
|
167
|
-
private getDocumentSymbol;
|
|
168
|
-
/**
|
|
169
|
-
* Builds a single SymbolInformation object for use by LanguageServer's onWorkspaceSymbol functionality
|
|
170
|
-
*/
|
|
171
|
-
private generateWorkspaceSymbols;
|
|
229
|
+
getWorkspaceSymbols(): import("vscode-languageserver-types").WorkspaceSymbol[];
|
|
172
230
|
/**
|
|
173
231
|
* Given a position in a file, if the position is sitting on some type of identifier,
|
|
174
232
|
* go to the definition of that identifier (where this thing was first defined)
|
|
233
|
+
* @deprecated use `DefinitionProvider.process()` instead
|
|
175
234
|
*/
|
|
176
235
|
getDefinition(position: Position): Location[];
|
|
177
236
|
getClassMemberDefinitions(textToSearchFor: string, file: BrsFile): Location[];
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
private getClassMethod;
|
|
185
|
-
getClassSignatureHelp(classStatement: ClassStatement): SignatureInfoObj | undefined;
|
|
237
|
+
getClassMethod(classStatement: ClassStatement, name: string, walkParents?: boolean): MethodStatement | undefined;
|
|
238
|
+
/**
|
|
239
|
+
* Given a position in a file, if the position is sitting on some type of identifier,
|
|
240
|
+
* look up all references of that identifier (every place that identifier is used across the whole app)
|
|
241
|
+
* @deprecated use `ReferencesProvider.process()` instead
|
|
242
|
+
*/
|
|
186
243
|
getReferences(position: Position): Location[];
|
|
244
|
+
/**
|
|
245
|
+
* Generate the code, map, and typedef for this file
|
|
246
|
+
*/
|
|
247
|
+
serialize(): SerializedCodeFile;
|
|
187
248
|
/**
|
|
188
249
|
* Convert the brightscript/brighterscript source code into valid brightscript
|
|
189
250
|
*/
|
|
190
251
|
transpile(): CodeWithSourceMap;
|
|
252
|
+
validationSegmenter: AstValidationSegmenter;
|
|
253
|
+
getNamespaceSymbolTable(allowCache?: boolean): SymbolTable;
|
|
254
|
+
private constructNamespaceSymbolTable;
|
|
255
|
+
processSymbolInformation(): void;
|
|
256
|
+
unlinkNamespaceSymbolTables(): void;
|
|
257
|
+
private linkSymbolTableDisposables;
|
|
258
|
+
populateNameSpaceSymbolTable(namespaceSymbolTable: SymbolTable): void;
|
|
259
|
+
get requiredSymbols(): UnresolvedSymbol[];
|
|
260
|
+
get providedSymbols(): {
|
|
261
|
+
symbolMap: Map<SymbolTypeFlag, Map<string, ProvidedSymbol>>;
|
|
262
|
+
changes: Map<SymbolTypeFlag, Set<string>>;
|
|
263
|
+
referenceSymbolMap: Map<SymbolTypeFlag, Map<string, ProvidedSymbol>>;
|
|
264
|
+
};
|
|
265
|
+
get assignedSymbols(): AssignedSymbol[];
|
|
266
|
+
private getProvidedSymbols;
|
|
267
|
+
markSegmentAsValidated(node: AstNode): void;
|
|
268
|
+
getNamespaceLookupObject(): Map<string, NamespaceContainer>;
|
|
269
|
+
private buildNamespaceLookup;
|
|
191
270
|
getTypedef(): string;
|
|
192
271
|
dispose(): void;
|
|
193
272
|
}
|
|
194
|
-
/**
|
|
195
|
-
* List of completions for all valid keywords/reserved words.
|
|
196
|
-
* Build this list once because it won't change for the lifetime of this process
|
|
197
|
-
*/
|
|
198
|
-
export declare const KeywordCompletions: CompletionItem[];
|