brighterscript 1.0.0-alpha.4 → 1.0.0-alpha.40
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/CHANGELOG.md +1387 -291
- package/README.md +72 -131
- package/bsconfig.schema.json +85 -1
- 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 +42 -0
- package/dist/AstValidationSegmenter.js +237 -0
- package/dist/AstValidationSegmenter.js.map +1 -0
- package/dist/BsConfig.d.ts +56 -6
- package/dist/BusyStatusTracker.d.ts +31 -0
- package/dist/BusyStatusTracker.js +83 -0
- package/dist/BusyStatusTracker.js.map +1 -0
- package/dist/Cache.d.ts +5 -6
- package/dist/Cache.js +12 -11
- 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 +6 -3
- package/dist/CodeActionUtil.js +19 -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 +67 -0
- package/dist/CrossScopeValidator.js +617 -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 +5 -3
- package/dist/DiagnosticCollection.js +21 -16
- package/dist/DiagnosticCollection.js.map +1 -1
- package/dist/DiagnosticFilterer.d.ts +8 -4
- package/dist/DiagnosticFilterer.js +90 -54
- package/dist/DiagnosticFilterer.js.map +1 -1
- package/dist/DiagnosticManager.d.ts +61 -0
- package/dist/DiagnosticManager.js +238 -0
- package/dist/DiagnosticManager.js.map +1 -0
- package/dist/DiagnosticMessages.d.ts +204 -24
- package/dist/DiagnosticMessages.js +266 -33
- package/dist/DiagnosticMessages.js.map +1 -1
- package/dist/DiagnosticSeverityAdjuster.d.ts +7 -0
- package/dist/DiagnosticSeverityAdjuster.js +41 -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 +72 -47
- package/dist/LanguageServer.js +545 -314
- package/dist/LanguageServer.js.map +1 -1
- package/dist/Logger.d.ts +9 -10
- package/dist/Logger.js +36 -30
- package/dist/Logger.js.map +1 -1
- package/dist/PluginInterface.d.ts +29 -7
- package/dist/PluginInterface.js +90 -7
- package/dist/PluginInterface.js.map +1 -1
- package/dist/Program.d.ts +201 -100
- package/dist/Program.js +1079 -700
- package/dist/Program.js.map +1 -1
- package/dist/ProgramBuilder.d.ts +29 -18
- package/dist/ProgramBuilder.js +178 -141
- package/dist/ProgramBuilder.js.map +1 -1
- package/dist/Scope.d.ts +144 -109
- package/dist/Scope.js +533 -552
- package/dist/Scope.js.map +1 -1
- package/dist/SemanticTokenUtils.d.ts +14 -0
- package/dist/SemanticTokenUtils.js +85 -0
- package/dist/SemanticTokenUtils.js.map +1 -0
- 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 +91 -24
- package/dist/SymbolTable.js +291 -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 +35 -87
- package/dist/XmlScope.js.map +1 -1
- package/dist/astUtils/CachedLookups.d.ts +50 -0
- package/dist/astUtils/CachedLookups.js +335 -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 +36 -19
- package/dist/astUtils/creators.js +222 -43
- 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 +148 -82
- package/dist/astUtils/reflection.js +324 -137
- 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 +114 -53
- package/dist/astUtils/visitors.js +70 -13
- package/dist/astUtils/visitors.js.map +1 -1
- package/dist/astUtils/visitors.spec.js +463 -51
- package/dist/astUtils/visitors.spec.js.map +1 -1
- package/dist/astUtils/xml.d.ts +9 -8
- package/dist/astUtils/xml.js +10 -5
- package/dist/astUtils/xml.js.map +1 -1
- package/dist/bscPlugin/BscPlugin.d.ts +22 -1
- package/dist/bscPlugin/BscPlugin.js +88 -0
- package/dist/bscPlugin/BscPlugin.js.map +1 -1
- package/dist/bscPlugin/CallExpressionInfo.d.ts +36 -0
- package/dist/bscPlugin/CallExpressionInfo.js +135 -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 +1 -1
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js +30 -18
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js.map +1 -1
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js +94 -21
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js.map +1 -1
- package/dist/bscPlugin/completions/CompletionsProcessor.d.ts +64 -0
- package/dist/bscPlugin/completions/CompletionsProcessor.js +626 -0
- package/dist/bscPlugin/completions/CompletionsProcessor.js.map +1 -0
- package/dist/bscPlugin/completions/CompletionsProcessor.spec.js +2188 -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.d.ts +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 +218 -0
- package/dist/bscPlugin/hover/HoverProcessor.js.map +1 -0
- package/dist/bscPlugin/hover/HoverProcessor.spec.d.ts +1 -0
- package/dist/bscPlugin/hover/HoverProcessor.spec.js +786 -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 +154 -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 +530 -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 +21 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js +201 -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 +36 -0
- package/dist/bscPlugin/validation/BrsFileValidator.js +534 -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 +1118 -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 +126 -0
- package/dist/bscPlugin/validation/ScopeValidator.js +1039 -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 +3346 -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 +44 -0
- package/dist/bscPlugin/validation/XmlFileValidator.js.map +1 -0
- package/dist/cli.js +117 -11
- package/dist/cli.js.map +1 -1
- package/dist/deferred.d.ts +3 -3
- package/dist/deferred.js.map +1 -1
- package/dist/diagnosticUtils.d.ts +10 -3
- package/dist/diagnosticUtils.js +62 -24
- package/dist/diagnosticUtils.js.map +1 -1
- 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 +912 -153
- package/dist/files/BrsFile.Class.spec.js.map +1 -1
- package/dist/files/BrsFile.d.ts +142 -85
- package/dist/files/BrsFile.js +845 -935
- package/dist/files/BrsFile.js.map +1 -1
- package/dist/files/BrsFile.spec.js +3778 -862
- package/dist/files/BrsFile.spec.js.map +1 -1
- package/dist/files/BscFile.d.ts +101 -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 +20 -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 +73 -41
- package/dist/files/XmlFile.js +128 -138
- package/dist/files/XmlFile.js.map +1 -1
- package/dist/files/XmlFile.spec.js +451 -324
- 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 +417 -163
- package/dist/globalCallables.js.map +1 -1
- package/dist/index.d.ts +26 -3
- package/dist/index.js +44 -5
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +783 -122
- 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 +201 -57
- package/dist/lexer/Lexer.js.map +1 -1
- package/dist/lexer/Lexer.spec.js +781 -565
- 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 +31 -2
- package/dist/lexer/TokenKind.js +134 -10
- package/dist/lexer/TokenKind.js.map +1 -1
- package/dist/logging.d.ts +9 -0
- package/dist/logging.js +16 -0
- package/dist/logging.js.map +1 -0
- package/dist/parser/AstNode.d.ts +191 -0
- package/dist/parser/AstNode.js +269 -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 +489 -221
- package/dist/parser/Expression.js +1206 -506
- 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 +230 -125
- package/dist/parser/Parser.Class.spec.js.map +1 -1
- package/dist/parser/Parser.d.ts +113 -124
- package/dist/parser/Parser.js +1510 -983
- package/dist/parser/Parser.js.map +1 -1
- package/dist/parser/Parser.spec.d.ts +3 -1
- package/dist/parser/Parser.spec.js +1533 -517
- package/dist/parser/Parser.spec.js.map +1 -1
- package/dist/parser/SGParser.d.ts +60 -7
- package/dist/parser/SGParser.js +225 -185
- package/dist/parser/SGParser.js.map +1 -1
- package/dist/parser/SGParser.spec.js +29 -32
- package/dist/parser/SGParser.spec.js.map +1 -1
- package/dist/parser/SGTypes.d.ts +295 -52
- package/dist/parser/SGTypes.js +540 -187
- package/dist/parser/SGTypes.js.map +1 -1
- package/dist/parser/Statement.d.ts +808 -261
- package/dist/parser/Statement.js +2232 -588
- 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 +114 -15
- 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 +58 -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 +213 -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 +235 -94
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TernaryExpression.spec.js +403 -174
- 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 +262 -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 +22 -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 -59
- 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 +19452 -0
- package/dist/roku-types/index.d.ts +5533 -0
- package/dist/roku-types/index.js +11 -0
- package/dist/roku-types/index.js.map +1 -0
- package/dist/types/ArrayType.d.ts +9 -5
- package/dist/types/ArrayType.js +73 -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 +14 -0
- package/dist/types/AssociativeArrayType.js +60 -0
- package/dist/types/AssociativeArrayType.js.map +1 -0
- package/dist/types/BaseFunctionType.d.ts +9 -0
- package/dist/types/BaseFunctionType.js +25 -0
- package/dist/types/BaseFunctionType.js.map +1 -0
- package/dist/types/BooleanType.d.ts +10 -5
- package/dist/types/BooleanType.js +21 -9
- 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 +29 -3
- package/dist/types/BscType.js +121 -0
- package/dist/types/BscType.js.map +1 -1
- package/dist/types/BscTypeKind.d.ts +25 -0
- package/dist/types/BscTypeKind.js +30 -0
- package/dist/types/BscTypeKind.js.map +1 -0
- package/dist/types/BuiltInInterfaceAdder.d.ts +25 -0
- package/dist/types/BuiltInInterfaceAdder.js +201 -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/ClassType.d.ts +16 -0
- package/dist/types/ClassType.js +57 -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 +27 -0
- package/dist/types/ComponentType.js +83 -0
- package/dist/types/ComponentType.js.map +1 -0
- package/dist/types/DoubleType.d.ts +10 -5
- package/dist/types/DoubleType.js +25 -18
- 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 +12 -5
- package/dist/types/DynamicType.js +22 -6
- 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 +40 -0
- package/dist/types/EnumType.js +80 -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 +25 -18
- 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 +10 -22
- package/dist/types/FunctionType.js +26 -63
- package/dist/types/FunctionType.js.map +1 -1
- package/dist/types/InheritableType.d.ts +28 -0
- package/dist/types/InheritableType.js +157 -0
- package/dist/types/InheritableType.js.map +1 -0
- package/dist/types/IntegerType.d.ts +10 -5
- package/dist/types/IntegerType.js +25 -18
- 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 +26 -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/InvalidType.d.ts +9 -5
- package/dist/types/InvalidType.js +20 -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 +25 -18
- 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 +10 -5
- package/dist/types/ObjectType.js +23 -9
- 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 +79 -0
- package/dist/types/ReferenceType.js +522 -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 +13 -5
- package/dist/types/StringType.js +25 -9
- 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/TypedFunctionType.d.ts +33 -0
- package/dist/types/TypedFunctionType.js +106 -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 +8 -6
- package/dist/types/UninitializedType.js +15 -9
- package/dist/types/UninitializedType.js.map +1 -1
- package/dist/types/UnionType.d.ts +20 -0
- package/dist/types/UnionType.js +127 -0
- package/dist/types/UnionType.js.map +1 -0
- package/dist/types/UnionType.spec.d.ts +1 -0
- package/dist/types/UnionType.spec.js +129 -0
- package/dist/types/UnionType.spec.js.map +1 -0
- package/dist/types/VoidType.d.ts +10 -5
- package/dist/types/VoidType.js +20 -9
- 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 +144 -0
- package/dist/types/helper.spec.js.map +1 -0
- package/dist/types/helpers.d.ts +26 -0
- package/dist/types/helpers.js +191 -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/util.d.ts +272 -117
- package/dist/util.js +1583 -343
- package/dist/util.js.map +1 -1
- package/dist/validators/ClassValidator.d.ts +9 -15
- package/dist/validators/ClassValidator.js +85 -138
- package/dist/validators/ClassValidator.js.map +1 -1
- package/package.json +174 -138
- 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/lexer/index.d.ts +0 -3
- package/dist/lexer/index.js +0 -17
- package/dist/lexer/index.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/{preprocessor/Preprocessor.spec.d.ts → astUtils/CachedLookups.spec.d.ts} +0 -0
- /package/dist/{preprocessor/PreprocessorParser.spec.d.ts → astUtils/Editor.spec.d.ts} +0 -0
- /package/dist/{types/FunctionType.spec.d.ts → bscPlugin/completions/CompletionsProcessor.spec.d.ts} +0 -0
package/dist/globalCallables.js
CHANGED
|
@@ -6,177 +6,196 @@ 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(new FloatType_1.FloatType()),
|
|
21
22
|
file: exports.globalFile,
|
|
22
23
|
params: [{
|
|
23
24
|
name: 'x',
|
|
24
|
-
type: new FloatType_1.FloatType()
|
|
25
|
+
type: new FloatType_1.FloatType(),
|
|
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(new FloatType_1.FloatType()),
|
|
31
33
|
file: exports.globalFile,
|
|
32
34
|
params: [{
|
|
33
35
|
name: 'x',
|
|
34
|
-
type: new FloatType_1.FloatType()
|
|
36
|
+
type: new FloatType_1.FloatType(),
|
|
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(new FloatType_1.FloatType()),
|
|
40
43
|
file: exports.globalFile,
|
|
41
44
|
params: [{
|
|
42
45
|
name: 'x',
|
|
43
|
-
type: new IntegerType_1.IntegerType()
|
|
46
|
+
type: new IntegerType_1.IntegerType(),
|
|
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(new IntegerType_1.IntegerType()),
|
|
49
53
|
file: exports.globalFile,
|
|
50
54
|
params: [{
|
|
51
55
|
name: 'x',
|
|
52
|
-
type: new FloatType_1.FloatType()
|
|
56
|
+
type: new FloatType_1.FloatType(),
|
|
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(new FloatType_1.FloatType()),
|
|
58
63
|
file: exports.globalFile,
|
|
59
64
|
params: [{
|
|
60
65
|
name: 'x',
|
|
61
|
-
type: new FloatType_1.FloatType()
|
|
66
|
+
type: new FloatType_1.FloatType(),
|
|
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(new FloatType_1.FloatType()),
|
|
67
73
|
file: exports.globalFile,
|
|
68
74
|
params: [{
|
|
69
75
|
name: 'x',
|
|
70
|
-
type: new IntegerType_1.IntegerType()
|
|
76
|
+
type: new IntegerType_1.IntegerType(),
|
|
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(new FloatType_1.FloatType()),
|
|
76
83
|
file: exports.globalFile,
|
|
77
84
|
params: [{
|
|
78
85
|
name: 'x',
|
|
79
|
-
type: new FloatType_1.FloatType()
|
|
86
|
+
type: new FloatType_1.FloatType(),
|
|
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(new IntegerType_1.IntegerType()),
|
|
85
93
|
file: exports.globalFile,
|
|
86
94
|
params: [{
|
|
87
95
|
name: 'x',
|
|
88
|
-
type: new FloatType_1.FloatType()
|
|
96
|
+
type: new FloatType_1.FloatType(),
|
|
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(new IntegerType_1.IntegerType()),
|
|
94
103
|
file: exports.globalFile,
|
|
95
104
|
params: [{
|
|
96
105
|
name: 'x',
|
|
97
|
-
type: new FloatType_1.FloatType()
|
|
106
|
+
type: new FloatType_1.FloatType(),
|
|
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(new FloatType_1.FloatType()),
|
|
103
113
|
file: exports.globalFile,
|
|
104
114
|
params: [{
|
|
105
115
|
name: 'x',
|
|
106
|
-
type: new FloatType_1.FloatType()
|
|
116
|
+
type: new FloatType_1.FloatType(),
|
|
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(new IntegerType_1.IntegerType()),
|
|
112
123
|
file: exports.globalFile,
|
|
113
124
|
params: [{
|
|
114
125
|
name: 'range',
|
|
115
|
-
type: new IntegerType_1.IntegerType()
|
|
126
|
+
type: new IntegerType_1.IntegerType(),
|
|
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(new FloatType_1.FloatType()),
|
|
121
133
|
file: exports.globalFile,
|
|
122
134
|
params: [{
|
|
123
135
|
name: '0',
|
|
124
|
-
type: new IntegerType_1.IntegerType()
|
|
136
|
+
type: new IntegerType_1.IntegerType(),
|
|
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(new IntegerType_1.IntegerType()),
|
|
130
143
|
file: exports.globalFile,
|
|
131
144
|
params: [{
|
|
132
145
|
name: 'x',
|
|
133
|
-
type: new FloatType_1.FloatType()
|
|
146
|
+
type: new FloatType_1.FloatType(),
|
|
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(new IntegerType_1.IntegerType()),
|
|
139
153
|
file: exports.globalFile,
|
|
140
154
|
params: [{
|
|
141
155
|
name: 'x',
|
|
142
|
-
type: new IntegerType_1.IntegerType()
|
|
156
|
+
type: new IntegerType_1.IntegerType(),
|
|
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(new FloatType_1.FloatType()),
|
|
148
163
|
file: exports.globalFile,
|
|
149
164
|
params: [{
|
|
150
165
|
name: 'x',
|
|
151
|
-
type: new FloatType_1.FloatType()
|
|
166
|
+
type: new FloatType_1.FloatType(),
|
|
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(new FloatType_1.FloatType()),
|
|
157
173
|
file: exports.globalFile,
|
|
158
174
|
params: [{
|
|
159
175
|
name: 'x',
|
|
160
|
-
type: new FloatType_1.FloatType()
|
|
176
|
+
type: new FloatType_1.FloatType(),
|
|
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(new FloatType_1.FloatType()),
|
|
166
183
|
file: exports.globalFile,
|
|
167
184
|
params: [{
|
|
168
185
|
name: 'x',
|
|
169
|
-
type: new FloatType_1.FloatType()
|
|
186
|
+
type: new FloatType_1.FloatType(),
|
|
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(new ObjectType_1.ObjectType()),
|
|
176
194
|
file: exports.globalFile,
|
|
177
195
|
params: [{
|
|
178
196
|
name: 'name',
|
|
179
|
-
type: new StringType_1.StringType()
|
|
197
|
+
type: new StringType_1.StringType(),
|
|
198
|
+
isOptional: false
|
|
180
199
|
}, {
|
|
181
200
|
name: 'param2',
|
|
182
201
|
type: new DynamicType_1.DynamicType(),
|
|
@@ -189,15 +208,24 @@ let runtimeFunctions = [{
|
|
|
189
208
|
name: 'param4',
|
|
190
209
|
type: new DynamicType_1.DynamicType(),
|
|
191
210
|
isOptional: true
|
|
211
|
+
}, {
|
|
212
|
+
name: 'param5',
|
|
213
|
+
type: new DynamicType_1.DynamicType(),
|
|
214
|
+
isOptional: true
|
|
215
|
+
}, {
|
|
216
|
+
name: 'param6',
|
|
217
|
+
type: new DynamicType_1.DynamicType(),
|
|
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(new ObjectType_1.ObjectType()),
|
|
197
224
|
file: exports.globalFile,
|
|
198
225
|
params: [{
|
|
199
226
|
name: 'variable',
|
|
200
|
-
type: new ObjectType_1.ObjectType()
|
|
227
|
+
type: new ObjectType_1.ObjectType(),
|
|
228
|
+
isOptional: false
|
|
201
229
|
}, {
|
|
202
230
|
name: 'version',
|
|
203
231
|
type: new StringType_1.StringType(),
|
|
@@ -206,64 +234,70 @@ let runtimeFunctions = [{
|
|
|
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(new ObjectType_1.ObjectType()),
|
|
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(new ObjectType_1.ObjectType()),
|
|
216
244
|
file: exports.globalFile,
|
|
217
245
|
params: [{
|
|
218
246
|
name: 'x',
|
|
219
|
-
type: new DynamicType_1.DynamicType()
|
|
247
|
+
type: new DynamicType_1.DynamicType(),
|
|
248
|
+
isOptional: false
|
|
220
249
|
}]
|
|
221
250
|
}, {
|
|
222
251
|
name: 'Run',
|
|
223
252
|
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
|
|
253
|
+
type: new TypedFunctionType_1.TypedFunctionType(new DynamicType_1.DynamicType()),
|
|
225
254
|
file: exports.globalFile,
|
|
226
255
|
params: [{
|
|
227
256
|
name: 'filename',
|
|
228
|
-
type: new StringType_1.StringType()
|
|
257
|
+
type: new StringType_1.StringType(),
|
|
258
|
+
isOptional: false
|
|
229
259
|
}, {
|
|
230
260
|
name: 'arg',
|
|
231
261
|
type: new DynamicType_1.DynamicType(),
|
|
232
|
-
isRestArgument: true
|
|
262
|
+
isRestArgument: true,
|
|
263
|
+
isOptional: false
|
|
233
264
|
}]
|
|
234
265
|
}, {
|
|
235
266
|
name: 'Run',
|
|
236
267
|
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
|
|
268
|
+
type: new TypedFunctionType_1.TypedFunctionType(new DynamicType_1.DynamicType()),
|
|
238
269
|
file: exports.globalFile,
|
|
239
270
|
params: [{
|
|
240
271
|
name: 'filename',
|
|
241
|
-
type: new ArrayType_1.ArrayType(new StringType_1.StringType())
|
|
272
|
+
type: new ArrayType_1.ArrayType(new StringType_1.StringType()),
|
|
273
|
+
isOptional: false
|
|
242
274
|
}, {
|
|
243
275
|
name: 'arg',
|
|
244
276
|
type: new DynamicType_1.DynamicType(),
|
|
245
|
-
isRestArgument: true
|
|
277
|
+
isRestArgument: true,
|
|
278
|
+
isOptional: true
|
|
246
279
|
}]
|
|
247
280
|
}, {
|
|
248
281
|
name: 'Eval',
|
|
249
282
|
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
|
|
283
|
+
type: new TypedFunctionType_1.TypedFunctionType(new DynamicType_1.DynamicType()),
|
|
251
284
|
file: exports.globalFile,
|
|
252
285
|
isDeprecated: true,
|
|
253
286
|
params: [{
|
|
254
287
|
name: 'code',
|
|
255
|
-
type: new StringType_1.StringType()
|
|
288
|
+
type: new StringType_1.StringType(),
|
|
289
|
+
isOptional: false
|
|
256
290
|
}]
|
|
257
291
|
}, {
|
|
258
292
|
name: 'GetLastRunCompileError',
|
|
259
293
|
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
|
|
294
|
+
type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
|
|
261
295
|
file: exports.globalFile,
|
|
262
296
|
params: []
|
|
263
297
|
}, {
|
|
264
298
|
name: 'GetLastRunRuntimeError',
|
|
265
299
|
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
|
|
300
|
+
type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
|
|
267
301
|
file: exports.globalFile,
|
|
268
302
|
params: []
|
|
269
303
|
}];
|
|
@@ -271,116 +305,132 @@ let globalUtilityFunctions = [
|
|
|
271
305
|
{
|
|
272
306
|
name: 'Sleep',
|
|
273
307
|
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
|
|
308
|
+
type: new TypedFunctionType_1.TypedFunctionType(new VoidType_1.VoidType()),
|
|
275
309
|
file: exports.globalFile,
|
|
276
310
|
params: [{
|
|
277
311
|
name: 'milliseconds',
|
|
278
|
-
type: new IntegerType_1.IntegerType()
|
|
312
|
+
type: new IntegerType_1.IntegerType(),
|
|
313
|
+
isOptional: false
|
|
279
314
|
}]
|
|
280
315
|
}, {
|
|
281
316
|
name: 'Wait',
|
|
282
317
|
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
|
|
318
|
+
type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
|
|
284
319
|
file: exports.globalFile,
|
|
285
320
|
params: [{
|
|
286
321
|
name: 'timeout',
|
|
287
|
-
type: new IntegerType_1.IntegerType()
|
|
322
|
+
type: new IntegerType_1.IntegerType(),
|
|
323
|
+
isOptional: false
|
|
288
324
|
}, {
|
|
289
325
|
name: 'port',
|
|
290
|
-
type: new ObjectType_1.ObjectType()
|
|
326
|
+
type: new ObjectType_1.ObjectType(),
|
|
327
|
+
isOptional: false
|
|
291
328
|
}]
|
|
292
329
|
}, {
|
|
293
330
|
name: 'GetInterface',
|
|
294
331
|
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
|
|
332
|
+
type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
|
|
296
333
|
file: exports.globalFile,
|
|
297
334
|
params: [{
|
|
298
335
|
name: 'object',
|
|
299
|
-
type: new ObjectType_1.ObjectType()
|
|
336
|
+
type: new ObjectType_1.ObjectType(),
|
|
337
|
+
isOptional: false
|
|
300
338
|
}, {
|
|
301
339
|
name: 'ifname',
|
|
302
|
-
type: new StringType_1.StringType()
|
|
340
|
+
type: new StringType_1.StringType(),
|
|
341
|
+
isOptional: false
|
|
303
342
|
}]
|
|
304
343
|
}, {
|
|
305
344
|
name: 'FindMemberFunction',
|
|
306
345
|
shortDescription: 'Returns the interface from the object that provides the specified function, or invalid if not found.',
|
|
307
|
-
type: new
|
|
346
|
+
type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
|
|
308
347
|
file: exports.globalFile,
|
|
309
348
|
params: [{
|
|
310
349
|
name: 'object',
|
|
311
|
-
type: new ObjectType_1.ObjectType()
|
|
350
|
+
type: new ObjectType_1.ObjectType(),
|
|
351
|
+
isOptional: false
|
|
312
352
|
}, {
|
|
313
353
|
name: 'functionName',
|
|
314
|
-
type: new StringType_1.StringType()
|
|
354
|
+
type: new StringType_1.StringType(),
|
|
355
|
+
isOptional: false
|
|
315
356
|
}]
|
|
316
357
|
}, {
|
|
317
358
|
name: 'UpTime',
|
|
318
359
|
shortDescription: 'Returns the uptime of the system since the last reboot in seconds.',
|
|
319
|
-
type: new
|
|
360
|
+
type: new TypedFunctionType_1.TypedFunctionType(new FloatType_1.FloatType()),
|
|
320
361
|
file: exports.globalFile,
|
|
321
362
|
params: [{
|
|
322
363
|
name: 'dummy',
|
|
323
|
-
type: new IntegerType_1.IntegerType()
|
|
364
|
+
type: new IntegerType_1.IntegerType(),
|
|
365
|
+
isOptional: false
|
|
324
366
|
}]
|
|
325
367
|
}, {
|
|
326
368
|
name: 'RebootSystem',
|
|
327
369
|
shortDescription: 'Requests the system to perform a soft reboot. The Roku platform has disabled this feature.',
|
|
328
|
-
type: new
|
|
370
|
+
type: new TypedFunctionType_1.TypedFunctionType(new VoidType_1.VoidType()),
|
|
329
371
|
file: exports.globalFile,
|
|
330
372
|
params: []
|
|
331
373
|
}, {
|
|
332
374
|
name: 'ListDir',
|
|
333
375
|
shortDescription: 'Returns a List object containing the contents of the directory path specified.',
|
|
334
|
-
type: new
|
|
376
|
+
type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
|
|
335
377
|
file: exports.globalFile,
|
|
336
378
|
params: [{
|
|
337
379
|
name: 'path',
|
|
338
|
-
type: new StringType_1.StringType()
|
|
380
|
+
type: new StringType_1.StringType(),
|
|
381
|
+
isOptional: false
|
|
339
382
|
}]
|
|
340
383
|
}, {
|
|
341
384
|
name: 'ReadAsciiFile',
|
|
342
385
|
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
|
|
386
|
+
type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
|
|
344
387
|
file: exports.globalFile,
|
|
345
388
|
params: [{
|
|
346
389
|
name: 'filePath',
|
|
347
|
-
type: new StringType_1.StringType()
|
|
390
|
+
type: new StringType_1.StringType(),
|
|
391
|
+
isOptional: false
|
|
348
392
|
}]
|
|
349
393
|
}, {
|
|
350
394
|
name: 'WriteAsciiFile',
|
|
351
395
|
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
|
|
396
|
+
type: new TypedFunctionType_1.TypedFunctionType(new BooleanType_1.BooleanType()),
|
|
353
397
|
file: exports.globalFile,
|
|
354
398
|
params: [{
|
|
355
399
|
name: 'filePath',
|
|
356
|
-
type: new StringType_1.StringType()
|
|
400
|
+
type: new StringType_1.StringType(),
|
|
401
|
+
isOptional: false
|
|
357
402
|
}, {
|
|
358
403
|
name: 'text',
|
|
359
|
-
type: new StringType_1.StringType()
|
|
404
|
+
type: new StringType_1.StringType(),
|
|
405
|
+
isOptional: false
|
|
360
406
|
}]
|
|
361
407
|
}, {
|
|
362
408
|
name: 'CopyFile',
|
|
363
409
|
shortDescription: 'Make a copy of a file.',
|
|
364
|
-
type: new
|
|
410
|
+
type: new TypedFunctionType_1.TypedFunctionType(new BooleanType_1.BooleanType()),
|
|
365
411
|
file: exports.globalFile,
|
|
366
412
|
params: [{
|
|
367
413
|
name: 'source',
|
|
368
|
-
type: new StringType_1.StringType()
|
|
414
|
+
type: new StringType_1.StringType(),
|
|
415
|
+
isOptional: false
|
|
369
416
|
}, {
|
|
370
417
|
name: 'destination',
|
|
371
|
-
type: new StringType_1.StringType()
|
|
418
|
+
type: new StringType_1.StringType(),
|
|
419
|
+
isOptional: false
|
|
372
420
|
}]
|
|
373
421
|
}, {
|
|
374
422
|
name: 'MoveFile',
|
|
375
423
|
shortDescription: 'Rename a file.',
|
|
376
|
-
type: new
|
|
424
|
+
type: new TypedFunctionType_1.TypedFunctionType(new BooleanType_1.BooleanType()),
|
|
377
425
|
file: exports.globalFile,
|
|
378
426
|
params: [{
|
|
379
427
|
name: 'source',
|
|
380
|
-
type: new StringType_1.StringType()
|
|
428
|
+
type: new StringType_1.StringType(),
|
|
429
|
+
isOptional: false
|
|
381
430
|
}, {
|
|
382
431
|
name: 'destination',
|
|
383
|
-
type: new StringType_1.StringType()
|
|
432
|
+
type: new StringType_1.StringType(),
|
|
433
|
+
isOptional: false
|
|
384
434
|
}]
|
|
385
435
|
}, {
|
|
386
436
|
name: 'MatchFiles',
|
|
@@ -395,67 +445,75 @@ A '*' matches zero or more arbitrary characters.
|
|
|
395
445
|
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
446
|
A character class can be negated by specifying '^' as the first character. To match a literal '^' place it elsewhere within the class.
|
|
397
447
|
The characters '?', '*' and '[' lose their special meaning if preceded by a single '\\'. A single '\\' can be matched as '\\\\'.`,
|
|
398
|
-
type: new
|
|
448
|
+
type: new TypedFunctionType_1.TypedFunctionType(new ArrayType_1.ArrayType(new StringType_1.StringType())),
|
|
399
449
|
file: exports.globalFile,
|
|
400
450
|
params: [{
|
|
401
451
|
name: 'path',
|
|
402
|
-
type: new StringType_1.StringType()
|
|
452
|
+
type: new StringType_1.StringType(),
|
|
453
|
+
isOptional: false
|
|
403
454
|
}, {
|
|
404
455
|
name: 'pattern_in',
|
|
405
|
-
type: new StringType_1.StringType()
|
|
456
|
+
type: new StringType_1.StringType(),
|
|
457
|
+
isOptional: false
|
|
406
458
|
}]
|
|
407
459
|
}, {
|
|
408
460
|
name: 'DeleteFile',
|
|
409
461
|
shortDescription: 'Delete the specified file.',
|
|
410
|
-
type: new
|
|
462
|
+
type: new TypedFunctionType_1.TypedFunctionType(new BooleanType_1.BooleanType()),
|
|
411
463
|
file: exports.globalFile,
|
|
412
464
|
params: [{
|
|
413
465
|
name: 'file',
|
|
414
|
-
type: new StringType_1.StringType()
|
|
466
|
+
type: new StringType_1.StringType(),
|
|
467
|
+
isOptional: false
|
|
415
468
|
}]
|
|
416
469
|
}, {
|
|
417
470
|
name: 'DeleteDirectory',
|
|
418
471
|
shortDescription: 'Deletes the specified directory. It is only possible to delete an empty directory.',
|
|
419
|
-
type: new
|
|
472
|
+
type: new TypedFunctionType_1.TypedFunctionType(new BooleanType_1.BooleanType()),
|
|
420
473
|
file: exports.globalFile,
|
|
421
474
|
params: [{
|
|
422
475
|
name: 'dir',
|
|
423
|
-
type: new StringType_1.StringType()
|
|
476
|
+
type: new StringType_1.StringType(),
|
|
477
|
+
isOptional: false
|
|
424
478
|
}]
|
|
425
479
|
}, {
|
|
426
480
|
name: 'CreateDirectory',
|
|
427
481
|
shortDescription: 'Creates the specified Directory. Only one directory can be created at a time',
|
|
428
|
-
type: new
|
|
482
|
+
type: new TypedFunctionType_1.TypedFunctionType(new BooleanType_1.BooleanType()),
|
|
429
483
|
file: exports.globalFile,
|
|
430
484
|
params: [{
|
|
431
485
|
name: 'dir',
|
|
432
|
-
type: new StringType_1.StringType()
|
|
486
|
+
type: new StringType_1.StringType(),
|
|
487
|
+
isOptional: false
|
|
433
488
|
}]
|
|
434
489
|
}, {
|
|
435
490
|
name: 'FormatDrive',
|
|
436
491
|
shortDescription: 'Formats a specified drive using the specified filesystem.',
|
|
437
|
-
type: new
|
|
492
|
+
type: new TypedFunctionType_1.TypedFunctionType(new BooleanType_1.BooleanType()),
|
|
438
493
|
file: exports.globalFile,
|
|
439
494
|
params: [{
|
|
440
495
|
name: 'drive',
|
|
441
|
-
type: new StringType_1.StringType()
|
|
496
|
+
type: new StringType_1.StringType(),
|
|
497
|
+
isOptional: false
|
|
442
498
|
}, {
|
|
443
499
|
name: 'fs_type',
|
|
444
|
-
type: new StringType_1.StringType()
|
|
500
|
+
type: new StringType_1.StringType(),
|
|
501
|
+
isOptional: false
|
|
445
502
|
}]
|
|
446
503
|
}, {
|
|
447
504
|
name: 'StrToI',
|
|
448
505
|
shortDescription: 'Return the integer value of the string, or 0 if nothing is parsed.',
|
|
449
|
-
type: new
|
|
506
|
+
type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
|
|
450
507
|
file: exports.globalFile,
|
|
451
508
|
params: [{
|
|
452
509
|
name: 'str',
|
|
453
|
-
type: new StringType_1.StringType()
|
|
510
|
+
type: new StringType_1.StringType(),
|
|
511
|
+
isOptional: false
|
|
454
512
|
}]
|
|
455
513
|
}, {
|
|
456
514
|
name: 'RunGarbageCollector',
|
|
457
515
|
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
|
|
516
|
+
type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
|
|
459
517
|
file: exports.globalFile,
|
|
460
518
|
params: []
|
|
461
519
|
}, {
|
|
@@ -465,11 +523,12 @@ The characters '?', '*' and '[' lose their special meaning if preceded by a sing
|
|
|
465
523
|
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
524
|
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
525
|
An error will be returned if arrays/associative arrays are nested more than 256 levels deep.`,
|
|
468
|
-
type: new
|
|
526
|
+
type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
|
|
469
527
|
file: exports.globalFile,
|
|
470
528
|
params: [{
|
|
471
529
|
name: 'jsonString',
|
|
472
|
-
type: new StringType_1.StringType()
|
|
530
|
+
type: new StringType_1.StringType(),
|
|
531
|
+
isOptional: false
|
|
473
532
|
},
|
|
474
533
|
{
|
|
475
534
|
name: 'flags',
|
|
@@ -487,14 +546,15 @@ An error will be returned if arrays/associative arrays are nested more than 256
|
|
|
487
546
|
If an error occurs an empty string will be returned.
|
|
488
547
|
|
|
489
548
|
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
|
|
549
|
+
type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
|
|
491
550
|
file: exports.globalFile,
|
|
492
551
|
params: [{
|
|
493
552
|
name: 'object',
|
|
494
|
-
type: new ObjectType_1.ObjectType()
|
|
553
|
+
type: new ObjectType_1.ObjectType(),
|
|
554
|
+
isOptional: false
|
|
495
555
|
}, {
|
|
496
556
|
name: 'flags',
|
|
497
|
-
type: new StringType_1.StringType
|
|
557
|
+
type: new UnionType_1.UnionType([IntegerType_1.IntegerType.instance, StringType_1.StringType.instance]),
|
|
498
558
|
isOptional: true
|
|
499
559
|
}]
|
|
500
560
|
}, {
|
|
@@ -503,11 +563,12 @@ Normally non-ASCII characters are escaped in the output string as "\\uXXXX" wher
|
|
|
503
563
|
|
|
504
564
|
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
565
|
One way to accomplish that is to use the Replace method on the string value returned from the Tr() lookup.`,
|
|
506
|
-
type: new
|
|
566
|
+
type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
|
|
507
567
|
file: exports.globalFile,
|
|
508
568
|
params: [{
|
|
509
569
|
name: 'source',
|
|
510
|
-
type: new StringType_1.StringType()
|
|
570
|
+
type: new StringType_1.StringType(),
|
|
571
|
+
isOptional: false
|
|
511
572
|
}]
|
|
512
573
|
}
|
|
513
574
|
];
|
|
@@ -515,29 +576,32 @@ let globalStringFunctions = [
|
|
|
515
576
|
{
|
|
516
577
|
name: 'UCase',
|
|
517
578
|
shortDescription: 'Converts the string to all upper case.',
|
|
518
|
-
type: new
|
|
579
|
+
type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
|
|
519
580
|
file: exports.globalFile,
|
|
520
581
|
params: [{
|
|
521
582
|
name: 's',
|
|
522
|
-
type: new StringType_1.StringType()
|
|
583
|
+
type: new StringType_1.StringType(),
|
|
584
|
+
isOptional: false
|
|
523
585
|
}]
|
|
524
586
|
}, {
|
|
525
587
|
name: 'LCase',
|
|
526
588
|
shortDescription: 'Converts the string to all lower case.',
|
|
527
|
-
type: new
|
|
589
|
+
type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
|
|
528
590
|
file: exports.globalFile,
|
|
529
591
|
params: [{
|
|
530
592
|
name: 's',
|
|
531
|
-
type: new StringType_1.StringType()
|
|
593
|
+
type: new StringType_1.StringType(),
|
|
594
|
+
isOptional: false
|
|
532
595
|
}]
|
|
533
596
|
}, {
|
|
534
597
|
name: 'Asc',
|
|
535
598
|
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
|
|
599
|
+
type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
|
|
537
600
|
file: exports.globalFile,
|
|
538
601
|
params: [{
|
|
539
602
|
name: 'letter',
|
|
540
|
-
type: new StringType_1.StringType()
|
|
603
|
+
type: new StringType_1.StringType(),
|
|
604
|
+
isOptional: false
|
|
541
605
|
}]
|
|
542
606
|
}, {
|
|
543
607
|
name: 'Chr',
|
|
@@ -548,59 +612,68 @@ let globalStringFunctions = [
|
|
|
548
612
|
By using Chr, you can create strings containing characters which cannot be contained in quotes, such as newline or the quote character itself.
|
|
549
613
|
|
|
550
614
|
print (Chr(34) + "hello" + Chr(34)) ' prints: "hello"`,
|
|
551
|
-
type: new
|
|
615
|
+
type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
|
|
552
616
|
file: exports.globalFile,
|
|
553
617
|
params: [{
|
|
554
618
|
name: 'ch',
|
|
555
|
-
type: new IntegerType_1.IntegerType()
|
|
619
|
+
type: new IntegerType_1.IntegerType(),
|
|
620
|
+
isOptional: false
|
|
556
621
|
}]
|
|
557
622
|
}, {
|
|
558
623
|
name: 'Instr',
|
|
559
624
|
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
|
|
625
|
+
type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
|
|
561
626
|
file: exports.globalFile,
|
|
562
627
|
params: [{
|
|
563
628
|
name: 'start',
|
|
564
|
-
type: new IntegerType_1.IntegerType()
|
|
629
|
+
type: new IntegerType_1.IntegerType(),
|
|
630
|
+
isOptional: false
|
|
565
631
|
}, {
|
|
566
632
|
name: 'text',
|
|
567
|
-
type: new StringType_1.StringType()
|
|
633
|
+
type: new StringType_1.StringType(),
|
|
634
|
+
isOptional: false
|
|
568
635
|
}, {
|
|
569
636
|
name: 'substring',
|
|
570
|
-
type: new StringType_1.StringType()
|
|
637
|
+
type: new StringType_1.StringType(),
|
|
638
|
+
isOptional: false
|
|
571
639
|
}]
|
|
572
640
|
}, {
|
|
573
641
|
name: 'Left',
|
|
574
642
|
shortDescription: 'Returns the first n characters of s. ',
|
|
575
|
-
type: new
|
|
643
|
+
type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
|
|
576
644
|
file: exports.globalFile,
|
|
577
645
|
params: [{
|
|
578
646
|
name: 's',
|
|
579
|
-
type: new StringType_1.StringType()
|
|
647
|
+
type: new StringType_1.StringType(),
|
|
648
|
+
isOptional: false
|
|
580
649
|
}, {
|
|
581
650
|
name: 'n',
|
|
582
|
-
type: new IntegerType_1.IntegerType()
|
|
651
|
+
type: new IntegerType_1.IntegerType(),
|
|
652
|
+
isOptional: false
|
|
583
653
|
}]
|
|
584
654
|
}, {
|
|
585
655
|
name: 'Len',
|
|
586
656
|
shortDescription: 'Returns the number of characters in the specified string.',
|
|
587
|
-
type: new
|
|
657
|
+
type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
|
|
588
658
|
file: exports.globalFile,
|
|
589
659
|
params: [{
|
|
590
660
|
name: 's',
|
|
591
|
-
type: new StringType_1.StringType()
|
|
661
|
+
type: new StringType_1.StringType(),
|
|
662
|
+
isOptional: false
|
|
592
663
|
}]
|
|
593
664
|
}, {
|
|
594
665
|
name: 'Mid',
|
|
595
666
|
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
|
|
667
|
+
type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
|
|
597
668
|
file: exports.globalFile,
|
|
598
669
|
params: [{
|
|
599
670
|
name: 's',
|
|
600
|
-
type: new StringType_1.StringType()
|
|
671
|
+
type: new StringType_1.StringType(),
|
|
672
|
+
isOptional: false
|
|
601
673
|
}, {
|
|
602
674
|
name: 'p',
|
|
603
|
-
description: '1-based position',
|
|
675
|
+
//description: '1-based position',
|
|
676
|
+
isOptional: false,
|
|
604
677
|
type: new IntegerType_1.IntegerType()
|
|
605
678
|
}, {
|
|
606
679
|
name: 'n',
|
|
@@ -610,32 +683,36 @@ By using Chr, you can create strings containing characters which cannot be conta
|
|
|
610
683
|
}, {
|
|
611
684
|
name: 'Right',
|
|
612
685
|
shortDescription: 'Returns the last n characters of s.',
|
|
613
|
-
type: new
|
|
686
|
+
type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
|
|
614
687
|
file: exports.globalFile,
|
|
615
688
|
params: [{
|
|
616
689
|
name: 's',
|
|
617
|
-
type: new StringType_1.StringType()
|
|
690
|
+
type: new StringType_1.StringType(),
|
|
691
|
+
isOptional: false
|
|
618
692
|
}, {
|
|
619
693
|
name: 'n',
|
|
620
|
-
type: new IntegerType_1.IntegerType()
|
|
694
|
+
type: new IntegerType_1.IntegerType(),
|
|
695
|
+
isOptional: false
|
|
621
696
|
}]
|
|
622
697
|
}, {
|
|
623
698
|
name: 'Str',
|
|
624
699
|
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
|
|
700
|
+
type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
|
|
626
701
|
file: exports.globalFile,
|
|
627
702
|
params: [{
|
|
628
703
|
name: 'value',
|
|
629
|
-
type: new FloatType_1.FloatType()
|
|
704
|
+
type: new FloatType_1.FloatType(),
|
|
705
|
+
isOptional: false
|
|
630
706
|
}]
|
|
631
707
|
}, {
|
|
632
708
|
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
|
|
709
|
+
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.',
|
|
710
|
+
type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
|
|
635
711
|
file: exports.globalFile,
|
|
636
712
|
params: [{
|
|
637
713
|
name: 'value',
|
|
638
|
-
type: new IntegerType_1.IntegerType()
|
|
714
|
+
type: new IntegerType_1.IntegerType(),
|
|
715
|
+
isOptional: false
|
|
639
716
|
}, {
|
|
640
717
|
name: 'radix',
|
|
641
718
|
type: new IntegerType_1.IntegerType(),
|
|
@@ -644,68 +721,70 @@ By using Chr, you can create strings containing characters which cannot be conta
|
|
|
644
721
|
}, {
|
|
645
722
|
name: 'string',
|
|
646
723
|
shortDescription: 'Returns a string composed of n copies of the second argument concatenated together.',
|
|
647
|
-
type: new
|
|
724
|
+
type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
|
|
648
725
|
file: exports.globalFile,
|
|
649
726
|
params: [{
|
|
650
727
|
name: 'n',
|
|
651
|
-
type: new IntegerType_1.IntegerType()
|
|
728
|
+
type: new IntegerType_1.IntegerType(),
|
|
729
|
+
isOptional: false
|
|
652
730
|
}, {
|
|
653
731
|
name: 'str',
|
|
654
|
-
type: new StringType_1.StringType()
|
|
732
|
+
type: new StringType_1.StringType(),
|
|
733
|
+
isOptional: false
|
|
655
734
|
}]
|
|
656
735
|
}, {
|
|
657
736
|
name: 'StringI',
|
|
658
737
|
shortDescription: 'Returns a string composed of n copies of the character whose Unicode value is the second argument.',
|
|
659
|
-
type: new
|
|
738
|
+
type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
|
|
660
739
|
file: exports.globalFile,
|
|
661
740
|
params: [{
|
|
662
741
|
name: 'n',
|
|
663
|
-
type: new IntegerType_1.IntegerType()
|
|
742
|
+
type: new IntegerType_1.IntegerType(),
|
|
743
|
+
isOptional: false
|
|
664
744
|
}, {
|
|
665
745
|
name: 'ch',
|
|
666
|
-
type: new IntegerType_1.IntegerType()
|
|
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()
|
|
746
|
+
type: new IntegerType_1.IntegerType(),
|
|
747
|
+
isOptional: false
|
|
676
748
|
}]
|
|
677
749
|
}, {
|
|
678
750
|
name: 'Val',
|
|
679
|
-
shortDescription: '
|
|
680
|
-
type: new
|
|
751
|
+
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.',
|
|
752
|
+
type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
|
|
681
753
|
file: exports.globalFile,
|
|
682
754
|
params: [{
|
|
683
755
|
name: 'str',
|
|
684
|
-
type: new StringType_1.StringType()
|
|
756
|
+
type: new StringType_1.StringType(),
|
|
757
|
+
isOptional: false
|
|
685
758
|
}, {
|
|
686
759
|
name: 'radix',
|
|
687
|
-
type: new IntegerType_1.IntegerType()
|
|
760
|
+
type: new IntegerType_1.IntegerType(),
|
|
761
|
+
isOptional: true
|
|
688
762
|
}]
|
|
689
763
|
}, {
|
|
690
764
|
name: 'Substitute',
|
|
691
765
|
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
|
|
766
|
+
type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
|
|
693
767
|
file: exports.globalFile,
|
|
694
768
|
params: [{
|
|
695
769
|
name: 'str',
|
|
696
|
-
type: new StringType_1.StringType()
|
|
770
|
+
type: new StringType_1.StringType(),
|
|
771
|
+
isOptional: false
|
|
697
772
|
}, {
|
|
698
773
|
name: 'arg0',
|
|
699
|
-
type: new StringType_1.StringType()
|
|
774
|
+
type: new StringType_1.StringType(),
|
|
775
|
+
isOptional: false
|
|
700
776
|
}, {
|
|
701
777
|
name: 'arg1',
|
|
702
|
-
type: new StringType_1.StringType()
|
|
778
|
+
type: new StringType_1.StringType(),
|
|
779
|
+
isOptional: true
|
|
703
780
|
}, {
|
|
704
781
|
name: 'arg2',
|
|
705
|
-
type: new StringType_1.StringType()
|
|
782
|
+
type: new StringType_1.StringType(),
|
|
783
|
+
isOptional: true
|
|
706
784
|
}, {
|
|
707
785
|
name: 'arg3',
|
|
708
|
-
type: new StringType_1.StringType()
|
|
786
|
+
type: new StringType_1.StringType(),
|
|
787
|
+
isOptional: true
|
|
709
788
|
}]
|
|
710
789
|
}
|
|
711
790
|
];
|
|
@@ -713,37 +792,212 @@ let programStatementFunctions = [
|
|
|
713
792
|
{
|
|
714
793
|
name: 'Tab',
|
|
715
794
|
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
|
|
795
|
+
type: new TypedFunctionType_1.TypedFunctionType(new VoidType_1.VoidType()),
|
|
717
796
|
file: exports.globalFile,
|
|
718
797
|
params: [{
|
|
719
798
|
name: 'expression',
|
|
720
|
-
type: new IntegerType_1.IntegerType()
|
|
799
|
+
type: new IntegerType_1.IntegerType(),
|
|
800
|
+
isOptional: false
|
|
721
801
|
}]
|
|
722
802
|
}, {
|
|
723
803
|
name: 'Pos',
|
|
724
804
|
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
|
|
805
|
+
type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
|
|
726
806
|
file: exports.globalFile,
|
|
727
807
|
params: [{
|
|
728
808
|
name: 'x',
|
|
729
|
-
type: new IntegerType_1.IntegerType()
|
|
809
|
+
type: new IntegerType_1.IntegerType(),
|
|
810
|
+
isOptional: false
|
|
730
811
|
}]
|
|
731
812
|
//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
813
|
}, {
|
|
733
814
|
name: 'Roku_Ads',
|
|
734
815
|
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
|
|
816
|
+
type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
|
|
817
|
+
file: exports.globalFile,
|
|
818
|
+
params: []
|
|
819
|
+
//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
|
|
820
|
+
}, {
|
|
821
|
+
name: 'Roku_Event_Dispatcher',
|
|
822
|
+
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',
|
|
823
|
+
type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
|
|
824
|
+
file: exports.globalFile,
|
|
825
|
+
params: []
|
|
826
|
+
}, {
|
|
827
|
+
name: 'bslBrightScriptErrorCodes',
|
|
828
|
+
shortDescription: 'Returns an roAssociativeArray with name value pairs of the error name and corresponding integer value, for example ERR_OKAY = &hFF.',
|
|
829
|
+
type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
|
|
830
|
+
file: exports.globalFile,
|
|
831
|
+
params: []
|
|
832
|
+
}, {
|
|
833
|
+
name: 'bslGeneralConstants',
|
|
834
|
+
shortDescription: 'Returns an roAssociativeArray with name value pairs of system constants, for example MAX_INT = 2147483647.',
|
|
835
|
+
type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
|
|
736
836
|
file: exports.globalFile,
|
|
737
837
|
params: []
|
|
838
|
+
}, {
|
|
839
|
+
name: 'bslUniversalControlEventCodes',
|
|
840
|
+
shortDescription: 'Returns an roAssociativeArray with name value pairs of the remote key code (buttons) constants, for example BUTTON_SELECT_PRESSED = 6.',
|
|
841
|
+
type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
|
|
842
|
+
file: exports.globalFile,
|
|
843
|
+
params: []
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
name: 'AsciiToHex',
|
|
847
|
+
shortDescription: 'Returns the hex encoded string, for example AsciiToHex("Hi!") = "486921".',
|
|
848
|
+
type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
|
|
849
|
+
file: exports.globalFile,
|
|
850
|
+
params: [{
|
|
851
|
+
name: 'ascii',
|
|
852
|
+
type: new StringType_1.StringType(),
|
|
853
|
+
isOptional: false
|
|
854
|
+
}]
|
|
855
|
+
}, {
|
|
856
|
+
name: 'HexToAscii',
|
|
857
|
+
shortDescription: 'Returns a string that is the hex decoded string, for example HexToAscii("486921") = "Hi!".',
|
|
858
|
+
type: new TypedFunctionType_1.TypedFunctionType(new StringType_1.StringType()),
|
|
859
|
+
file: exports.globalFile,
|
|
860
|
+
params: [{
|
|
861
|
+
name: 'hex',
|
|
862
|
+
type: new StringType_1.StringType(),
|
|
863
|
+
isOptional: false
|
|
864
|
+
}]
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
name: 'HexToInteger',
|
|
868
|
+
shortDescription: 'Returns the integer value of the passed in hex string.',
|
|
869
|
+
type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
|
|
870
|
+
file: exports.globalFile,
|
|
871
|
+
params: [{
|
|
872
|
+
name: 'hex',
|
|
873
|
+
type: new StringType_1.StringType(),
|
|
874
|
+
isOptional: false
|
|
875
|
+
}]
|
|
876
|
+
}, {
|
|
877
|
+
name: 'HexToInteger',
|
|
878
|
+
shortDescription: 'Returns a string that is the hex decoded string, for example HexToAscii("486921") = "Hi!".',
|
|
879
|
+
type: new TypedFunctionType_1.TypedFunctionType(new IntegerType_1.IntegerType()),
|
|
880
|
+
file: exports.globalFile,
|
|
881
|
+
params: [{
|
|
882
|
+
name: 'hex',
|
|
883
|
+
type: new StringType_1.StringType(),
|
|
884
|
+
isOptional: false
|
|
885
|
+
}]
|
|
886
|
+
}, {
|
|
887
|
+
name: 'dfNewBitmapSet',
|
|
888
|
+
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).
|
|
889
|
+
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.
|
|
890
|
+
Returns an roAssociativeArray with the following name value pairs:
|
|
891
|
+
ExtraInfo: roAssociativeArray
|
|
892
|
+
Regions: roAssociativeArray of name, roRegions pairs
|
|
893
|
+
Animations: roAssociativeArray of name, roArray of roRegion pairs.
|
|
894
|
+
Backgrounds: roAssociativeArray of name, path pairs.`,
|
|
895
|
+
type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
|
|
896
|
+
file: exports.globalFile,
|
|
897
|
+
params: [{
|
|
898
|
+
name: 'filename',
|
|
899
|
+
type: new StringType_1.StringType(),
|
|
900
|
+
isOptional: false
|
|
901
|
+
}]
|
|
902
|
+
}, {
|
|
903
|
+
name: 'dfDrawMessage',
|
|
904
|
+
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.',
|
|
905
|
+
type: new TypedFunctionType_1.TypedFunctionType(new VoidType_1.VoidType()),
|
|
906
|
+
file: exports.globalFile,
|
|
907
|
+
params: [{
|
|
908
|
+
name: 'dest',
|
|
909
|
+
type: new ObjectType_1.ObjectType(),
|
|
910
|
+
isOptional: false
|
|
911
|
+
}, {
|
|
912
|
+
name: 'region',
|
|
913
|
+
type: new ObjectType_1.ObjectType(),
|
|
914
|
+
isOptional: false
|
|
915
|
+
}]
|
|
916
|
+
}, {
|
|
917
|
+
name: 'dfDrawImage',
|
|
918
|
+
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.',
|
|
919
|
+
type: new TypedFunctionType_1.TypedFunctionType(new BooleanType_1.BooleanType()),
|
|
920
|
+
file: exports.globalFile,
|
|
921
|
+
params: [{
|
|
922
|
+
name: 'dest',
|
|
923
|
+
type: new ObjectType_1.ObjectType(),
|
|
924
|
+
isOptional: false
|
|
925
|
+
}, {
|
|
926
|
+
name: 'path',
|
|
927
|
+
type: new StringType_1.StringType(),
|
|
928
|
+
isOptional: false
|
|
929
|
+
}, {
|
|
930
|
+
name: 'x',
|
|
931
|
+
type: new IntegerType_1.IntegerType(),
|
|
932
|
+
isOptional: false
|
|
933
|
+
}, {
|
|
934
|
+
name: 'y',
|
|
935
|
+
type: new IntegerType_1.IntegerType(),
|
|
936
|
+
isOptional: false
|
|
937
|
+
}]
|
|
938
|
+
}, {
|
|
939
|
+
name: 'dfSetupDisplayRegions',
|
|
940
|
+
shortDescription: `Helper function to setup screen scaling with supplied pillar box or letterbox images to fill the entire screen.
|
|
941
|
+
screen is an roScreen
|
|
942
|
+
topx and topy are the coordinates of the upper left hand corner of the main drawing region
|
|
943
|
+
Width and height is the size of the main drawing region
|
|
944
|
+
|
|
945
|
+
Returns an associative array containing the following roRegions
|
|
946
|
+
Main: main drawable region
|
|
947
|
+
Left: left region if there is pillar box area on the left
|
|
948
|
+
Right: right region if there is a pillar box area on the right
|
|
949
|
+
Upper: upper region if there is a letterbox area at thetop
|
|
950
|
+
Lower: lower region if there is a letterbox area at the bottom
|
|
951
|
+
When using these regions as drawables, your graphics will be translated and clipped to these regions.`,
|
|
952
|
+
type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
|
|
953
|
+
file: exports.globalFile,
|
|
954
|
+
params: [{
|
|
955
|
+
name: 'screen',
|
|
956
|
+
type: new ObjectType_1.ObjectType(),
|
|
957
|
+
isOptional: false
|
|
958
|
+
}, {
|
|
959
|
+
name: 'topx',
|
|
960
|
+
type: new IntegerType_1.IntegerType(),
|
|
961
|
+
isOptional: false
|
|
962
|
+
}, {
|
|
963
|
+
name: 'topy',
|
|
964
|
+
type: new IntegerType_1.IntegerType(),
|
|
965
|
+
isOptional: false
|
|
966
|
+
}, {
|
|
967
|
+
name: 'width',
|
|
968
|
+
type: new IntegerType_1.IntegerType(),
|
|
969
|
+
isOptional: false
|
|
970
|
+
}, {
|
|
971
|
+
name: 'height',
|
|
972
|
+
type: new IntegerType_1.IntegerType(),
|
|
973
|
+
isOptional: false
|
|
974
|
+
}]
|
|
975
|
+
}, {
|
|
976
|
+
name: 'dfSetBackground',
|
|
977
|
+
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.
|
|
978
|
+
backgroundName is a key for the Backgrounds roAssociative array of backgrounds.
|
|
979
|
+
Backgrounds is an roAssociative array of background name keys and file path string values
|
|
980
|
+
This function creates an roBitmap out of the background image file and returns a region the size of the entire roBitmap.`,
|
|
981
|
+
type: new TypedFunctionType_1.TypedFunctionType(new ObjectType_1.ObjectType()),
|
|
982
|
+
file: exports.globalFile,
|
|
983
|
+
params: [{
|
|
984
|
+
name: 'backgroundName',
|
|
985
|
+
type: new StringType_1.StringType(),
|
|
986
|
+
isOptional: false
|
|
987
|
+
}, {
|
|
988
|
+
name: 'backgrounds',
|
|
989
|
+
type: new ObjectType_1.ObjectType(),
|
|
990
|
+
isOptional: false
|
|
991
|
+
}]
|
|
738
992
|
}
|
|
739
993
|
];
|
|
740
994
|
exports.globalCallables = [...mathFunctions, ...runtimeFunctions, ...globalUtilityFunctions, ...globalStringFunctions, ...programStatementFunctions];
|
|
741
995
|
for (let callable of exports.globalCallables) {
|
|
742
996
|
//give each callable a dummy location
|
|
743
|
-
callable.nameRange = util_1.
|
|
997
|
+
callable.nameRange = util_1.util.createRange(0, 0, 0, callable.name.length);
|
|
744
998
|
//add each parameter to the type
|
|
745
999
|
for (let param of callable.params) {
|
|
746
|
-
callable.type.addParameter(param);
|
|
1000
|
+
callable.type.addParameter(param.name, param.type, param.isOptional);
|
|
747
1001
|
}
|
|
748
1002
|
//set name in type
|
|
749
1003
|
callable.type.setName(callable.name);
|
|
@@ -751,7 +1005,7 @@ for (let callable of exports.globalCallables) {
|
|
|
751
1005
|
return this.name;
|
|
752
1006
|
};
|
|
753
1007
|
}
|
|
754
|
-
exports.globalFile.
|
|
1008
|
+
exports.globalFile.staticCallables = exports.globalCallables;
|
|
755
1009
|
/**
|
|
756
1010
|
* A map of all built-in function names. We use this extensively in scope validation
|
|
757
1011
|
* so keep a single copy in memory to improve performance
|