brighterscript 1.0.0-alpha.5 → 1.0.0-alpha.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -138
- package/bsconfig.schema.json +121 -5
- package/dist/ActionPipeline.d.ts +10 -0
- package/dist/ActionPipeline.js +40 -0
- package/dist/ActionPipeline.js.map +1 -0
- package/dist/AstValidationSegmenter.d.ts +45 -0
- package/dist/AstValidationSegmenter.js +322 -0
- package/dist/AstValidationSegmenter.js.map +1 -0
- package/dist/BsConfig.d.ts +72 -39
- package/dist/BusyStatusTracker.d.ts +61 -0
- package/dist/BusyStatusTracker.js +148 -0
- package/dist/BusyStatusTracker.js.map +1 -0
- package/dist/Cache.d.ts +3 -8
- package/dist/Cache.js +9 -14
- package/dist/Cache.js.map +1 -1
- package/dist/CacheVerifier.d.ts +7 -0
- package/dist/CacheVerifier.js +20 -0
- package/dist/CacheVerifier.js.map +1 -0
- package/dist/CodeActionUtil.d.ts +12 -4
- package/dist/CodeActionUtil.js +22 -5
- package/dist/CodeActionUtil.js.map +1 -1
- package/dist/CommentFlagProcessor.d.ts +7 -6
- package/dist/CommentFlagProcessor.js +11 -8
- package/dist/CommentFlagProcessor.js.map +1 -1
- package/dist/CrossScopeValidator.d.ts +68 -0
- package/dist/CrossScopeValidator.js +642 -0
- package/dist/CrossScopeValidator.js.map +1 -0
- package/dist/DependencyGraph.d.ts +8 -3
- package/dist/DependencyGraph.js +49 -16
- package/dist/DependencyGraph.js.map +1 -1
- package/dist/DiagnosticCollection.d.ts +21 -5
- package/dist/DiagnosticCollection.js +77 -24
- package/dist/DiagnosticCollection.js.map +1 -1
- package/dist/DiagnosticFilterer.d.ts +27 -6
- package/dist/DiagnosticFilterer.js +273 -60
- package/dist/DiagnosticFilterer.js.map +1 -1
- package/dist/DiagnosticManager.d.ts +82 -0
- package/dist/DiagnosticManager.js +406 -0
- package/dist/DiagnosticManager.js.map +1 -0
- package/dist/DiagnosticMessages.d.ts +558 -196
- package/dist/DiagnosticMessages.js +870 -340
- package/dist/DiagnosticMessages.js.map +1 -1
- package/dist/DiagnosticSeverityAdjuster.d.ts +7 -0
- package/dist/DiagnosticSeverityAdjuster.js +45 -0
- package/dist/DiagnosticSeverityAdjuster.js.map +1 -0
- package/dist/FunctionScope.d.ts +28 -0
- package/dist/FunctionScope.js +52 -0
- package/dist/FunctionScope.js.map +1 -0
- package/dist/KeyedThrottler.d.ts +3 -3
- package/dist/KeyedThrottler.js +3 -3
- package/dist/KeyedThrottler.js.map +1 -1
- package/dist/LanguageServer.d.ts +100 -105
- package/dist/LanguageServer.js +444 -745
- package/dist/LanguageServer.js.map +1 -1
- package/dist/Logger.d.ts +17 -13
- package/dist/Logger.js +64 -34
- package/dist/Logger.js.map +1 -1
- package/dist/PluginInterface.d.ts +32 -10
- package/dist/PluginInterface.js +117 -7
- package/dist/PluginInterface.js.map +1 -1
- package/dist/Program.d.ts +241 -98
- package/dist/Program.js +1432 -717
- package/dist/Program.js.map +1 -1
- package/dist/ProgramBuilder.d.ts +47 -23
- package/dist/ProgramBuilder.js +224 -178
- package/dist/ProgramBuilder.js.map +1 -1
- package/dist/Scope.d.ts +149 -109
- package/dist/Scope.js +557 -550
- package/dist/Scope.js.map +1 -1
- package/dist/SemanticTokenUtils.js +5 -1
- package/dist/SemanticTokenUtils.js.map +1 -1
- package/dist/Stopwatch.d.ts +4 -0
- package/dist/Stopwatch.js +8 -1
- package/dist/Stopwatch.js.map +1 -1
- package/dist/SymbolTable.d.ts +136 -24
- package/dist/SymbolTable.js +565 -64
- package/dist/SymbolTable.js.map +1 -1
- package/dist/SymbolTypeFlag.d.ts +9 -0
- package/dist/SymbolTypeFlag.js +14 -0
- package/dist/SymbolTypeFlag.js.map +1 -0
- package/dist/Throttler.d.ts +12 -0
- package/dist/Throttler.js +39 -0
- package/dist/Throttler.js.map +1 -1
- package/dist/Watcher.d.ts +0 -3
- package/dist/Watcher.js +0 -3
- package/dist/Watcher.js.map +1 -1
- package/dist/XmlScope.d.ts +5 -15
- package/dist/XmlScope.js +34 -90
- package/dist/XmlScope.js.map +1 -1
- package/dist/astUtils/CachedLookups.d.ts +50 -0
- package/dist/astUtils/CachedLookups.js +334 -0
- package/dist/astUtils/CachedLookups.js.map +1 -0
- package/dist/astUtils/CachedLookups.spec.js +39 -0
- package/dist/astUtils/CachedLookups.spec.js.map +1 -0
- package/dist/astUtils/Editor.d.ts +69 -0
- package/dist/astUtils/Editor.js +245 -0
- package/dist/astUtils/Editor.js.map +1 -0
- package/dist/astUtils/Editor.spec.js +258 -0
- package/dist/astUtils/Editor.spec.js.map +1 -0
- package/dist/astUtils/creators.d.ts +54 -19
- package/dist/astUtils/creators.js +242 -42
- package/dist/astUtils/creators.js.map +1 -1
- package/dist/astUtils/creators.spec.js +5 -5
- package/dist/astUtils/creators.spec.js.map +1 -1
- package/dist/astUtils/reflection.d.ts +196 -85
- package/dist/astUtils/reflection.js +497 -144
- package/dist/astUtils/reflection.js.map +1 -1
- package/dist/astUtils/reflection.spec.js +267 -167
- package/dist/astUtils/reflection.spec.js.map +1 -1
- package/dist/astUtils/stackedVisitor.js.map +1 -1
- package/dist/astUtils/stackedVisitor.spec.js +14 -14
- package/dist/astUtils/stackedVisitor.spec.js.map +1 -1
- package/dist/astUtils/visitors.d.ts +116 -53
- package/dist/astUtils/visitors.js +95 -15
- package/dist/astUtils/visitors.js.map +1 -1
- package/dist/astUtils/visitors.spec.js +629 -51
- package/dist/astUtils/visitors.spec.js.map +1 -1
- package/dist/astUtils/xml.d.ts +9 -8
- package/dist/astUtils/xml.js +12 -7
- package/dist/astUtils/xml.js.map +1 -1
- package/dist/bscPlugin/BscPlugin.d.ts +24 -4
- package/dist/bscPlugin/BscPlugin.js +88 -4
- package/dist/bscPlugin/BscPlugin.js.map +1 -1
- package/dist/bscPlugin/CallExpressionInfo.d.ts +36 -0
- package/dist/bscPlugin/CallExpressionInfo.js +143 -0
- package/dist/bscPlugin/CallExpressionInfo.js.map +1 -0
- package/dist/bscPlugin/FileWriter.d.ts +6 -0
- package/dist/bscPlugin/FileWriter.js +24 -0
- package/dist/bscPlugin/FileWriter.js.map +1 -0
- package/dist/bscPlugin/SignatureHelpUtil.d.ts +10 -0
- package/dist/bscPlugin/SignatureHelpUtil.js +137 -0
- package/dist/bscPlugin/SignatureHelpUtil.js.map +1 -0
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.d.ts +6 -5
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js +173 -27
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js.map +1 -1
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js +138 -21
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js.map +1 -1
- package/dist/bscPlugin/completions/CompletionsProcessor.d.ts +65 -0
- package/dist/bscPlugin/completions/CompletionsProcessor.js +633 -0
- package/dist/bscPlugin/completions/CompletionsProcessor.js.map +1 -0
- package/dist/bscPlugin/completions/CompletionsProcessor.spec.js +2512 -0
- package/dist/bscPlugin/completions/CompletionsProcessor.spec.js.map +1 -0
- package/dist/bscPlugin/definition/DefinitionProvider.d.ts +13 -0
- package/dist/bscPlugin/definition/DefinitionProvider.js +212 -0
- package/dist/bscPlugin/definition/DefinitionProvider.js.map +1 -0
- package/dist/bscPlugin/definition/DefinitionProvider.spec.js +87 -0
- package/dist/bscPlugin/definition/DefinitionProvider.spec.js.map +1 -0
- package/dist/bscPlugin/fileProviders/FileProvider.d.ts +9 -0
- package/dist/bscPlugin/fileProviders/FileProvider.js +51 -0
- package/dist/bscPlugin/fileProviders/FileProvider.js.map +1 -0
- package/dist/bscPlugin/hover/HoverProcessor.d.ts +18 -0
- package/dist/bscPlugin/hover/HoverProcessor.js +230 -0
- package/dist/bscPlugin/hover/HoverProcessor.js.map +1 -0
- package/dist/bscPlugin/hover/HoverProcessor.spec.js +991 -0
- package/dist/bscPlugin/hover/HoverProcessor.spec.js.map +1 -0
- package/dist/bscPlugin/references/ReferencesProvider.d.ts +12 -0
- package/dist/bscPlugin/references/ReferencesProvider.js +57 -0
- package/dist/bscPlugin/references/ReferencesProvider.js.map +1 -0
- package/dist/bscPlugin/references/ReferencesProvider.spec.d.ts +1 -0
- package/dist/bscPlugin/references/ReferencesProvider.spec.js +51 -0
- package/dist/bscPlugin/references/ReferencesProvider.spec.js.map +1 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.d.ts +14 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js +164 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js.map +1 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.d.ts +1 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js +564 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js.map +1 -0
- package/dist/bscPlugin/serialize/BslibInjector.spec.d.ts +1 -0
- package/dist/bscPlugin/serialize/BslibInjector.spec.js +33 -0
- package/dist/bscPlugin/serialize/BslibInjector.spec.js.map +1 -0
- package/dist/bscPlugin/serialize/BslibManager.d.ts +12 -0
- package/dist/bscPlugin/serialize/BslibManager.js +46 -0
- package/dist/bscPlugin/serialize/BslibManager.js.map +1 -0
- package/dist/bscPlugin/serialize/FileSerializer.d.ts +9 -0
- package/dist/bscPlugin/serialize/FileSerializer.js +75 -0
- package/dist/bscPlugin/serialize/FileSerializer.js.map +1 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.d.ts +7 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.js +22 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.js.map +1 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.spec.d.ts +1 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.spec.js +291 -0
- package/dist/bscPlugin/symbols/DocumentSymbolProcessor.spec.js.map +1 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.d.ts +7 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.js +26 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.js.map +1 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.spec.d.ts +1 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.spec.js +245 -0
- package/dist/bscPlugin/symbols/WorkspaceSymbolProcessor.spec.js.map +1 -0
- package/dist/bscPlugin/symbols/symbolUtils.d.ts +5 -0
- package/dist/bscPlugin/symbols/symbolUtils.js +141 -0
- package/dist/bscPlugin/symbols/symbolUtils.js.map +1 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.d.ts +27 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js +418 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js.map +1 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.d.ts +1 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.js +75 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.js.map +1 -0
- package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.d.ts +12 -0
- package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js +99 -0
- package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js.map +1 -0
- package/dist/bscPlugin/validation/BrsFileAfterValidator.d.ts +7 -0
- package/dist/bscPlugin/validation/BrsFileAfterValidator.js +18 -0
- package/dist/bscPlugin/validation/BrsFileAfterValidator.js.map +1 -0
- package/dist/bscPlugin/validation/BrsFileValidator.d.ts +37 -0
- package/dist/bscPlugin/validation/BrsFileValidator.js +638 -0
- package/dist/bscPlugin/validation/BrsFileValidator.js.map +1 -0
- package/dist/bscPlugin/validation/BrsFileValidator.spec.d.ts +1 -0
- package/dist/bscPlugin/validation/BrsFileValidator.spec.js +1517 -0
- package/dist/bscPlugin/validation/BrsFileValidator.spec.js.map +1 -0
- package/dist/bscPlugin/validation/ProgramValidator.d.ts +11 -0
- package/dist/bscPlugin/validation/ProgramValidator.js +33 -0
- package/dist/bscPlugin/validation/ProgramValidator.js.map +1 -0
- package/dist/bscPlugin/validation/ScopeValidator.d.ts +141 -0
- package/dist/bscPlugin/validation/ScopeValidator.js +1323 -0
- package/dist/bscPlugin/validation/ScopeValidator.js.map +1 -0
- package/dist/bscPlugin/validation/ScopeValidator.spec.d.ts +1 -0
- package/dist/bscPlugin/validation/ScopeValidator.spec.js +6135 -0
- package/dist/bscPlugin/validation/ScopeValidator.spec.js.map +1 -0
- package/dist/bscPlugin/validation/XmlFileValidator.d.ts +8 -0
- package/dist/bscPlugin/validation/XmlFileValidator.js +36 -0
- package/dist/bscPlugin/validation/XmlFileValidator.js.map +1 -0
- package/dist/cli.js +126 -27
- package/dist/cli.js.map +1 -1
- package/dist/common/Sequencer.d.ts +53 -0
- package/dist/common/Sequencer.js +233 -0
- package/dist/common/Sequencer.js.map +1 -0
- package/dist/common/Sequencer.spec.d.ts +1 -0
- package/dist/common/Sequencer.spec.js +75 -0
- package/dist/common/Sequencer.spec.js.map +1 -0
- package/dist/deferred.d.ts +5 -3
- package/dist/deferred.js +10 -0
- package/dist/deferred.js.map +1 -1
- package/dist/diagnosticUtils.d.ts +10 -3
- package/dist/diagnosticUtils.js +64 -25
- package/dist/diagnosticUtils.js.map +1 -1
- package/dist/examples/plugins/removePrint.d.ts +2 -2
- package/dist/examples/plugins/removePrint.js +8 -12
- package/dist/examples/plugins/removePrint.js.map +1 -1
- package/dist/files/AssetFile.d.ts +24 -0
- package/dist/files/AssetFile.js +25 -0
- package/dist/files/AssetFile.js.map +1 -0
- package/dist/files/BrsFile.Class.spec.js +1213 -259
- package/dist/files/BrsFile.Class.spec.js.map +1 -1
- package/dist/files/BrsFile.d.ts +145 -87
- package/dist/files/BrsFile.js +836 -934
- package/dist/files/BrsFile.js.map +1 -1
- package/dist/files/BrsFile.spec.js +4226 -902
- package/dist/files/BrsFile.spec.js.map +1 -1
- package/dist/files/BscFile.d.ts +102 -0
- package/dist/files/BscFile.js +15 -0
- package/dist/files/BscFile.js.map +1 -0
- package/dist/files/Factory.d.ts +25 -0
- package/dist/files/Factory.js +22 -0
- package/dist/files/Factory.js.map +1 -0
- package/dist/files/LazyFileData.d.ts +21 -0
- package/dist/files/LazyFileData.js +54 -0
- package/dist/files/LazyFileData.js.map +1 -0
- package/dist/files/LazyFileData.spec.d.ts +1 -0
- package/dist/files/LazyFileData.spec.js +27 -0
- package/dist/files/LazyFileData.spec.js.map +1 -0
- package/dist/files/XmlFile.d.ts +80 -41
- package/dist/files/XmlFile.js +161 -137
- package/dist/files/XmlFile.js.map +1 -1
- package/dist/files/XmlFile.spec.js +444 -336
- package/dist/files/XmlFile.spec.js.map +1 -1
- package/dist/files/tests/imports.spec.js +62 -52
- package/dist/files/tests/imports.spec.js.map +1 -1
- package/dist/files/tests/optionalChaning.spec.d.ts +1 -0
- package/dist/files/tests/optionalChaning.spec.js +152 -0
- package/dist/files/tests/optionalChaning.spec.js.map +1 -0
- package/dist/globalCallables.d.ts +3 -1
- package/dist/globalCallables.js +424 -184
- package/dist/globalCallables.js.map +1 -1
- package/dist/index.d.ts +32 -4
- package/dist/index.js +54 -7
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +942 -125
- package/dist/interfaces.js +21 -0
- package/dist/interfaces.js.map +1 -1
- package/dist/lexer/Character.spec.js +5 -5
- package/dist/lexer/Character.spec.js.map +1 -1
- package/dist/lexer/Lexer.d.ts +51 -12
- package/dist/lexer/Lexer.js +215 -65
- package/dist/lexer/Lexer.js.map +1 -1
- package/dist/lexer/Lexer.spec.js +812 -568
- package/dist/lexer/Lexer.spec.js.map +1 -1
- package/dist/lexer/Token.d.ts +27 -11
- package/dist/lexer/Token.js +10 -2
- package/dist/lexer/Token.js.map +1 -1
- package/dist/lexer/TokenKind.d.ts +40 -2
- package/dist/lexer/TokenKind.js +147 -10
- package/dist/lexer/TokenKind.js.map +1 -1
- package/dist/logging.d.ts +14 -0
- package/dist/logging.js +29 -0
- package/dist/logging.js.map +1 -0
- package/dist/lsp/ActionQueue.d.ts +35 -0
- package/dist/lsp/ActionQueue.js +115 -0
- package/dist/lsp/ActionQueue.js.map +1 -0
- package/dist/lsp/ActionQueue.spec.d.ts +1 -0
- package/dist/lsp/ActionQueue.spec.js +80 -0
- package/dist/lsp/ActionQueue.spec.js.map +1 -0
- package/dist/lsp/DocumentManager.d.ts +63 -0
- package/dist/lsp/DocumentManager.js +122 -0
- package/dist/lsp/DocumentManager.js.map +1 -0
- package/dist/lsp/DocumentManager.spec.d.ts +1 -0
- package/dist/lsp/DocumentManager.spec.js +103 -0
- package/dist/lsp/DocumentManager.spec.js.map +1 -0
- package/dist/lsp/LspProject.d.ts +239 -0
- package/dist/lsp/LspProject.js +3 -0
- package/dist/lsp/LspProject.js.map +1 -0
- package/dist/lsp/PathFilterer.d.ts +75 -0
- package/dist/lsp/PathFilterer.js +196 -0
- package/dist/lsp/PathFilterer.js.map +1 -0
- package/dist/lsp/PathFilterer.spec.d.ts +1 -0
- package/dist/lsp/PathFilterer.spec.js +182 -0
- package/dist/lsp/PathFilterer.spec.js.map +1 -0
- package/dist/lsp/Project.d.ts +168 -0
- package/dist/lsp/Project.js +437 -0
- package/dist/lsp/Project.js.map +1 -0
- package/dist/lsp/Project.spec.d.ts +1 -0
- package/dist/lsp/Project.spec.js +267 -0
- package/dist/lsp/Project.spec.js.map +1 -0
- package/dist/lsp/ProjectManager.d.ts +242 -0
- package/dist/lsp/ProjectManager.js +824 -0
- package/dist/lsp/ProjectManager.js.map +1 -0
- package/dist/lsp/ProjectManager.spec.d.ts +1 -0
- package/dist/lsp/ProjectManager.spec.js +913 -0
- package/dist/lsp/ProjectManager.spec.js.map +1 -0
- package/dist/lsp/ReaderWriterManager.d.ts +21 -0
- package/dist/lsp/ReaderWriterManager.js +60 -0
- package/dist/lsp/ReaderWriterManager.js.map +1 -0
- package/dist/lsp/worker/MessageHandler.d.ts +99 -0
- package/dist/lsp/worker/MessageHandler.js +138 -0
- package/dist/lsp/worker/MessageHandler.js.map +1 -0
- package/dist/lsp/worker/MessageHandler.spec.d.ts +1 -0
- package/dist/lsp/worker/MessageHandler.spec.js +64 -0
- package/dist/lsp/worker/MessageHandler.spec.js.map +1 -0
- package/dist/lsp/worker/WorkerPool.d.ts +38 -0
- package/dist/lsp/worker/WorkerPool.js +78 -0
- package/dist/lsp/worker/WorkerPool.js.map +1 -0
- package/dist/lsp/worker/WorkerPool.spec.d.ts +1 -0
- package/dist/lsp/worker/WorkerPool.spec.js +59 -0
- package/dist/lsp/worker/WorkerPool.spec.js.map +1 -0
- package/dist/lsp/worker/WorkerThreadProject.d.ts +143 -0
- package/dist/lsp/worker/WorkerThreadProject.js +189 -0
- package/dist/lsp/worker/WorkerThreadProject.js.map +1 -0
- package/dist/lsp/worker/WorkerThreadProject.spec.d.ts +2 -0
- package/dist/lsp/worker/WorkerThreadProject.spec.js +71 -0
- package/dist/lsp/worker/WorkerThreadProject.spec.js.map +1 -0
- package/dist/lsp/worker/WorkerThreadProjectRunner.d.ts +15 -0
- package/dist/lsp/worker/WorkerThreadProjectRunner.js +58 -0
- package/dist/lsp/worker/WorkerThreadProjectRunner.js.map +1 -0
- package/dist/lsp/worker/run.d.ts +1 -0
- package/dist/lsp/worker/run.js +14 -0
- package/dist/lsp/worker/run.js.map +1 -0
- package/dist/parser/AstNode.d.ts +203 -0
- package/dist/parser/AstNode.js +303 -0
- package/dist/parser/AstNode.js.map +1 -0
- package/dist/parser/AstNode.spec.d.ts +1 -0
- package/dist/parser/AstNode.spec.js +1455 -0
- package/dist/parser/AstNode.spec.js.map +1 -0
- package/dist/parser/BrightScriptDocParser.d.ts +56 -0
- package/dist/parser/BrightScriptDocParser.js +294 -0
- package/dist/parser/BrightScriptDocParser.js.map +1 -0
- package/dist/parser/BrightScriptDocParser.spec.d.ts +1 -0
- package/dist/parser/BrightScriptDocParser.spec.js +310 -0
- package/dist/parser/BrightScriptDocParser.spec.js.map +1 -0
- package/dist/parser/BrsTranspileState.d.ts +22 -3
- package/dist/parser/BrsTranspileState.js +19 -0
- package/dist/parser/BrsTranspileState.js.map +1 -1
- package/dist/parser/Expression.d.ts +553 -221
- package/dist/parser/Expression.js +1414 -505
- package/dist/parser/Expression.js.map +1 -1
- package/dist/parser/Expression.spec.d.ts +1 -0
- package/dist/parser/Expression.spec.js +40 -0
- package/dist/parser/Expression.spec.js.map +1 -0
- package/dist/parser/Parser.Class.spec.js +255 -125
- package/dist/parser/Parser.Class.spec.js.map +1 -1
- package/dist/parser/Parser.d.ts +117 -124
- package/dist/parser/Parser.js +1669 -982
- package/dist/parser/Parser.js.map +1 -1
- package/dist/parser/Parser.spec.d.ts +3 -1
- package/dist/parser/Parser.spec.js +2111 -525
- package/dist/parser/Parser.spec.js.map +1 -1
- package/dist/parser/SGParser.d.ts +29 -13
- package/dist/parser/SGParser.js +85 -56
- package/dist/parser/SGParser.js.map +1 -1
- package/dist/parser/SGParser.spec.js +30 -45
- package/dist/parser/SGParser.spec.js.map +1 -1
- package/dist/parser/SGTypes.d.ts +134 -46
- package/dist/parser/SGTypes.js +206 -115
- package/dist/parser/SGTypes.js.map +1 -1
- package/dist/parser/Statement.d.ts +849 -267
- package/dist/parser/Statement.js +2412 -625
- package/dist/parser/Statement.js.map +1 -1
- package/dist/parser/Statement.spec.js +133 -36
- package/dist/parser/Statement.spec.js.map +1 -1
- package/dist/parser/TranspileState.d.ts +26 -12
- package/dist/parser/TranspileState.js +115 -24
- package/dist/parser/TranspileState.js.map +1 -1
- package/dist/parser/tests/Parser.spec.d.ts +3 -9
- package/dist/parser/tests/Parser.spec.js +7 -13
- package/dist/parser/tests/Parser.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/For.spec.js +83 -75
- package/dist/parser/tests/controlFlow/For.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/ForEach.spec.js +85 -51
- package/dist/parser/tests/controlFlow/ForEach.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/If.spec.js +382 -239
- package/dist/parser/tests/controlFlow/If.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/While.spec.js +52 -45
- package/dist/parser/tests/controlFlow/While.spec.js.map +1 -1
- package/dist/parser/tests/expression/Additive.spec.js +51 -43
- package/dist/parser/tests/expression/Additive.spec.js.map +1 -1
- package/dist/parser/tests/expression/ArrayLiterals.spec.js +192 -142
- package/dist/parser/tests/expression/ArrayLiterals.spec.js.map +1 -1
- package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js +236 -160
- package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js.map +1 -1
- package/dist/parser/tests/expression/Boolean.spec.js +41 -34
- package/dist/parser/tests/expression/Boolean.spec.js.map +1 -1
- package/dist/parser/tests/expression/Call.spec.js +173 -55
- package/dist/parser/tests/expression/Call.spec.js.map +1 -1
- package/dist/parser/tests/expression/Exponential.spec.js +20 -20
- package/dist/parser/tests/expression/Exponential.spec.js.map +1 -1
- package/dist/parser/tests/expression/Function.spec.js +291 -282
- package/dist/parser/tests/expression/Function.spec.js.map +1 -1
- package/dist/parser/tests/expression/Indexing.spec.js +193 -110
- package/dist/parser/tests/expression/Indexing.spec.js.map +1 -1
- package/dist/parser/tests/expression/Multiplicative.spec.js +42 -42
- package/dist/parser/tests/expression/Multiplicative.spec.js.map +1 -1
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js +260 -115
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/PrefixUnary.spec.js +58 -52
- package/dist/parser/tests/expression/PrefixUnary.spec.js.map +1 -1
- package/dist/parser/tests/expression/Primary.spec.js +76 -60
- package/dist/parser/tests/expression/Primary.spec.js.map +1 -1
- package/dist/parser/tests/expression/RegexLiteralExpression.spec.d.ts +1 -0
- package/dist/parser/tests/expression/RegexLiteralExpression.spec.js +171 -0
- package/dist/parser/tests/expression/RegexLiteralExpression.spec.js.map +1 -0
- package/dist/parser/tests/expression/Relational.spec.js +50 -50
- package/dist/parser/tests/expression/Relational.spec.js.map +1 -1
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.js +31 -31
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js +281 -94
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TernaryExpression.spec.js +747 -192
- package/dist/parser/tests/expression/TernaryExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TypeExpression.spec.d.ts +1 -0
- package/dist/parser/tests/expression/TypeExpression.spec.js +126 -0
- package/dist/parser/tests/expression/TypeExpression.spec.js.map +1 -0
- package/dist/parser/tests/expression/UnaryExpression.spec.d.ts +1 -0
- package/dist/parser/tests/expression/UnaryExpression.spec.js +52 -0
- package/dist/parser/tests/expression/UnaryExpression.spec.js.map +1 -0
- package/dist/parser/tests/statement/AssignmentOperators.spec.js +44 -44
- package/dist/parser/tests/statement/AssignmentOperators.spec.js.map +1 -1
- package/dist/parser/tests/statement/ConstStatement.spec.d.ts +1 -0
- package/dist/parser/tests/statement/ConstStatement.spec.js +500 -0
- package/dist/parser/tests/statement/ConstStatement.spec.js.map +1 -0
- package/dist/parser/tests/statement/Continue.spec.d.ts +1 -0
- package/dist/parser/tests/statement/Continue.spec.js +119 -0
- package/dist/parser/tests/statement/Continue.spec.js.map +1 -0
- package/dist/parser/tests/statement/Declaration.spec.js +61 -55
- package/dist/parser/tests/statement/Declaration.spec.js.map +1 -1
- package/dist/parser/tests/statement/Dim.spec.js +29 -22
- package/dist/parser/tests/statement/Dim.spec.js.map +1 -1
- package/dist/parser/tests/statement/Enum.spec.d.ts +1 -0
- package/dist/parser/tests/statement/Enum.spec.js +744 -0
- package/dist/parser/tests/statement/Enum.spec.js.map +1 -0
- package/dist/parser/tests/statement/For.spec.d.ts +1 -0
- package/dist/parser/tests/statement/For.spec.js +45 -0
- package/dist/parser/tests/statement/For.spec.js.map +1 -0
- package/dist/parser/tests/statement/ForEach.spec.d.ts +1 -0
- package/dist/parser/tests/statement/ForEach.spec.js +36 -0
- package/dist/parser/tests/statement/ForEach.spec.js.map +1 -0
- package/dist/parser/tests/statement/Function.spec.js +226 -215
- package/dist/parser/tests/statement/Function.spec.js.map +1 -1
- package/dist/parser/tests/statement/Goto.spec.js +16 -15
- package/dist/parser/tests/statement/Goto.spec.js.map +1 -1
- package/dist/parser/tests/statement/Increment.spec.js +64 -61
- package/dist/parser/tests/statement/Increment.spec.js.map +1 -1
- package/dist/parser/tests/statement/InterfaceStatement.spec.d.ts +1 -0
- package/dist/parser/tests/statement/InterfaceStatement.spec.js +110 -0
- package/dist/parser/tests/statement/InterfaceStatement.spec.js.map +1 -0
- package/dist/parser/tests/statement/LibraryStatement.spec.js +22 -22
- package/dist/parser/tests/statement/LibraryStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/Misc.spec.js +127 -168
- package/dist/parser/tests/statement/Misc.spec.js.map +1 -1
- package/dist/parser/tests/statement/PrintStatement.spec.js +133 -114
- package/dist/parser/tests/statement/PrintStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/ReturnStatement.spec.js +57 -54
- package/dist/parser/tests/statement/ReturnStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/Set.spec.js +131 -117
- package/dist/parser/tests/statement/Set.spec.js.map +1 -1
- package/dist/parser/tests/statement/Stop.spec.js +14 -13
- package/dist/parser/tests/statement/Stop.spec.js.map +1 -1
- package/dist/parser/tests/statement/Throw.spec.js +11 -8
- package/dist/parser/tests/statement/Throw.spec.js.map +1 -1
- package/dist/parser/tests/statement/TryCatch.spec.js +26 -15
- package/dist/parser/tests/statement/TryCatch.spec.js.map +1 -1
- package/dist/preprocessor/Manifest.d.ts +6 -6
- package/dist/preprocessor/Manifest.js +17 -38
- package/dist/preprocessor/Manifest.js.map +1 -1
- package/dist/preprocessor/Manifest.spec.d.ts +1 -0
- package/dist/preprocessor/Manifest.spec.js +78 -103
- package/dist/preprocessor/Manifest.spec.js.map +1 -1
- package/dist/roku-types/data.json +20347 -0
- package/dist/roku-types/index.d.ts +5726 -0
- package/dist/roku-types/index.js +11 -0
- package/dist/roku-types/index.js.map +1 -0
- package/dist/types/ArrayType.d.ts +12 -5
- package/dist/types/ArrayType.js +89 -24
- package/dist/types/ArrayType.js.map +1 -1
- package/dist/types/ArrayType.spec.js +39 -11
- package/dist/types/ArrayType.spec.js.map +1 -1
- package/dist/types/AssociativeArrayType.d.ts +15 -0
- package/dist/types/AssociativeArrayType.js +64 -0
- package/dist/types/AssociativeArrayType.js.map +1 -0
- package/dist/types/BaseFunctionType.d.ts +10 -0
- package/dist/types/BaseFunctionType.js +26 -0
- package/dist/types/BaseFunctionType.js.map +1 -0
- package/dist/types/BooleanType.d.ts +9 -5
- package/dist/types/BooleanType.js +19 -8
- package/dist/types/BooleanType.js.map +1 -1
- package/dist/types/BooleanType.spec.js +10 -4
- package/dist/types/BooleanType.spec.js.map +1 -1
- package/dist/types/BscType.d.ts +41 -3
- package/dist/types/BscType.js +152 -0
- package/dist/types/BscType.js.map +1 -1
- package/dist/types/BscTypeKind.d.ts +28 -0
- package/dist/types/BscTypeKind.js +33 -0
- package/dist/types/BscTypeKind.js.map +1 -0
- package/dist/types/BuiltInInterfaceAdder.d.ts +28 -0
- package/dist/types/BuiltInInterfaceAdder.js +212 -0
- package/dist/types/BuiltInInterfaceAdder.js.map +1 -0
- package/dist/types/BuiltInInterfaceAdder.spec.d.ts +1 -0
- package/dist/types/BuiltInInterfaceAdder.spec.js +115 -0
- package/dist/types/BuiltInInterfaceAdder.spec.js.map +1 -0
- package/dist/types/CallFuncableType.d.ts +24 -0
- package/dist/types/CallFuncableType.js +91 -0
- package/dist/types/CallFuncableType.js.map +1 -0
- package/dist/types/ClassType.d.ts +17 -0
- package/dist/types/ClassType.js +60 -0
- package/dist/types/ClassType.js.map +1 -0
- package/dist/types/ClassType.spec.d.ts +1 -0
- package/dist/types/ClassType.spec.js +76 -0
- package/dist/types/ClassType.spec.js.map +1 -0
- package/dist/types/ComponentType.d.ts +22 -0
- package/dist/types/ComponentType.js +107 -0
- package/dist/types/ComponentType.js.map +1 -0
- package/dist/types/DoubleType.d.ts +10 -5
- package/dist/types/DoubleType.js +21 -17
- package/dist/types/DoubleType.js.map +1 -1
- package/dist/types/DoubleType.spec.js +12 -4
- package/dist/types/DoubleType.spec.js.map +1 -1
- package/dist/types/DynamicType.d.ts +13 -5
- package/dist/types/DynamicType.js +26 -5
- package/dist/types/DynamicType.js.map +1 -1
- package/dist/types/DynamicType.spec.js +16 -5
- package/dist/types/DynamicType.spec.js.map +1 -1
- package/dist/types/EnumType.d.ts +42 -0
- package/dist/types/EnumType.js +98 -0
- package/dist/types/EnumType.js.map +1 -0
- package/dist/types/EnumType.spec.d.ts +1 -0
- package/dist/types/EnumType.spec.js +33 -0
- package/dist/types/EnumType.spec.js.map +1 -0
- package/dist/types/FloatType.d.ts +10 -5
- package/dist/types/FloatType.js +21 -17
- package/dist/types/FloatType.js.map +1 -1
- package/dist/types/FloatType.spec.js +4 -4
- package/dist/types/FloatType.spec.js.map +1 -1
- package/dist/types/FunctionType.d.ts +8 -22
- package/dist/types/FunctionType.js +25 -63
- package/dist/types/FunctionType.js.map +1 -1
- package/dist/types/InheritableType.d.ts +29 -0
- package/dist/types/InheritableType.js +173 -0
- package/dist/types/InheritableType.js.map +1 -0
- package/dist/types/InlineInterfaceType.d.ts +5 -0
- package/dist/types/InlineInterfaceType.js +17 -0
- package/dist/types/InlineInterfaceType.js.map +1 -0
- package/dist/types/IntegerType.d.ts +10 -5
- package/dist/types/IntegerType.js +21 -17
- package/dist/types/IntegerType.js.map +1 -1
- package/dist/types/IntegerType.spec.js +8 -4
- package/dist/types/IntegerType.spec.js.map +1 -1
- package/dist/types/InterfaceType.d.ts +14 -6
- package/dist/types/InterfaceType.js +30 -15
- package/dist/types/InterfaceType.js.map +1 -1
- package/dist/types/InterfaceType.spec.d.ts +1 -0
- package/dist/types/InterfaceType.spec.js +227 -0
- package/dist/types/InterfaceType.spec.js.map +1 -0
- package/dist/types/IntersectionType.d.ts +29 -0
- package/dist/types/IntersectionType.js +253 -0
- package/dist/types/IntersectionType.js.map +1 -0
- package/dist/types/IntersectionType.spec.d.ts +1 -0
- package/dist/types/IntersectionType.spec.js +150 -0
- package/dist/types/IntersectionType.spec.js.map +1 -0
- package/dist/types/InvalidType.d.ts +10 -5
- package/dist/types/InvalidType.js +21 -9
- package/dist/types/InvalidType.js.map +1 -1
- package/dist/types/InvalidType.spec.js +8 -4
- package/dist/types/InvalidType.spec.js.map +1 -1
- package/dist/types/LongIntegerType.d.ts +10 -5
- package/dist/types/LongIntegerType.js +21 -17
- package/dist/types/LongIntegerType.js.map +1 -1
- package/dist/types/LongIntegerType.spec.js +10 -4
- package/dist/types/LongIntegerType.spec.js.map +1 -1
- package/dist/types/NamespaceType.d.ts +12 -0
- package/dist/types/NamespaceType.js +28 -0
- package/dist/types/NamespaceType.js.map +1 -0
- package/dist/types/ObjectType.d.ts +12 -5
- package/dist/types/ObjectType.js +25 -8
- package/dist/types/ObjectType.js.map +1 -1
- package/dist/types/ObjectType.spec.js +3 -3
- package/dist/types/ObjectType.spec.js.map +1 -1
- package/dist/types/ReferenceType.d.ts +123 -0
- package/dist/types/ReferenceType.js +720 -0
- package/dist/types/ReferenceType.js.map +1 -0
- package/dist/types/ReferenceType.spec.d.ts +1 -0
- package/dist/types/ReferenceType.spec.js +151 -0
- package/dist/types/ReferenceType.spec.js.map +1 -0
- package/dist/types/StringType.d.ts +12 -5
- package/dist/types/StringType.js +23 -8
- package/dist/types/StringType.js.map +1 -1
- package/dist/types/StringType.spec.js +3 -3
- package/dist/types/StringType.spec.js.map +1 -1
- package/dist/types/TypeStatementType.d.ts +18 -0
- package/dist/types/TypeStatementType.js +45 -0
- package/dist/types/TypeStatementType.js.map +1 -0
- package/dist/types/TypedFunctionType.d.ts +34 -0
- package/dist/types/TypedFunctionType.js +147 -0
- package/dist/types/TypedFunctionType.js.map +1 -0
- package/dist/types/TypedFunctionType.spec.d.ts +1 -0
- package/dist/types/TypedFunctionType.spec.js +122 -0
- package/dist/types/TypedFunctionType.spec.js.map +1 -0
- package/dist/types/UninitializedType.d.ts +11 -6
- package/dist/types/UninitializedType.js +20 -11
- package/dist/types/UninitializedType.js.map +1 -1
- package/dist/types/UnionType.d.ts +27 -0
- package/dist/types/UnionType.js +193 -0
- package/dist/types/UnionType.js.map +1 -0
- package/dist/types/UnionType.spec.d.ts +1 -0
- package/dist/types/UnionType.spec.js +205 -0
- package/dist/types/UnionType.spec.js.map +1 -0
- package/dist/types/VoidType.d.ts +11 -5
- package/dist/types/VoidType.js +22 -8
- package/dist/types/VoidType.js.map +1 -1
- package/dist/types/VoidType.spec.js +3 -3
- package/dist/types/VoidType.spec.js.map +1 -1
- package/dist/types/helper.spec.d.ts +1 -0
- package/dist/types/helper.spec.js +174 -0
- package/dist/types/helper.spec.js.map +1 -0
- package/dist/types/helpers.d.ts +51 -0
- package/dist/types/helpers.js +323 -0
- package/dist/types/helpers.js.map +1 -0
- package/dist/types/index.d.ts +22 -0
- package/dist/types/index.js +39 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/roFunctionType.d.ts +11 -0
- package/dist/types/roFunctionType.js +37 -0
- package/dist/types/roFunctionType.js.map +1 -0
- package/dist/types/roFunctionType.spec.d.ts +1 -0
- package/dist/types/roFunctionType.spec.js +20 -0
- package/dist/types/roFunctionType.spec.js.map +1 -0
- package/dist/util.d.ts +288 -187
- package/dist/util.js +2018 -575
- package/dist/util.js.map +1 -1
- package/dist/validators/ClassValidator.d.ts +9 -15
- package/dist/validators/ClassValidator.js +93 -138
- package/dist/validators/ClassValidator.js.map +1 -1
- package/package.json +185 -138
- package/CHANGELOG.md +0 -1188
- package/dist/astUtils/index.d.ts +0 -7
- package/dist/astUtils/index.js +0 -26
- package/dist/astUtils/index.js.map +0 -1
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.d.ts +0 -7
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.js +0 -63
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.js.map +0 -1
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.js +0 -45
- package/dist/bscPlugin/semanticTokens/SemanticTokensProcessor.spec.js.map +0 -1
- package/dist/lexer/index.d.ts +0 -3
- package/dist/lexer/index.js +0 -17
- package/dist/lexer/index.js.map +0 -1
- package/dist/parser/SGTypes.spec.js +0 -351
- package/dist/parser/SGTypes.spec.js.map +0 -1
- package/dist/parser/index.d.ts +0 -3
- package/dist/parser/index.js +0 -16
- package/dist/parser/index.js.map +0 -1
- package/dist/preprocessor/Chunk.d.ts +0 -82
- package/dist/preprocessor/Chunk.js +0 -77
- package/dist/preprocessor/Chunk.js.map +0 -1
- package/dist/preprocessor/Preprocessor.d.ts +0 -60
- package/dist/preprocessor/Preprocessor.js +0 -156
- package/dist/preprocessor/Preprocessor.js.map +0 -1
- package/dist/preprocessor/Preprocessor.spec.js +0 -152
- package/dist/preprocessor/Preprocessor.spec.js.map +0 -1
- package/dist/preprocessor/PreprocessorParser.d.ts +0 -61
- package/dist/preprocessor/PreprocessorParser.js +0 -194
- package/dist/preprocessor/PreprocessorParser.js.map +0 -1
- package/dist/preprocessor/PreprocessorParser.spec.js +0 -116
- package/dist/preprocessor/PreprocessorParser.spec.js.map +0 -1
- package/dist/preprocessor/index.d.ts +0 -3
- package/dist/preprocessor/index.js +0 -16
- package/dist/preprocessor/index.js.map +0 -1
- package/dist/types/CustomType.d.ts +0 -10
- package/dist/types/CustomType.js +0 -35
- package/dist/types/CustomType.js.map +0 -1
- package/dist/types/FunctionType.spec.js +0 -29
- package/dist/types/FunctionType.spec.js.map +0 -1
- package/dist/types/LazyType.d.ts +0 -15
- package/dist/types/LazyType.js +0 -32
- package/dist/types/LazyType.js.map +0 -1
- /package/dist/{bscPlugin/semanticTokens/SemanticTokensProcessor.spec.d.ts → astUtils/CachedLookups.spec.d.ts} +0 -0
- /package/dist/{parser/SGTypes.spec.d.ts → astUtils/Editor.spec.d.ts} +0 -0
- /package/dist/{preprocessor/Preprocessor.spec.d.ts → bscPlugin/completions/CompletionsProcessor.spec.d.ts} +0 -0
- /package/dist/{preprocessor/PreprocessorParser.spec.d.ts → bscPlugin/definition/DefinitionProvider.spec.d.ts} +0 -0
- /package/dist/{types/FunctionType.spec.d.ts → bscPlugin/hover/HoverProcessor.spec.d.ts} +0 -0
package/dist/globalCallables.js
CHANGED
|
@@ -6,264 +6,284 @@ const ArrayType_1 = require("./types/ArrayType");
|
|
|
6
6
|
const BooleanType_1 = require("./types/BooleanType");
|
|
7
7
|
const DynamicType_1 = require("./types/DynamicType");
|
|
8
8
|
const FloatType_1 = require("./types/FloatType");
|
|
9
|
-
const
|
|
9
|
+
const TypedFunctionType_1 = require("./types/TypedFunctionType");
|
|
10
10
|
const IntegerType_1 = require("./types/IntegerType");
|
|
11
11
|
const ObjectType_1 = require("./types/ObjectType");
|
|
12
12
|
const StringType_1 = require("./types/StringType");
|
|
13
13
|
const VoidType_1 = require("./types/VoidType");
|
|
14
14
|
const util_1 = require("./util");
|
|
15
|
-
|
|
15
|
+
const UnionType_1 = require("./types/UnionType");
|
|
16
|
+
exports.globalFile = new BrsFile_1.BrsFile({ srcPath: 'global', destPath: 'global', program: null });
|
|
16
17
|
exports.globalFile.parse('');
|
|
17
18
|
let mathFunctions = [{
|
|
18
19
|
name: 'Abs',
|
|
19
20
|
shortDescription: 'Returns the absolute value of the argument.',
|
|
20
|
-
type: new
|
|
21
|
+
type: new TypedFunctionType_1.TypedFunctionType(FloatType_1.FloatType.instance),
|
|
21
22
|
file: exports.globalFile,
|
|
22
23
|
params: [{
|
|
23
24
|
name: 'x',
|
|
24
|
-
type:
|
|
25
|
+
type: FloatType_1.FloatType.instance,
|
|
26
|
+
isOptional: false
|
|
25
27
|
}]
|
|
26
28
|
}, {
|
|
27
29
|
name: 'Atn',
|
|
28
30
|
shortDescription: 'Returns the arctangent (in radians) of the argument.',
|
|
29
31
|
documentation: '`ATN(X)` returns "the angle whose tangent is X". To get arctangent in degrees, multiply `ATN(X)` by `57.29578`.',
|
|
30
|
-
type: new
|
|
32
|
+
type: new TypedFunctionType_1.TypedFunctionType(FloatType_1.FloatType.instance),
|
|
31
33
|
file: exports.globalFile,
|
|
32
34
|
params: [{
|
|
33
35
|
name: 'x',
|
|
34
|
-
type:
|
|
36
|
+
type: FloatType_1.FloatType.instance,
|
|
37
|
+
isOptional: false
|
|
35
38
|
}]
|
|
36
39
|
}, {
|
|
37
40
|
name: 'Cdbl',
|
|
38
41
|
shortDescription: 'Returns a single precision float representation of the argument. Someday may return double.',
|
|
39
|
-
type: new
|
|
42
|
+
type: new TypedFunctionType_1.TypedFunctionType(FloatType_1.FloatType.instance),
|
|
40
43
|
file: exports.globalFile,
|
|
41
44
|
params: [{
|
|
42
45
|
name: 'x',
|
|
43
|
-
type:
|
|
46
|
+
type: IntegerType_1.IntegerType.instance,
|
|
47
|
+
isOptional: false
|
|
44
48
|
}]
|
|
45
49
|
}, {
|
|
46
50
|
name: 'Cint',
|
|
47
51
|
shortDescription: 'Returns an integer representation of the argument, rounding up from midpoints. CINT(2.1) returns 2; CINT(2.5) returns 3; CINT(-2.2) returns -2; CINT(-2.5) returns -2; CINT(-2.6) returns -3.',
|
|
48
|
-
type: new
|
|
52
|
+
type: new TypedFunctionType_1.TypedFunctionType(IntegerType_1.IntegerType.instance),
|
|
49
53
|
file: exports.globalFile,
|
|
50
54
|
params: [{
|
|
51
55
|
name: 'x',
|
|
52
|
-
type:
|
|
56
|
+
type: FloatType_1.FloatType.instance,
|
|
57
|
+
isOptional: false
|
|
53
58
|
}]
|
|
54
59
|
}, {
|
|
55
60
|
name: 'Cos',
|
|
56
61
|
shortDescription: 'Returns the cosine of the argument (argument must be in radians). To obtain the cosine of X when X is in degrees, use CGS(X*.01745329).',
|
|
57
|
-
type: new
|
|
62
|
+
type: new TypedFunctionType_1.TypedFunctionType(FloatType_1.FloatType.instance),
|
|
58
63
|
file: exports.globalFile,
|
|
59
64
|
params: [{
|
|
60
65
|
name: 'x',
|
|
61
|
-
type:
|
|
66
|
+
type: FloatType_1.FloatType.instance,
|
|
67
|
+
isOptional: false
|
|
62
68
|
}]
|
|
63
69
|
}, {
|
|
64
70
|
name: 'Csng',
|
|
65
71
|
shortDescription: 'Returns a single-precision float representation of the argument.',
|
|
66
|
-
type: new
|
|
72
|
+
type: new TypedFunctionType_1.TypedFunctionType(FloatType_1.FloatType.instance),
|
|
67
73
|
file: exports.globalFile,
|
|
68
74
|
params: [{
|
|
69
75
|
name: 'x',
|
|
70
|
-
type:
|
|
76
|
+
type: IntegerType_1.IntegerType.instance,
|
|
77
|
+
isOptional: false
|
|
71
78
|
}]
|
|
72
79
|
}, {
|
|
73
80
|
name: 'Exp',
|
|
74
81
|
shortDescription: 'Returns the "natural exponential" of X, that is, ex. This is the inverse of the LOG function, so X=EXP(LOG(X)).',
|
|
75
|
-
type: new
|
|
82
|
+
type: new TypedFunctionType_1.TypedFunctionType(FloatType_1.FloatType.instance),
|
|
76
83
|
file: exports.globalFile,
|
|
77
84
|
params: [{
|
|
78
85
|
name: 'x',
|
|
79
|
-
type:
|
|
86
|
+
type: FloatType_1.FloatType.instance,
|
|
87
|
+
isOptional: false
|
|
80
88
|
}]
|
|
81
89
|
}, {
|
|
82
90
|
name: 'Fix',
|
|
83
91
|
shortDescription: 'Returns a truncated representation of the argument. All digits to the right of the decimal point are simply chopped off, so the resultant value is an integer. For non-negative X, FIX(X)=lNT(X). For negative values of X, FIX(X)=INT(X)+1. For example, FIX(2.2) returns 2, and FIX(-2.2) returns -2.',
|
|
84
|
-
type: new
|
|
92
|
+
type: new TypedFunctionType_1.TypedFunctionType(IntegerType_1.IntegerType.instance),
|
|
85
93
|
file: exports.globalFile,
|
|
86
94
|
params: [{
|
|
87
95
|
name: 'x',
|
|
88
|
-
type:
|
|
96
|
+
type: FloatType_1.FloatType.instance,
|
|
97
|
+
isOptional: false
|
|
89
98
|
}]
|
|
90
99
|
}, {
|
|
91
100
|
name: 'Int',
|
|
92
101
|
shortDescription: 'Returns an integer representation of the argument, using the largest whole number that is not greater than the argument.. INT(2.5) returns 2; INT(-2.5) returns -3; and INT(1000101.23) returns 10000101.',
|
|
93
|
-
type: new
|
|
102
|
+
type: new TypedFunctionType_1.TypedFunctionType(IntegerType_1.IntegerType.instance),
|
|
94
103
|
file: exports.globalFile,
|
|
95
104
|
params: [{
|
|
96
105
|
name: 'x',
|
|
97
|
-
type:
|
|
106
|
+
type: FloatType_1.FloatType.instance,
|
|
107
|
+
isOptional: false
|
|
98
108
|
}]
|
|
99
109
|
}, {
|
|
100
110
|
name: 'Log',
|
|
101
111
|
shortDescription: 'Returns the natural logarithm of the argument, that is, loge(x) or ln(x). This is the inverse of the EXP function, so LOG(EXP(X)) = X. To find the logarithm of a number to another base b, use the formula logb(X) = loge(X) / loge(b). For example, LOG(32767) / LOG(2) returns the logarithm to base 2 of 32767.',
|
|
102
|
-
type: new
|
|
112
|
+
type: new TypedFunctionType_1.TypedFunctionType(FloatType_1.FloatType.instance),
|
|
103
113
|
file: exports.globalFile,
|
|
104
114
|
params: [{
|
|
105
115
|
name: 'x',
|
|
106
|
-
type:
|
|
116
|
+
type: FloatType_1.FloatType.instance,
|
|
117
|
+
isOptional: false
|
|
107
118
|
}]
|
|
108
119
|
}, {
|
|
109
120
|
name: 'Rnd',
|
|
110
121
|
shortDescription: 'Generates a pseudo-random number using the current pseudo-random "seed number" (generated internally and not accessible to user).returns an integer between 1 and integer inclusive . For example, RND(55) returns a pseudo-random integer greater than zero and less than 56.',
|
|
111
|
-
type: new
|
|
122
|
+
type: new TypedFunctionType_1.TypedFunctionType(IntegerType_1.IntegerType.instance),
|
|
112
123
|
file: exports.globalFile,
|
|
113
124
|
params: [{
|
|
114
125
|
name: 'range',
|
|
115
|
-
type:
|
|
126
|
+
type: IntegerType_1.IntegerType.instance,
|
|
127
|
+
isOptional: false
|
|
116
128
|
}]
|
|
117
129
|
}, {
|
|
118
130
|
name: 'Rnd',
|
|
119
131
|
shortDescription: 'Generates a pseudo-random number using the current pseudo-random "seed number" (generated internally and not accessible to user). Returns a float value between 0 and 1.',
|
|
120
|
-
type: new
|
|
132
|
+
type: new TypedFunctionType_1.TypedFunctionType(FloatType_1.FloatType.instance),
|
|
121
133
|
file: exports.globalFile,
|
|
122
134
|
params: [{
|
|
123
135
|
name: '0',
|
|
124
|
-
type:
|
|
136
|
+
type: IntegerType_1.IntegerType.instance,
|
|
137
|
+
isOptional: false
|
|
125
138
|
}]
|
|
126
139
|
}, {
|
|
127
140
|
name: 'Sgn',
|
|
128
141
|
shortDescription: 'The "sign" function: returns -1 for X negative, 0 for X zero, and +1 for X positive.',
|
|
129
|
-
type: new
|
|
142
|
+
type: new TypedFunctionType_1.TypedFunctionType(IntegerType_1.IntegerType.instance),
|
|
130
143
|
file: exports.globalFile,
|
|
131
144
|
params: [{
|
|
132
145
|
name: 'x',
|
|
133
|
-
type:
|
|
146
|
+
type: FloatType_1.FloatType.instance,
|
|
147
|
+
isOptional: false
|
|
134
148
|
}]
|
|
135
149
|
}, {
|
|
136
150
|
name: 'Sgn',
|
|
137
151
|
shortDescription: 'The "sign" function: returns -1 for X negative, 0 for X zero, and +1 for X positive.',
|
|
138
|
-
type: new
|
|
152
|
+
type: new TypedFunctionType_1.TypedFunctionType(IntegerType_1.IntegerType.instance),
|
|
139
153
|
file: exports.globalFile,
|
|
140
154
|
params: [{
|
|
141
155
|
name: 'x',
|
|
142
|
-
type:
|
|
156
|
+
type: IntegerType_1.IntegerType.instance,
|
|
157
|
+
isOptional: false
|
|
143
158
|
}]
|
|
144
159
|
}, {
|
|
145
160
|
name: 'Sin',
|
|
146
161
|
shortDescription: 'Returns the sine of the argument (argument must be in radians). To obtain the sine of X when X is in degrees, use SIN(X*.01745329).',
|
|
147
|
-
type: new
|
|
162
|
+
type: new TypedFunctionType_1.TypedFunctionType(FloatType_1.FloatType.instance),
|
|
148
163
|
file: exports.globalFile,
|
|
149
164
|
params: [{
|
|
150
165
|
name: 'x',
|
|
151
|
-
type:
|
|
166
|
+
type: FloatType_1.FloatType.instance,
|
|
167
|
+
isOptional: false
|
|
152
168
|
}]
|
|
153
169
|
}, {
|
|
154
170
|
name: 'Sqr',
|
|
155
171
|
shortDescription: 'Returns the square root of the argument. SQR(X) is the same as X ^ (1/2), only faster.',
|
|
156
|
-
type: new
|
|
172
|
+
type: new TypedFunctionType_1.TypedFunctionType(FloatType_1.FloatType.instance),
|
|
157
173
|
file: exports.globalFile,
|
|
158
174
|
params: [{
|
|
159
175
|
name: 'x',
|
|
160
|
-
type:
|
|
176
|
+
type: FloatType_1.FloatType.instance,
|
|
177
|
+
isOptional: false
|
|
161
178
|
}]
|
|
162
179
|
}, {
|
|
163
180
|
name: 'Tan',
|
|
164
181
|
shortDescription: 'Returns the tangent of the argument (argument must be in radians). To obtain the tangent of X when X is in degrees, use TAN(X*.01745329).',
|
|
165
|
-
type: new
|
|
182
|
+
type: new TypedFunctionType_1.TypedFunctionType(FloatType_1.FloatType.instance),
|
|
166
183
|
file: exports.globalFile,
|
|
167
184
|
params: [{
|
|
168
185
|
name: 'x',
|
|
169
|
-
type:
|
|
186
|
+
type: FloatType_1.FloatType.instance,
|
|
187
|
+
isOptional: false
|
|
170
188
|
}]
|
|
171
189
|
}];
|
|
172
190
|
let runtimeFunctions = [{
|
|
173
191
|
name: 'CreateObject',
|
|
174
192
|
shortDescription: 'Creates a BrightScript Component of class classname specified. Return invalid if the object creation fails. Some Objects have optional parameters in their constructor that are passed after name.',
|
|
175
|
-
type: new
|
|
193
|
+
type: new TypedFunctionType_1.TypedFunctionType(ObjectType_1.ObjectType.instance),
|
|
176
194
|
file: exports.globalFile,
|
|
177
195
|
params: [{
|
|
178
196
|
name: 'name',
|
|
179
|
-
type:
|
|
197
|
+
type: StringType_1.StringType.instance,
|
|
198
|
+
isOptional: false
|
|
180
199
|
}, {
|
|
181
200
|
name: 'param2',
|
|
182
|
-
type:
|
|
201
|
+
type: DynamicType_1.DynamicType.instance,
|
|
183
202
|
isOptional: true
|
|
184
203
|
}, {
|
|
185
204
|
name: 'param3',
|
|
186
|
-
type:
|
|
205
|
+
type: DynamicType_1.DynamicType.instance,
|
|
187
206
|
isOptional: true
|
|
188
207
|
}, {
|
|
189
208
|
name: 'param4',
|
|
190
|
-
type:
|
|
209
|
+
type: DynamicType_1.DynamicType.instance,
|
|
210
|
+
isOptional: true
|
|
211
|
+
}, {
|
|
212
|
+
name: 'param5',
|
|
213
|
+
type: DynamicType_1.DynamicType.instance,
|
|
214
|
+
isOptional: true
|
|
215
|
+
}, {
|
|
216
|
+
name: 'param6',
|
|
217
|
+
type: DynamicType_1.DynamicType.instance,
|
|
191
218
|
isOptional: true
|
|
192
219
|
}]
|
|
193
220
|
}, {
|
|
194
221
|
name: 'Type',
|
|
195
222
|
shortDescription: 'Returns the type of a variable and/or object. See the BrightScript Component specification for a list of types.',
|
|
196
|
-
type: new
|
|
223
|
+
type: new TypedFunctionType_1.TypedFunctionType(StringType_1.StringType.instance),
|
|
197
224
|
file: exports.globalFile,
|
|
198
225
|
params: [{
|
|
199
226
|
name: 'variable',
|
|
200
|
-
type:
|
|
227
|
+
type: ObjectType_1.ObjectType.instance,
|
|
228
|
+
isOptional: false
|
|
201
229
|
}, {
|
|
202
230
|
name: 'version',
|
|
203
|
-
type:
|
|
231
|
+
type: IntegerType_1.IntegerType.instance,
|
|
204
232
|
isOptional: true
|
|
205
233
|
}]
|
|
206
234
|
}, {
|
|
207
235
|
name: 'GetGlobalAA',
|
|
208
236
|
shortDescription: 'Each script has a global Associative Array. It can be fetched with this function. ',
|
|
209
|
-
type: new
|
|
237
|
+
type: new TypedFunctionType_1.TypedFunctionType(ObjectType_1.ObjectType.instance),
|
|
210
238
|
file: exports.globalFile,
|
|
211
239
|
params: []
|
|
212
240
|
}, {
|
|
213
241
|
name: 'Box',
|
|
214
242
|
shortDescription: 'Box() will return an object version of an intrinsic type, or pass through an object if given one.',
|
|
215
|
-
type: new
|
|
243
|
+
type: new TypedFunctionType_1.TypedFunctionType(ObjectType_1.ObjectType.instance),
|
|
216
244
|
file: exports.globalFile,
|
|
217
245
|
params: [{
|
|
218
246
|
name: 'x',
|
|
219
|
-
type:
|
|
220
|
-
|
|
221
|
-
}, {
|
|
222
|
-
name: 'Run',
|
|
223
|
-
shortDescription: `The Run function can be used to compile and run a script dynamically.\nThe file specified by that path is compiled and run.\nArguments may be passed to the script's Main function, and that script may return a result value.'`,
|
|
224
|
-
type: new FunctionType_1.FunctionType(new DynamicType_1.DynamicType()),
|
|
225
|
-
file: exports.globalFile,
|
|
226
|
-
params: [{
|
|
227
|
-
name: 'filename',
|
|
228
|
-
type: new StringType_1.StringType()
|
|
229
|
-
}, {
|
|
230
|
-
name: 'arg',
|
|
231
|
-
type: new DynamicType_1.DynamicType(),
|
|
232
|
-
isRestArgument: true
|
|
247
|
+
type: DynamicType_1.DynamicType.instance,
|
|
248
|
+
isOptional: false
|
|
233
249
|
}]
|
|
234
250
|
}, {
|
|
235
251
|
name: 'Run',
|
|
236
252
|
shortDescription: `The Run function can be used to compile and run a script dynamically.\nAll files specified are compiled together, then run.\nArguments may be passed to the script's Main function, and that script may return a result value.'`,
|
|
237
|
-
type: new
|
|
253
|
+
type: new TypedFunctionType_1.TypedFunctionType(DynamicType_1.DynamicType.instance),
|
|
238
254
|
file: exports.globalFile,
|
|
255
|
+
isDeprecated: true,
|
|
239
256
|
params: [{
|
|
240
257
|
name: 'filename',
|
|
241
|
-
type: new ArrayType_1.ArrayType(
|
|
258
|
+
type: new UnionType_1.UnionType([new ArrayType_1.ArrayType(StringType_1.StringType.instance), StringType_1.StringType.instance]),
|
|
259
|
+
isOptional: false
|
|
242
260
|
}, {
|
|
243
261
|
name: 'arg',
|
|
244
|
-
type:
|
|
245
|
-
isRestArgument: true
|
|
262
|
+
type: DynamicType_1.DynamicType.instance,
|
|
263
|
+
isRestArgument: true,
|
|
264
|
+
isOptional: true
|
|
246
265
|
}]
|
|
247
266
|
}, {
|
|
248
267
|
name: 'Eval',
|
|
249
268
|
shortDescription: `Eval can be used to run a code snippet in the context of the current function. It performs a compile, and then the bytecode execution.\nIf a compilation error occurs, no bytecode execution is performed, and Eval returns an roList with one or more compile errors. Each list entry is an roAssociativeArray with ERRNO and ERRSTR keys describing the error.\nIf compilation succeeds, bytecode execution is performed and the integer runtime error code is returned. These are the same error codes as returned by GetLastRunRuntimeError().\nEval() can be usefully in two cases. The first is when you need to dynamically generate code at runtime.\nThe other is if you need to execute a statement that could result in a runtime error, but you don't want code execution to stop. '`,
|
|
250
|
-
type: new
|
|
269
|
+
type: new TypedFunctionType_1.TypedFunctionType(DynamicType_1.DynamicType.instance),
|
|
251
270
|
file: exports.globalFile,
|
|
252
271
|
isDeprecated: true,
|
|
253
272
|
params: [{
|
|
254
273
|
name: 'code',
|
|
255
|
-
type:
|
|
274
|
+
type: StringType_1.StringType.instance,
|
|
275
|
+
isOptional: false
|
|
256
276
|
}]
|
|
257
277
|
}, {
|
|
258
278
|
name: 'GetLastRunCompileError',
|
|
259
279
|
shortDescription: 'Returns an roList of compile errors, or invalid if no errors. Each list entry is an roAssociativeArray with the keys: ERRNO, ERRSTR, FILESPEC, and LINENO.',
|
|
260
|
-
type: new
|
|
280
|
+
type: new TypedFunctionType_1.TypedFunctionType(ObjectType_1.ObjectType.instance),
|
|
261
281
|
file: exports.globalFile,
|
|
262
282
|
params: []
|
|
263
283
|
}, {
|
|
264
284
|
name: 'GetLastRunRuntimeError',
|
|
265
285
|
shortDescription: 'Returns an error code result after the last script Run().These are normal:\\,&hFF==ERR_OKAY\\n&hFC==ERR_NORMAL_END\\n&hE2==ERR_VALUE_RETURN',
|
|
266
|
-
type: new
|
|
286
|
+
type: new TypedFunctionType_1.TypedFunctionType(IntegerType_1.IntegerType.instance),
|
|
267
287
|
file: exports.globalFile,
|
|
268
288
|
params: []
|
|
269
289
|
}];
|
|
@@ -271,116 +291,132 @@ let globalUtilityFunctions = [
|
|
|
271
291
|
{
|
|
272
292
|
name: 'Sleep',
|
|
273
293
|
shortDescription: 'This function causes the script to pause for the specified time, without wasting CPU cycles. There are 1000 milliseconds in one second.',
|
|
274
|
-
type: new
|
|
294
|
+
type: new TypedFunctionType_1.TypedFunctionType(VoidType_1.VoidType.instance),
|
|
275
295
|
file: exports.globalFile,
|
|
276
296
|
params: [{
|
|
277
297
|
name: 'milliseconds',
|
|
278
|
-
type:
|
|
298
|
+
type: IntegerType_1.IntegerType.instance,
|
|
299
|
+
isOptional: false
|
|
279
300
|
}]
|
|
280
301
|
}, {
|
|
281
302
|
name: 'Wait',
|
|
282
303
|
shortDescription: 'This function waits on objects that are "waitable" (those that have a MessagePort interface). Wait() returns the event object that was posted to the message port. If timeout is zero, "wait" will wait for ever. Otherwise, Wait will return after timeout milliseconds if no messages are received. In this case, Wait returns a type "invalid".',
|
|
283
|
-
type: new
|
|
304
|
+
type: new TypedFunctionType_1.TypedFunctionType(ObjectType_1.ObjectType.instance),
|
|
284
305
|
file: exports.globalFile,
|
|
285
306
|
params: [{
|
|
286
307
|
name: 'timeout',
|
|
287
|
-
type:
|
|
308
|
+
type: IntegerType_1.IntegerType.instance,
|
|
309
|
+
isOptional: false
|
|
288
310
|
}, {
|
|
289
311
|
name: 'port',
|
|
290
|
-
type:
|
|
312
|
+
type: ObjectType_1.ObjectType.instance,
|
|
313
|
+
isOptional: false
|
|
291
314
|
}]
|
|
292
315
|
}, {
|
|
293
316
|
name: 'GetInterface',
|
|
294
317
|
shortDescription: 'Each BrightScript Component has one or more interfaces. This function returns a value of type "Interface". \nNote that generally BrightScript Components allow you to skip the interface specification. In which case, the appropriate interface within the object is used. This works as long as the function names within the interfaces are unique.',
|
|
295
|
-
type: new
|
|
318
|
+
type: new TypedFunctionType_1.TypedFunctionType(ObjectType_1.ObjectType.instance),
|
|
296
319
|
file: exports.globalFile,
|
|
297
320
|
params: [{
|
|
298
321
|
name: 'object',
|
|
299
|
-
type:
|
|
322
|
+
type: ObjectType_1.ObjectType.instance,
|
|
323
|
+
isOptional: false
|
|
300
324
|
}, {
|
|
301
325
|
name: 'ifname',
|
|
302
|
-
type:
|
|
326
|
+
type: StringType_1.StringType.instance,
|
|
327
|
+
isOptional: false
|
|
303
328
|
}]
|
|
304
329
|
}, {
|
|
305
330
|
name: 'FindMemberFunction',
|
|
306
331
|
shortDescription: 'Returns the interface from the object that provides the specified function, or invalid if not found.',
|
|
307
|
-
type: new
|
|
332
|
+
type: new TypedFunctionType_1.TypedFunctionType(ObjectType_1.ObjectType.instance),
|
|
308
333
|
file: exports.globalFile,
|
|
309
334
|
params: [{
|
|
310
335
|
name: 'object',
|
|
311
|
-
type:
|
|
336
|
+
type: ObjectType_1.ObjectType.instance,
|
|
337
|
+
isOptional: false
|
|
312
338
|
}, {
|
|
313
339
|
name: 'functionName',
|
|
314
|
-
type:
|
|
340
|
+
type: StringType_1.StringType.instance,
|
|
341
|
+
isOptional: false
|
|
315
342
|
}]
|
|
316
343
|
}, {
|
|
317
344
|
name: 'UpTime',
|
|
318
345
|
shortDescription: 'Returns the uptime of the system since the last reboot in seconds.',
|
|
319
|
-
type: new
|
|
346
|
+
type: new TypedFunctionType_1.TypedFunctionType(FloatType_1.FloatType.instance),
|
|
320
347
|
file: exports.globalFile,
|
|
321
348
|
params: [{
|
|
322
349
|
name: 'dummy',
|
|
323
|
-
type:
|
|
350
|
+
type: IntegerType_1.IntegerType.instance,
|
|
351
|
+
isOptional: false
|
|
324
352
|
}]
|
|
325
353
|
}, {
|
|
326
354
|
name: 'RebootSystem',
|
|
327
355
|
shortDescription: 'Requests the system to perform a soft reboot. The Roku platform has disabled this feature.',
|
|
328
|
-
type: new
|
|
356
|
+
type: new TypedFunctionType_1.TypedFunctionType(VoidType_1.VoidType.instance),
|
|
329
357
|
file: exports.globalFile,
|
|
330
358
|
params: []
|
|
331
359
|
}, {
|
|
332
360
|
name: 'ListDir',
|
|
333
361
|
shortDescription: 'Returns a List object containing the contents of the directory path specified.',
|
|
334
|
-
type: new
|
|
362
|
+
type: new TypedFunctionType_1.TypedFunctionType(ObjectType_1.ObjectType.instance),
|
|
335
363
|
file: exports.globalFile,
|
|
336
364
|
params: [{
|
|
337
365
|
name: 'path',
|
|
338
|
-
type:
|
|
366
|
+
type: StringType_1.StringType.instance,
|
|
367
|
+
isOptional: false
|
|
339
368
|
}]
|
|
340
369
|
}, {
|
|
341
370
|
name: 'ReadAsciiFile',
|
|
342
371
|
shortDescription: 'This function reads the specified file and returns the data as a string.\nThe file can be encoded as either UTF-8 (which includes the 7-bit ASCII subset) or UTF-16.\nAn empty string is returned if the file can not be read.',
|
|
343
|
-
type: new
|
|
372
|
+
type: new TypedFunctionType_1.TypedFunctionType(StringType_1.StringType.instance),
|
|
344
373
|
file: exports.globalFile,
|
|
345
374
|
params: [{
|
|
346
375
|
name: 'filePath',
|
|
347
|
-
type:
|
|
376
|
+
type: StringType_1.StringType.instance,
|
|
377
|
+
isOptional: false
|
|
348
378
|
}]
|
|
349
379
|
}, {
|
|
350
380
|
name: 'WriteAsciiFile',
|
|
351
381
|
shortDescription: 'This function writes the specified string data to a file at the specified location.\nThe string data is written as UTF-8 encoded (which includes the 7-bit ASCII subset).\nThe function returns true if the file was successfully written.',
|
|
352
|
-
type: new
|
|
382
|
+
type: new TypedFunctionType_1.TypedFunctionType(BooleanType_1.BooleanType.instance),
|
|
353
383
|
file: exports.globalFile,
|
|
354
384
|
params: [{
|
|
355
385
|
name: 'filePath',
|
|
356
|
-
type:
|
|
386
|
+
type: StringType_1.StringType.instance,
|
|
387
|
+
isOptional: false
|
|
357
388
|
}, {
|
|
358
389
|
name: 'text',
|
|
359
|
-
type:
|
|
390
|
+
type: StringType_1.StringType.instance,
|
|
391
|
+
isOptional: false
|
|
360
392
|
}]
|
|
361
393
|
}, {
|
|
362
394
|
name: 'CopyFile',
|
|
363
395
|
shortDescription: 'Make a copy of a file.',
|
|
364
|
-
type: new
|
|
396
|
+
type: new TypedFunctionType_1.TypedFunctionType(BooleanType_1.BooleanType.instance),
|
|
365
397
|
file: exports.globalFile,
|
|
366
398
|
params: [{
|
|
367
399
|
name: 'source',
|
|
368
|
-
type:
|
|
400
|
+
type: StringType_1.StringType.instance,
|
|
401
|
+
isOptional: false
|
|
369
402
|
}, {
|
|
370
403
|
name: 'destination',
|
|
371
|
-
type:
|
|
404
|
+
type: StringType_1.StringType.instance,
|
|
405
|
+
isOptional: false
|
|
372
406
|
}]
|
|
373
407
|
}, {
|
|
374
408
|
name: 'MoveFile',
|
|
375
409
|
shortDescription: 'Rename a file.',
|
|
376
|
-
type: new
|
|
410
|
+
type: new TypedFunctionType_1.TypedFunctionType(BooleanType_1.BooleanType.instance),
|
|
377
411
|
file: exports.globalFile,
|
|
378
412
|
params: [{
|
|
379
413
|
name: 'source',
|
|
380
|
-
type:
|
|
414
|
+
type: StringType_1.StringType.instance,
|
|
415
|
+
isOptional: false
|
|
381
416
|
}, {
|
|
382
417
|
name: 'destination',
|
|
383
|
-
type:
|
|
418
|
+
type: StringType_1.StringType.instance,
|
|
419
|
+
isOptional: false
|
|
384
420
|
}]
|
|
385
421
|
}, {
|
|
386
422
|
name: 'MatchFiles',
|
|
@@ -395,67 +431,75 @@ A '*' matches zero or more arbitrary characters.
|
|
|
395
431
|
The character class '[...]' matches any single character specified within the brackets. The closing bracket is treated as a member of the character class if it immediately follows the opening bracket. i.e. '[]]' matches a single close bracket. Within the class '-' can be used to specify a range unless it is the first or last character. e.g. '[A-Cf-h]' is equivalent to '[ABCfgh]'.
|
|
396
432
|
A character class can be negated by specifying '^' as the first character. To match a literal '^' place it elsewhere within the class.
|
|
397
433
|
The characters '?', '*' and '[' lose their special meaning if preceded by a single '\\'. A single '\\' can be matched as '\\\\'.`,
|
|
398
|
-
type: new
|
|
434
|
+
type: new TypedFunctionType_1.TypedFunctionType(new ArrayType_1.ArrayType(StringType_1.StringType.instance)),
|
|
399
435
|
file: exports.globalFile,
|
|
400
436
|
params: [{
|
|
401
437
|
name: 'path',
|
|
402
|
-
type:
|
|
438
|
+
type: StringType_1.StringType.instance,
|
|
439
|
+
isOptional: false
|
|
403
440
|
}, {
|
|
404
441
|
name: 'pattern_in',
|
|
405
|
-
type:
|
|
442
|
+
type: StringType_1.StringType.instance,
|
|
443
|
+
isOptional: false
|
|
406
444
|
}]
|
|
407
445
|
}, {
|
|
408
446
|
name: 'DeleteFile',
|
|
409
447
|
shortDescription: 'Delete the specified file.',
|
|
410
|
-
type: new
|
|
448
|
+
type: new TypedFunctionType_1.TypedFunctionType(BooleanType_1.BooleanType.instance),
|
|
411
449
|
file: exports.globalFile,
|
|
412
450
|
params: [{
|
|
413
451
|
name: 'file',
|
|
414
|
-
type:
|
|
452
|
+
type: StringType_1.StringType.instance,
|
|
453
|
+
isOptional: false
|
|
415
454
|
}]
|
|
416
455
|
}, {
|
|
417
456
|
name: 'DeleteDirectory',
|
|
418
457
|
shortDescription: 'Deletes the specified directory. It is only possible to delete an empty directory.',
|
|
419
|
-
type: new
|
|
458
|
+
type: new TypedFunctionType_1.TypedFunctionType(BooleanType_1.BooleanType.instance),
|
|
420
459
|
file: exports.globalFile,
|
|
421
460
|
params: [{
|
|
422
461
|
name: 'dir',
|
|
423
|
-
type:
|
|
462
|
+
type: StringType_1.StringType.instance,
|
|
463
|
+
isOptional: false
|
|
424
464
|
}]
|
|
425
465
|
}, {
|
|
426
466
|
name: 'CreateDirectory',
|
|
427
467
|
shortDescription: 'Creates the specified Directory. Only one directory can be created at a time',
|
|
428
|
-
type: new
|
|
468
|
+
type: new TypedFunctionType_1.TypedFunctionType(BooleanType_1.BooleanType.instance),
|
|
429
469
|
file: exports.globalFile,
|
|
430
470
|
params: [{
|
|
431
471
|
name: 'dir',
|
|
432
|
-
type:
|
|
472
|
+
type: StringType_1.StringType.instance,
|
|
473
|
+
isOptional: false
|
|
433
474
|
}]
|
|
434
475
|
}, {
|
|
435
476
|
name: 'FormatDrive',
|
|
436
477
|
shortDescription: 'Formats a specified drive using the specified filesystem.',
|
|
437
|
-
type: new
|
|
478
|
+
type: new TypedFunctionType_1.TypedFunctionType(BooleanType_1.BooleanType.instance),
|
|
438
479
|
file: exports.globalFile,
|
|
439
480
|
params: [{
|
|
440
481
|
name: 'drive',
|
|
441
|
-
type:
|
|
482
|
+
type: StringType_1.StringType.instance,
|
|
483
|
+
isOptional: false
|
|
442
484
|
}, {
|
|
443
485
|
name: 'fs_type',
|
|
444
|
-
type:
|
|
486
|
+
type: StringType_1.StringType.instance,
|
|
487
|
+
isOptional: false
|
|
445
488
|
}]
|
|
446
489
|
}, {
|
|
447
490
|
name: 'StrToI',
|
|
448
491
|
shortDescription: 'Return the integer value of the string, or 0 if nothing is parsed.',
|
|
449
|
-
type: new
|
|
492
|
+
type: new TypedFunctionType_1.TypedFunctionType(IntegerType_1.IntegerType.instance),
|
|
450
493
|
file: exports.globalFile,
|
|
451
494
|
params: [{
|
|
452
495
|
name: 'str',
|
|
453
|
-
type:
|
|
496
|
+
type: StringType_1.StringType.instance,
|
|
497
|
+
isOptional: false
|
|
454
498
|
}]
|
|
455
499
|
}, {
|
|
456
500
|
name: 'RunGarbageCollector',
|
|
457
501
|
shortDescription: `This function runs the garbage collector. It returns and Associative Array with some statistics regarding the garbage collection. \nSee the Garbage Collection section of the manual for more detail. You don't normally need to call this function.`,
|
|
458
|
-
type: new
|
|
502
|
+
type: new TypedFunctionType_1.TypedFunctionType(ObjectType_1.ObjectType.instance),
|
|
459
503
|
file: exports.globalFile,
|
|
460
504
|
params: []
|
|
461
505
|
}, {
|
|
@@ -465,15 +509,16 @@ The characters '?', '*' and '[' lose their special meaning if preceded by a sing
|
|
|
465
509
|
Any roAssociativeArray objects in the returned objects will be case sensitive. As of Roku OS 9.4, to return a case-insensitive structure, set the flags parameter to "i".
|
|
466
510
|
If the "i" option is used, and the jsonString includes multiple keys that match case-insensitively, duplicates are overwritten and only the last matching values are preserved.
|
|
467
511
|
An error will be returned if arrays/associative arrays are nested more than 256 levels deep.`,
|
|
468
|
-
type: new
|
|
512
|
+
type: new TypedFunctionType_1.TypedFunctionType(ObjectType_1.ObjectType.instance),
|
|
469
513
|
file: exports.globalFile,
|
|
470
514
|
params: [{
|
|
471
515
|
name: 'jsonString',
|
|
472
|
-
type:
|
|
516
|
+
type: StringType_1.StringType.instance,
|
|
517
|
+
isOptional: false
|
|
473
518
|
},
|
|
474
519
|
{
|
|
475
520
|
name: 'flags',
|
|
476
|
-
type:
|
|
521
|
+
type: StringType_1.StringType.instance,
|
|
477
522
|
isOptional: true
|
|
478
523
|
}]
|
|
479
524
|
}, {
|
|
@@ -487,14 +532,15 @@ An error will be returned if arrays/associative arrays are nested more than 256
|
|
|
487
532
|
If an error occurs an empty string will be returned.
|
|
488
533
|
|
|
489
534
|
Normally non-ASCII characters are escaped in the output string as "\\uXXXX" where XXXX is the hexadecimal representation of the Unicode character value. If flags=1, non-ASCII characters are not escaped.`,
|
|
490
|
-
type: new
|
|
535
|
+
type: new TypedFunctionType_1.TypedFunctionType(StringType_1.StringType.instance),
|
|
491
536
|
file: exports.globalFile,
|
|
492
537
|
params: [{
|
|
493
538
|
name: 'object',
|
|
494
|
-
type:
|
|
539
|
+
type: ObjectType_1.ObjectType.instance,
|
|
540
|
+
isOptional: false
|
|
495
541
|
}, {
|
|
496
542
|
name: 'flags',
|
|
497
|
-
type: new StringType_1.StringType
|
|
543
|
+
type: new UnionType_1.UnionType([IntegerType_1.IntegerType.instance, StringType_1.StringType.instance]),
|
|
498
544
|
isOptional: true
|
|
499
545
|
}]
|
|
500
546
|
}, {
|
|
@@ -503,11 +549,12 @@ Normally non-ASCII characters are escaped in the output string as "\\uXXXX" wher
|
|
|
503
549
|
|
|
504
550
|
In some cases you may want to include a placeholder marker in a localizable string that gets dynamically substituted with a value at runtime.
|
|
505
551
|
One way to accomplish that is to use the Replace method on the string value returned from the Tr() lookup.`,
|
|
506
|
-
type: new
|
|
552
|
+
type: new TypedFunctionType_1.TypedFunctionType(StringType_1.StringType.instance),
|
|
507
553
|
file: exports.globalFile,
|
|
508
554
|
params: [{
|
|
509
555
|
name: 'source',
|
|
510
|
-
type:
|
|
556
|
+
type: StringType_1.StringType.instance,
|
|
557
|
+
isOptional: false
|
|
511
558
|
}]
|
|
512
559
|
}
|
|
513
560
|
];
|
|
@@ -515,29 +562,32 @@ let globalStringFunctions = [
|
|
|
515
562
|
{
|
|
516
563
|
name: 'UCase',
|
|
517
564
|
shortDescription: 'Converts the string to all upper case.',
|
|
518
|
-
type: new
|
|
565
|
+
type: new TypedFunctionType_1.TypedFunctionType(StringType_1.StringType.instance),
|
|
519
566
|
file: exports.globalFile,
|
|
520
567
|
params: [{
|
|
521
568
|
name: 's',
|
|
522
|
-
type:
|
|
569
|
+
type: StringType_1.StringType.instance,
|
|
570
|
+
isOptional: false
|
|
523
571
|
}]
|
|
524
572
|
}, {
|
|
525
573
|
name: 'LCase',
|
|
526
574
|
shortDescription: 'Converts the string to all lower case.',
|
|
527
|
-
type: new
|
|
575
|
+
type: new TypedFunctionType_1.TypedFunctionType(StringType_1.StringType.instance),
|
|
528
576
|
file: exports.globalFile,
|
|
529
577
|
params: [{
|
|
530
578
|
name: 's',
|
|
531
|
-
type:
|
|
579
|
+
type: StringType_1.StringType.instance,
|
|
580
|
+
isOptional: false
|
|
532
581
|
}]
|
|
533
582
|
}, {
|
|
534
583
|
name: 'Asc',
|
|
535
584
|
shortDescription: 'Returns the Unicode ("ASCII") value for the first character of the specified string\n An empty string argument will return 0.',
|
|
536
|
-
type: new
|
|
585
|
+
type: new TypedFunctionType_1.TypedFunctionType(IntegerType_1.IntegerType.instance),
|
|
537
586
|
file: exports.globalFile,
|
|
538
587
|
params: [{
|
|
539
588
|
name: 'letter',
|
|
540
|
-
type:
|
|
589
|
+
type: StringType_1.StringType.instance,
|
|
590
|
+
isOptional: false
|
|
541
591
|
}]
|
|
542
592
|
}, {
|
|
543
593
|
name: 'Chr',
|
|
@@ -548,164 +598,179 @@ let globalStringFunctions = [
|
|
|
548
598
|
By using Chr, you can create strings containing characters which cannot be contained in quotes, such as newline or the quote character itself.
|
|
549
599
|
|
|
550
600
|
print (Chr(34) + "hello" + Chr(34)) ' prints: "hello"`,
|
|
551
|
-
type: new
|
|
601
|
+
type: new TypedFunctionType_1.TypedFunctionType(StringType_1.StringType.instance),
|
|
552
602
|
file: exports.globalFile,
|
|
553
603
|
params: [{
|
|
554
604
|
name: 'ch',
|
|
555
|
-
type:
|
|
605
|
+
type: IntegerType_1.IntegerType.instance,
|
|
606
|
+
isOptional: false
|
|
556
607
|
}]
|
|
557
608
|
}, {
|
|
558
609
|
name: 'Instr',
|
|
559
610
|
shortDescription: 'Returns the position of the first instances of substring within text, starting at the specified start position.\nReturns 0 if the substring is not found. Unlike the ifString.Instr() method, the first position is 1.',
|
|
560
|
-
type: new
|
|
611
|
+
type: new TypedFunctionType_1.TypedFunctionType(IntegerType_1.IntegerType.instance),
|
|
561
612
|
file: exports.globalFile,
|
|
562
613
|
params: [{
|
|
563
|
-
name: '
|
|
564
|
-
type:
|
|
614
|
+
name: 'startOrText',
|
|
615
|
+
type: (0, UnionType_1.unionTypeFactory)([IntegerType_1.IntegerType.instance, StringType_1.StringType.instance]),
|
|
616
|
+
isOptional: false
|
|
565
617
|
}, {
|
|
566
|
-
name: '
|
|
567
|
-
type:
|
|
618
|
+
name: 'textOrSubstring',
|
|
619
|
+
type: StringType_1.StringType.instance,
|
|
620
|
+
isOptional: false
|
|
568
621
|
}, {
|
|
569
622
|
name: 'substring',
|
|
570
|
-
type:
|
|
623
|
+
type: StringType_1.StringType.instance,
|
|
624
|
+
isOptional: true
|
|
571
625
|
}]
|
|
572
626
|
}, {
|
|
573
627
|
name: 'Left',
|
|
574
628
|
shortDescription: 'Returns the first n characters of s. ',
|
|
575
|
-
type: new
|
|
629
|
+
type: new TypedFunctionType_1.TypedFunctionType(StringType_1.StringType.instance),
|
|
576
630
|
file: exports.globalFile,
|
|
577
631
|
params: [{
|
|
578
632
|
name: 's',
|
|
579
|
-
type:
|
|
633
|
+
type: StringType_1.StringType.instance,
|
|
634
|
+
isOptional: false
|
|
580
635
|
}, {
|
|
581
636
|
name: 'n',
|
|
582
|
-
type:
|
|
637
|
+
type: IntegerType_1.IntegerType.instance,
|
|
638
|
+
isOptional: false
|
|
583
639
|
}]
|
|
584
640
|
}, {
|
|
585
641
|
name: 'Len',
|
|
586
642
|
shortDescription: 'Returns the number of characters in the specified string.',
|
|
587
|
-
type: new
|
|
643
|
+
type: new TypedFunctionType_1.TypedFunctionType(IntegerType_1.IntegerType.instance),
|
|
588
644
|
file: exports.globalFile,
|
|
589
645
|
params: [{
|
|
590
646
|
name: 's',
|
|
591
|
-
type:
|
|
647
|
+
type: StringType_1.StringType.instance,
|
|
648
|
+
isOptional: false
|
|
592
649
|
}]
|
|
593
650
|
}, {
|
|
594
651
|
name: 'Mid',
|
|
595
652
|
shortDescription: 'Returns a substring of s with length n and starting at position p.\nn may be omitted, in which case the string starting at p and ending at the end of the string is returned.\nUnlike the ifString.Mid() method, the first character in the string is position 1.',
|
|
596
|
-
type: new
|
|
653
|
+
type: new TypedFunctionType_1.TypedFunctionType(StringType_1.StringType.instance),
|
|
597
654
|
file: exports.globalFile,
|
|
598
655
|
params: [{
|
|
599
656
|
name: 's',
|
|
600
|
-
type:
|
|
657
|
+
type: StringType_1.StringType.instance,
|
|
658
|
+
isOptional: false
|
|
601
659
|
}, {
|
|
602
660
|
name: 'p',
|
|
603
|
-
description: '1-based position',
|
|
604
|
-
|
|
661
|
+
//description: '1-based position',
|
|
662
|
+
isOptional: false,
|
|
663
|
+
type: IntegerType_1.IntegerType.instance
|
|
605
664
|
}, {
|
|
606
665
|
name: 'n',
|
|
607
|
-
type:
|
|
666
|
+
type: IntegerType_1.IntegerType.instance,
|
|
608
667
|
isOptional: true
|
|
609
668
|
}]
|
|
610
669
|
}, {
|
|
611
670
|
name: 'Right',
|
|
612
671
|
shortDescription: 'Returns the last n characters of s.',
|
|
613
|
-
type: new
|
|
672
|
+
type: new TypedFunctionType_1.TypedFunctionType(StringType_1.StringType.instance),
|
|
614
673
|
file: exports.globalFile,
|
|
615
674
|
params: [{
|
|
616
675
|
name: 's',
|
|
617
|
-
type:
|
|
676
|
+
type: StringType_1.StringType.instance,
|
|
677
|
+
isOptional: false
|
|
618
678
|
}, {
|
|
619
679
|
name: 'n',
|
|
620
|
-
type:
|
|
680
|
+
type: IntegerType_1.IntegerType.instance,
|
|
681
|
+
isOptional: false
|
|
621
682
|
}]
|
|
622
683
|
}, {
|
|
623
684
|
name: 'Str',
|
|
624
685
|
shortDescription: 'Converts a value to a string. Str(A), for example, returns a string equal to the decimal representation of the numeric value of A.\nNote: for non-negative numbers, a leading blank is inserted before the value string as a sign placeholder.',
|
|
625
|
-
type: new
|
|
686
|
+
type: new TypedFunctionType_1.TypedFunctionType(StringType_1.StringType.instance),
|
|
626
687
|
file: exports.globalFile,
|
|
627
688
|
params: [{
|
|
628
689
|
name: 'value',
|
|
629
|
-
type:
|
|
690
|
+
type: FloatType_1.FloatType.instance,
|
|
691
|
+
isOptional: false
|
|
630
692
|
}]
|
|
631
693
|
}, {
|
|
632
694
|
name: 'StrI',
|
|
633
|
-
shortDescription: 'Converts a value to a string. Str(A), for example, returns a string equal to the decimal representation of the numeric value of A.\nNote: for non-negative numbers, a leading blank is inserted before the value string as a sign placeholder
|
|
634
|
-
type: new
|
|
695
|
+
shortDescription: 'Converts a value to a string. Str(A), for example, returns a string equal to the decimal representation of the numeric value of A.\nNote: for non-negative numbers, a leading blank is inserted before the value string as a sign placeholder.. If the radix parameter is provided, then converts the integer value into a string representation using the given radix.\nIf radix is not 2 .. 36 then an empty string is returned.\nNote that the returned string does not include a base prefix and uses lowercase letters to represent those digits in bases greater than 10.',
|
|
696
|
+
type: new TypedFunctionType_1.TypedFunctionType(StringType_1.StringType.instance),
|
|
635
697
|
file: exports.globalFile,
|
|
636
698
|
params: [{
|
|
637
699
|
name: 'value',
|
|
638
|
-
type:
|
|
700
|
+
type: IntegerType_1.IntegerType.instance,
|
|
701
|
+
isOptional: false
|
|
639
702
|
}, {
|
|
640
703
|
name: 'radix',
|
|
641
|
-
type:
|
|
704
|
+
type: IntegerType_1.IntegerType.instance,
|
|
642
705
|
isOptional: true
|
|
643
706
|
}]
|
|
644
707
|
}, {
|
|
645
708
|
name: 'string',
|
|
646
709
|
shortDescription: 'Returns a string composed of n copies of the second argument concatenated together.',
|
|
647
|
-
type: new
|
|
710
|
+
type: new TypedFunctionType_1.TypedFunctionType(StringType_1.StringType.instance),
|
|
648
711
|
file: exports.globalFile,
|
|
649
712
|
params: [{
|
|
650
713
|
name: 'n',
|
|
651
|
-
type:
|
|
714
|
+
type: IntegerType_1.IntegerType.instance,
|
|
715
|
+
isOptional: false
|
|
652
716
|
}, {
|
|
653
717
|
name: 'str',
|
|
654
|
-
type:
|
|
718
|
+
type: StringType_1.StringType.instance,
|
|
719
|
+
isOptional: false
|
|
655
720
|
}]
|
|
656
721
|
}, {
|
|
657
722
|
name: 'StringI',
|
|
658
723
|
shortDescription: 'Returns a string composed of n copies of the character whose Unicode value is the second argument.',
|
|
659
|
-
type: new
|
|
724
|
+
type: new TypedFunctionType_1.TypedFunctionType(StringType_1.StringType.instance),
|
|
660
725
|
file: exports.globalFile,
|
|
661
726
|
params: [{
|
|
662
727
|
name: 'n',
|
|
663
|
-
type:
|
|
728
|
+
type: IntegerType_1.IntegerType.instance,
|
|
729
|
+
isOptional: false
|
|
664
730
|
}, {
|
|
665
731
|
name: 'ch',
|
|
666
|
-
type:
|
|
667
|
-
|
|
668
|
-
}, {
|
|
669
|
-
name: 'Val',
|
|
670
|
-
shortDescription: 'Performs the inverse of the STR function: returns the number represented by the characters in a string argument.\nFor example, if A$="12" and B$="34" then VAL(A$+ "."+B$) returns the number 12.34.',
|
|
671
|
-
type: new FunctionType_1.FunctionType(new FloatType_1.FloatType()),
|
|
672
|
-
file: exports.globalFile,
|
|
673
|
-
params: [{
|
|
674
|
-
name: 'str',
|
|
675
|
-
type: new StringType_1.StringType()
|
|
732
|
+
type: IntegerType_1.IntegerType.instance,
|
|
733
|
+
isOptional: false
|
|
676
734
|
}]
|
|
677
735
|
}, {
|
|
678
736
|
name: 'Val',
|
|
679
|
-
shortDescription: '
|
|
680
|
-
type: new
|
|
737
|
+
shortDescription: 'Performs the inverse of the STR function: returns the number represented by the characters in a string argument.\nFor example, if A$="12" and B$="34" then VAL(A$+ "."+B$) returns the number 12.34. If radix is provided as the second parameter, it returns the integer value from parsing the string with the specified radix.\nRadix should be 2 .. 36 or the special value 0 (which automatically identified hexadecimal or octal numbers based on 0x or 0 prefixes respectively).\nLeading whitespace is ignored then as much of the rest of the string will be parsed as valid.',
|
|
738
|
+
type: new TypedFunctionType_1.TypedFunctionType(IntegerType_1.IntegerType.instance),
|
|
681
739
|
file: exports.globalFile,
|
|
682
740
|
params: [{
|
|
683
741
|
name: 'str',
|
|
684
|
-
type:
|
|
742
|
+
type: StringType_1.StringType.instance,
|
|
743
|
+
isOptional: false
|
|
685
744
|
}, {
|
|
686
745
|
name: 'radix',
|
|
687
|
-
type:
|
|
746
|
+
type: IntegerType_1.IntegerType.instance,
|
|
747
|
+
isOptional: true
|
|
688
748
|
}]
|
|
689
749
|
}, {
|
|
690
750
|
name: 'Substitute',
|
|
691
751
|
shortDescription: 'Replaces all instances of {0} or ^0 in str with arg0. Similarly, replaces all instances of {1} or ^1 with arg1, {2} or ^2 with arg2, and {3} or ^3 with arg3.',
|
|
692
|
-
type: new
|
|
752
|
+
type: new TypedFunctionType_1.TypedFunctionType(StringType_1.StringType.instance),
|
|
693
753
|
file: exports.globalFile,
|
|
694
754
|
params: [{
|
|
695
755
|
name: 'str',
|
|
696
|
-
type:
|
|
756
|
+
type: StringType_1.StringType.instance,
|
|
757
|
+
isOptional: false
|
|
697
758
|
}, {
|
|
698
759
|
name: 'arg0',
|
|
699
|
-
type:
|
|
760
|
+
type: StringType_1.StringType.instance,
|
|
761
|
+
isOptional: false
|
|
700
762
|
}, {
|
|
701
763
|
name: 'arg1',
|
|
702
|
-
type:
|
|
764
|
+
type: StringType_1.StringType.instance,
|
|
765
|
+
isOptional: true
|
|
703
766
|
}, {
|
|
704
767
|
name: 'arg2',
|
|
705
|
-
type:
|
|
768
|
+
type: StringType_1.StringType.instance,
|
|
769
|
+
isOptional: true
|
|
706
770
|
}, {
|
|
707
771
|
name: 'arg3',
|
|
708
|
-
type:
|
|
772
|
+
type: StringType_1.StringType.instance,
|
|
773
|
+
isOptional: true
|
|
709
774
|
}]
|
|
710
775
|
}
|
|
711
776
|
];
|
|
@@ -713,37 +778,212 @@ let programStatementFunctions = [
|
|
|
713
778
|
{
|
|
714
779
|
name: 'Tab',
|
|
715
780
|
shortDescription: 'Moves the cursor to the specified position on the current line (modulo the width of your console if you specify TAB positions greater than the console width). TAB may be used several times in a PRINT list. No punctuation is required after a TAB modifier. Numerical expressions may be used to specify a TAB position. TAB cannot be used to move the cursor to the left. If the cursor is beyond the specified position, the TAB is ignored.',
|
|
716
|
-
type: new
|
|
781
|
+
type: new TypedFunctionType_1.TypedFunctionType(VoidType_1.VoidType.instance),
|
|
717
782
|
file: exports.globalFile,
|
|
718
783
|
params: [{
|
|
719
784
|
name: 'expression',
|
|
720
|
-
type:
|
|
785
|
+
type: IntegerType_1.IntegerType.instance,
|
|
786
|
+
isOptional: false
|
|
721
787
|
}]
|
|
722
788
|
}, {
|
|
723
789
|
name: 'Pos',
|
|
724
790
|
shortDescription: 'Returns a number from 0 to window width, indicating the current cursor position on the cursor. Requires a "dummy argument" (any numeric expression).',
|
|
725
|
-
type: new
|
|
791
|
+
type: new TypedFunctionType_1.TypedFunctionType(IntegerType_1.IntegerType.instance),
|
|
726
792
|
file: exports.globalFile,
|
|
727
793
|
params: [{
|
|
728
794
|
name: 'x',
|
|
729
|
-
type:
|
|
795
|
+
type: IntegerType_1.IntegerType.instance,
|
|
796
|
+
isOptional: false
|
|
730
797
|
}]
|
|
731
798
|
//TODO this is a temporary fix for library imported files. Eventually this should be moved into `Roku_Ads.brs` and handled by the `Library` statement
|
|
732
799
|
}, {
|
|
733
800
|
name: 'Roku_Ads',
|
|
734
801
|
shortDescription: 'The main entry point for instantiating the ad interface. This object manages ad server requests, parses ad structure, schedules and renders ads, and triggers tracking beacons.\n\nThe Roku ad parser/renderer object returned has global scope because it is meant to represent interaction with external resources (the ad server and any tracking services) that have persistence and state independent of the ad rendering within a client application.',
|
|
735
|
-
type: new
|
|
802
|
+
type: new TypedFunctionType_1.TypedFunctionType(ObjectType_1.ObjectType.instance),
|
|
736
803
|
file: exports.globalFile,
|
|
737
804
|
params: []
|
|
805
|
+
//TODO this is a temporary fix for library imported files. Eventually this should be moved into `Roku_Event_Dispatcher.brs` and handled by the `Library` statement
|
|
806
|
+
}, {
|
|
807
|
+
name: 'Roku_Event_Dispatcher',
|
|
808
|
+
shortDescription: 'Use the Roku Event Dispatcher in your channel\'s authentication workflow to send authentication events. See: https://developer.roku.com/docs/developer-program/discovery/search/prioritizing-authenticated-channels-in-roku-search.md',
|
|
809
|
+
type: new TypedFunctionType_1.TypedFunctionType(ObjectType_1.ObjectType.instance),
|
|
810
|
+
file: exports.globalFile,
|
|
811
|
+
params: []
|
|
812
|
+
}, {
|
|
813
|
+
name: 'bslBrightScriptErrorCodes',
|
|
814
|
+
shortDescription: 'Returns an roAssociativeArray with name value pairs of the error name and corresponding integer value, for example ERR_OKAY = &hFF.',
|
|
815
|
+
type: new TypedFunctionType_1.TypedFunctionType(ObjectType_1.ObjectType.instance),
|
|
816
|
+
file: exports.globalFile,
|
|
817
|
+
params: []
|
|
818
|
+
}, {
|
|
819
|
+
name: 'bslGeneralConstants',
|
|
820
|
+
shortDescription: 'Returns an roAssociativeArray with name value pairs of system constants, for example MAX_INT = 2147483647.',
|
|
821
|
+
type: new TypedFunctionType_1.TypedFunctionType(ObjectType_1.ObjectType.instance),
|
|
822
|
+
file: exports.globalFile,
|
|
823
|
+
params: []
|
|
824
|
+
}, {
|
|
825
|
+
name: 'bslUniversalControlEventCodes',
|
|
826
|
+
shortDescription: 'Returns an roAssociativeArray with name value pairs of the remote key code (buttons) constants, for example BUTTON_SELECT_PRESSED = 6.',
|
|
827
|
+
type: new TypedFunctionType_1.TypedFunctionType(ObjectType_1.ObjectType.instance),
|
|
828
|
+
file: exports.globalFile,
|
|
829
|
+
params: []
|
|
830
|
+
},
|
|
831
|
+
{
|
|
832
|
+
name: 'AsciiToHex',
|
|
833
|
+
shortDescription: 'Returns the hex encoded string, for example AsciiToHex("Hi!") = "486921".',
|
|
834
|
+
type: new TypedFunctionType_1.TypedFunctionType(StringType_1.StringType.instance),
|
|
835
|
+
file: exports.globalFile,
|
|
836
|
+
params: [{
|
|
837
|
+
name: 'ascii',
|
|
838
|
+
type: StringType_1.StringType.instance,
|
|
839
|
+
isOptional: false
|
|
840
|
+
}]
|
|
841
|
+
}, {
|
|
842
|
+
name: 'HexToAscii',
|
|
843
|
+
shortDescription: 'Returns a string that is the hex decoded string, for example HexToAscii("486921") = "Hi!".',
|
|
844
|
+
type: new TypedFunctionType_1.TypedFunctionType(StringType_1.StringType.instance),
|
|
845
|
+
file: exports.globalFile,
|
|
846
|
+
params: [{
|
|
847
|
+
name: 'hex',
|
|
848
|
+
type: StringType_1.StringType.instance,
|
|
849
|
+
isOptional: false
|
|
850
|
+
}]
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
name: 'HexToInteger',
|
|
854
|
+
shortDescription: 'Returns the integer value of the passed in hex string.',
|
|
855
|
+
type: new TypedFunctionType_1.TypedFunctionType(IntegerType_1.IntegerType.instance),
|
|
856
|
+
file: exports.globalFile,
|
|
857
|
+
params: [{
|
|
858
|
+
name: 'hex',
|
|
859
|
+
type: StringType_1.StringType.instance,
|
|
860
|
+
isOptional: false
|
|
861
|
+
}]
|
|
862
|
+
}, {
|
|
863
|
+
name: 'HexToInteger',
|
|
864
|
+
shortDescription: 'Returns a string that is the hex decoded string, for example HexToAscii("486921") = "Hi!".',
|
|
865
|
+
type: new TypedFunctionType_1.TypedFunctionType(IntegerType_1.IntegerType.instance),
|
|
866
|
+
file: exports.globalFile,
|
|
867
|
+
params: [{
|
|
868
|
+
name: 'hex',
|
|
869
|
+
type: StringType_1.StringType.instance,
|
|
870
|
+
isOptional: false
|
|
871
|
+
}]
|
|
872
|
+
}, {
|
|
873
|
+
name: 'dfNewBitmapSet',
|
|
874
|
+
shortDescription: `The goal is to enable simple xml descriptions of graphics resources like bitmaps, regions, sprites, animations, and layouts to be used in your games. The library handles parsing, loading, rendering, and animation of sprites sheets (multiple images in a single png file).
|
|
875
|
+
Filename is the path to an XML file that contains info about bitmap regions, animation frames, and ExtraInfo metadata (any fields you would like) about resources used in 2d games.
|
|
876
|
+
Returns an roAssociativeArray with the following name value pairs:
|
|
877
|
+
ExtraInfo: roAssociativeArray
|
|
878
|
+
Regions: roAssociativeArray of name, roRegions pairs
|
|
879
|
+
Animations: roAssociativeArray of name, roArray of roRegion pairs.
|
|
880
|
+
Backgrounds: roAssociativeArray of name, path pairs.`,
|
|
881
|
+
type: new TypedFunctionType_1.TypedFunctionType(ObjectType_1.ObjectType.instance),
|
|
882
|
+
file: exports.globalFile,
|
|
883
|
+
params: [{
|
|
884
|
+
name: 'filename',
|
|
885
|
+
type: StringType_1.StringType.instance,
|
|
886
|
+
isOptional: false
|
|
887
|
+
}]
|
|
888
|
+
}, {
|
|
889
|
+
name: 'dfDrawMessage',
|
|
890
|
+
shortDescription: 'dest is an roScreen/roBitmap/roRegion and region is an roRegion.\nGreys the entire dest region and draws it the region centered on the drawable dest.',
|
|
891
|
+
type: new TypedFunctionType_1.TypedFunctionType(VoidType_1.VoidType.instance),
|
|
892
|
+
file: exports.globalFile,
|
|
893
|
+
params: [{
|
|
894
|
+
name: 'dest',
|
|
895
|
+
type: ObjectType_1.ObjectType.instance,
|
|
896
|
+
isOptional: false
|
|
897
|
+
}, {
|
|
898
|
+
name: 'region',
|
|
899
|
+
type: ObjectType_1.ObjectType.instance,
|
|
900
|
+
isOptional: false
|
|
901
|
+
}]
|
|
902
|
+
}, {
|
|
903
|
+
name: 'dfDrawImage',
|
|
904
|
+
shortDescription: 'Returns True if successful.\nCreates a bitmap out of the image stored in the filename "path" and draws it at position (x,y) of the drawable dest.',
|
|
905
|
+
type: new TypedFunctionType_1.TypedFunctionType(BooleanType_1.BooleanType.instance),
|
|
906
|
+
file: exports.globalFile,
|
|
907
|
+
params: [{
|
|
908
|
+
name: 'dest',
|
|
909
|
+
type: ObjectType_1.ObjectType.instance,
|
|
910
|
+
isOptional: false
|
|
911
|
+
}, {
|
|
912
|
+
name: 'path',
|
|
913
|
+
type: StringType_1.StringType.instance,
|
|
914
|
+
isOptional: false
|
|
915
|
+
}, {
|
|
916
|
+
name: 'x',
|
|
917
|
+
type: IntegerType_1.IntegerType.instance,
|
|
918
|
+
isOptional: false
|
|
919
|
+
}, {
|
|
920
|
+
name: 'y',
|
|
921
|
+
type: IntegerType_1.IntegerType.instance,
|
|
922
|
+
isOptional: false
|
|
923
|
+
}]
|
|
924
|
+
}, {
|
|
925
|
+
name: 'dfSetupDisplayRegions',
|
|
926
|
+
shortDescription: `Helper function to setup screen scaling with supplied pillar box or letterbox images to fill the entire screen.
|
|
927
|
+
screen is an roScreen
|
|
928
|
+
topx and topy are the coordinates of the upper left hand corner of the main drawing region
|
|
929
|
+
Width and height is the size of the main drawing region
|
|
930
|
+
|
|
931
|
+
Returns an associative array containing the following roRegions
|
|
932
|
+
Main: main drawable region
|
|
933
|
+
Left: left region if there is pillar box area on the left
|
|
934
|
+
Right: right region if there is a pillar box area on the right
|
|
935
|
+
Upper: upper region if there is a letterbox area at thetop
|
|
936
|
+
Lower: lower region if there is a letterbox area at the bottom
|
|
937
|
+
When using these regions as drawables, your graphics will be translated and clipped to these regions.`,
|
|
938
|
+
type: new TypedFunctionType_1.TypedFunctionType(ObjectType_1.ObjectType.instance),
|
|
939
|
+
file: exports.globalFile,
|
|
940
|
+
params: [{
|
|
941
|
+
name: 'screen',
|
|
942
|
+
type: ObjectType_1.ObjectType.instance,
|
|
943
|
+
isOptional: false
|
|
944
|
+
}, {
|
|
945
|
+
name: 'topx',
|
|
946
|
+
type: IntegerType_1.IntegerType.instance,
|
|
947
|
+
isOptional: false
|
|
948
|
+
}, {
|
|
949
|
+
name: 'topy',
|
|
950
|
+
type: IntegerType_1.IntegerType.instance,
|
|
951
|
+
isOptional: false
|
|
952
|
+
}, {
|
|
953
|
+
name: 'width',
|
|
954
|
+
type: IntegerType_1.IntegerType.instance,
|
|
955
|
+
isOptional: false
|
|
956
|
+
}, {
|
|
957
|
+
name: 'height',
|
|
958
|
+
type: IntegerType_1.IntegerType.instance,
|
|
959
|
+
isOptional: false
|
|
960
|
+
}]
|
|
961
|
+
}, {
|
|
962
|
+
name: 'dfSetBackground',
|
|
963
|
+
shortDescription: `dfSetBackground helps manage the limited video memory. The video memory does not currently run a defragmenter, and is very limited. These constraints make it important that large bitmaps (like backgrounds that fill the entire screen) are only allocated when needed. It is also helpful if you set your first initial background very early in your program, and then immediately replace the background after it is no longer in use. This helper function supports this background management for your application.
|
|
964
|
+
backgroundName is a key for the Backgrounds roAssociative array of backgrounds.
|
|
965
|
+
Backgrounds is an roAssociative array of background name keys and file path string values
|
|
966
|
+
This function creates an roBitmap out of the background image file and returns a region the size of the entire roBitmap.`,
|
|
967
|
+
type: new TypedFunctionType_1.TypedFunctionType(ObjectType_1.ObjectType.instance),
|
|
968
|
+
file: exports.globalFile,
|
|
969
|
+
params: [{
|
|
970
|
+
name: 'backgroundName',
|
|
971
|
+
type: StringType_1.StringType.instance,
|
|
972
|
+
isOptional: false
|
|
973
|
+
}, {
|
|
974
|
+
name: 'backgrounds',
|
|
975
|
+
type: ObjectType_1.ObjectType.instance,
|
|
976
|
+
isOptional: false
|
|
977
|
+
}]
|
|
738
978
|
}
|
|
739
979
|
];
|
|
740
980
|
exports.globalCallables = [...mathFunctions, ...runtimeFunctions, ...globalUtilityFunctions, ...globalStringFunctions, ...programStatementFunctions];
|
|
741
981
|
for (let callable of exports.globalCallables) {
|
|
742
982
|
//give each callable a dummy location
|
|
743
|
-
callable.nameRange = util_1.
|
|
983
|
+
callable.nameRange = util_1.util.createRange(0, 0, 0, callable.name.length);
|
|
744
984
|
//add each parameter to the type
|
|
745
985
|
for (let param of callable.params) {
|
|
746
|
-
callable.type.addParameter(param);
|
|
986
|
+
callable.type.addParameter(param.name, param.type, param.isOptional);
|
|
747
987
|
}
|
|
748
988
|
//set name in type
|
|
749
989
|
callable.type.setName(callable.name);
|
|
@@ -751,7 +991,7 @@ for (let callable of exports.globalCallables) {
|
|
|
751
991
|
return this.name;
|
|
752
992
|
};
|
|
753
993
|
}
|
|
754
|
-
exports.globalFile.
|
|
994
|
+
exports.globalFile.staticCallables = exports.globalCallables;
|
|
755
995
|
/**
|
|
756
996
|
* A map of all built-in function names. We use this extensively in scope validation
|
|
757
997
|
* so keep a single copy in memory to improve performance
|