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