brighterscript 0.66.0-alpha.0 → 0.66.0-alpha.10
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 +223 -10
- package/README.md +13 -3
- package/bsconfig.schema.json +15 -0
- 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 +25 -0
- package/dist/AstValidationSegmenter.js +150 -0
- package/dist/AstValidationSegmenter.js.map +1 -0
- package/dist/BsConfig.d.ts +13 -4
- package/dist/BusyStatusTracker.d.ts +31 -0
- package/dist/BusyStatusTracker.js +83 -0
- package/dist/BusyStatusTracker.js.map +1 -0
- package/dist/Cache.js +3 -3
- package/dist/Cache.js.map +1 -1
- package/dist/CacheVerifier.d.ts +0 -1
- package/dist/CodeActionUtil.d.ts +2 -2
- package/dist/CommentFlagProcessor.d.ts +4 -3
- package/dist/CommentFlagProcessor.js.map +1 -1
- package/dist/DiagnosticCollection.js +8 -5
- package/dist/DiagnosticCollection.js.map +1 -1
- package/dist/DiagnosticMessages.d.ts +34 -4
- package/dist/DiagnosticMessages.js +59 -4
- package/dist/DiagnosticMessages.js.map +1 -1
- package/dist/FunctionScope.d.ts +1 -1
- package/dist/LanguageServer.d.ts +23 -1
- package/dist/LanguageServer.js +139 -57
- package/dist/LanguageServer.js.map +1 -1
- package/dist/Logger.d.ts +3 -2
- package/dist/Logger.js +10 -2
- package/dist/Logger.js.map +1 -1
- package/dist/PluginInterface.d.ts +11 -2
- package/dist/PluginInterface.js +69 -10
- package/dist/PluginInterface.js.map +1 -1
- package/dist/Program.d.ts +138 -49
- package/dist/Program.js +656 -340
- package/dist/Program.js.map +1 -1
- package/dist/ProgramBuilder.d.ts +10 -4
- package/dist/ProgramBuilder.js +83 -66
- package/dist/ProgramBuilder.js.map +1 -1
- package/dist/Scope.d.ts +52 -49
- package/dist/Scope.js +312 -247
- package/dist/Scope.js.map +1 -1
- package/dist/SymbolTable.d.ts +35 -14
- package/dist/SymbolTable.js +89 -26
- package/dist/SymbolTable.js.map +1 -1
- package/dist/Throttler.d.ts +12 -0
- package/dist/Throttler.js +39 -0
- package/dist/Throttler.js.map +1 -1
- package/dist/XmlScope.d.ts +7 -4
- package/dist/XmlScope.js +52 -12
- package/dist/XmlScope.js.map +1 -1
- package/dist/astUtils/{AstEditor.d.ts → Editor.d.ts} +6 -1
- package/dist/astUtils/{AstEditor.js → Editor.js} +9 -3
- package/dist/astUtils/Editor.js.map +1 -0
- package/dist/astUtils/{AstEditor.spec.js → Editor.spec.js} +10 -6
- package/dist/astUtils/Editor.spec.js.map +1 -0
- package/dist/astUtils/creators.d.ts +3 -1
- package/dist/astUtils/creators.js +14 -4
- package/dist/astUtils/creators.js.map +1 -1
- package/dist/astUtils/reflection.d.ts +37 -9
- package/dist/astUtils/reflection.js +83 -14
- package/dist/astUtils/reflection.js.map +1 -1
- package/dist/astUtils/reflection.spec.js +87 -5
- package/dist/astUtils/reflection.spec.js.map +1 -1
- package/dist/astUtils/visitors.d.ts +14 -3
- package/dist/astUtils/visitors.js +22 -2
- package/dist/astUtils/visitors.js.map +1 -1
- package/dist/astUtils/visitors.spec.js +58 -7
- package/dist/astUtils/visitors.spec.js.map +1 -1
- package/dist/bscPlugin/BscPlugin.d.ts +11 -4
- package/dist/bscPlugin/BscPlugin.js +26 -6
- package/dist/bscPlugin/BscPlugin.js.map +1 -1
- package/dist/bscPlugin/CallExpressionInfo.d.ts +3 -3
- package/dist/bscPlugin/CallExpressionInfo.js.map +1 -1
- 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/codeActions/CodeActionsProcessor.js +8 -8
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js.map +1 -1
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js +4 -4
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js.map +1 -1
- package/dist/bscPlugin/completions/CompletionsProcessor.d.ts +50 -1
- package/dist/bscPlugin/completions/CompletionsProcessor.js +442 -23
- package/dist/bscPlugin/completions/CompletionsProcessor.js.map +1 -1
- package/dist/bscPlugin/completions/CompletionsProcessor.spec.js +1737 -0
- package/dist/bscPlugin/completions/CompletionsProcessor.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 +7 -3
- package/dist/bscPlugin/hover/HoverProcessor.js +133 -103
- package/dist/bscPlugin/hover/HoverProcessor.js.map +1 -1
- package/dist/bscPlugin/hover/HoverProcessor.spec.js +241 -29
- package/dist/bscPlugin/hover/HoverProcessor.spec.js.map +1 -1
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.d.ts +1 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js +43 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js.map +1 -1
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js +22 -0
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js.map +1 -1
- package/dist/bscPlugin/serialize/BslibInjector.spec.js +19 -0
- package/dist/bscPlugin/serialize/BslibInjector.spec.js.map +1 -0
- package/dist/bscPlugin/serialize/BslibManager.d.ts +9 -0
- package/dist/bscPlugin/serialize/BslibManager.js +40 -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 +72 -0
- package/dist/bscPlugin/serialize/FileSerializer.js.map +1 -0
- package/dist/bscPlugin/transpile/{BrsFilePreTranspileProcessor.d.ts → BrsFileTranspileProcessor.d.ts} +4 -2
- package/dist/bscPlugin/transpile/{BrsFilePreTranspileProcessor.js → BrsFileTranspileProcessor.js} +29 -5
- 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 +41 -0
- package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.js.map +1 -0
- package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.d.ts +2 -2
- package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js.map +1 -1
- package/dist/bscPlugin/validation/BrsFileValidator.d.ts +0 -4
- package/dist/bscPlugin/validation/BrsFileValidator.js +35 -65
- package/dist/bscPlugin/validation/BrsFileValidator.js.map +1 -1
- package/dist/bscPlugin/validation/BrsFileValidator.spec.js +1 -1
- package/dist/bscPlugin/validation/BrsFileValidator.spec.js.map +1 -1
- package/dist/bscPlugin/validation/ProgramValidator.d.ts +3 -3
- package/dist/bscPlugin/validation/ProgramValidator.js +6 -6
- package/dist/bscPlugin/validation/ProgramValidator.js.map +1 -1
- package/dist/bscPlugin/validation/ScopeValidator.d.ts +28 -7
- package/dist/bscPlugin/validation/ScopeValidator.js +393 -205
- package/dist/bscPlugin/validation/ScopeValidator.js.map +1 -1
- package/dist/bscPlugin/validation/ScopeValidator.spec.d.ts +1 -0
- package/dist/bscPlugin/validation/ScopeValidator.spec.js +2038 -0
- package/dist/bscPlugin/validation/ScopeValidator.spec.js.map +1 -0
- package/dist/bscPlugin/validation/XmlFileValidator.js +2 -2
- package/dist/bscPlugin/validation/XmlFileValidator.js.map +1 -1
- package/dist/cli.js +104 -13
- 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 +8 -2
- package/dist/diagnosticUtils.js +45 -16
- package/dist/diagnosticUtils.js.map +1 -1
- package/dist/examples/plugins/removePrint.js +1 -1
- package/dist/examples/plugins/removePrint.js.map +1 -1
- package/dist/files/AssetFile.d.ts +26 -0
- package/dist/files/AssetFile.js +26 -0
- package/dist/files/AssetFile.js.map +1 -0
- package/dist/files/BrsFile.Class.spec.js +383 -56
- package/dist/files/BrsFile.Class.spec.js.map +1 -1
- package/dist/files/BrsFile.d.ts +73 -46
- package/dist/files/BrsFile.js +370 -534
- package/dist/files/BrsFile.js.map +1 -1
- package/dist/files/BrsFile.spec.js +1139 -682
- package/dist/files/BrsFile.spec.js.map +1 -1
- 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/File.d.ts +106 -0
- package/dist/files/File.js +16 -0
- package/dist/files/File.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 +56 -23
- package/dist/files/XmlFile.js +88 -60
- package/dist/files/XmlFile.js.map +1 -1
- package/dist/files/XmlFile.spec.js +63 -91
- package/dist/files/XmlFile.spec.js.map +1 -1
- package/dist/files/tests/imports.spec.js +21 -8
- package/dist/files/tests/imports.spec.js.map +1 -1
- package/dist/files/tests/optionalChaning.spec.js +14 -14
- package/dist/files/tests/optionalChaning.spec.js.map +1 -1
- package/dist/globalCallables.js +88 -84
- package/dist/globalCallables.js.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +436 -81
- package/dist/interfaces.js +13 -2
- package/dist/interfaces.js.map +1 -1
- package/dist/lexer/Lexer.d.ts +12 -0
- package/dist/lexer/Lexer.js +28 -8
- package/dist/lexer/Lexer.js.map +1 -1
- package/dist/lexer/Lexer.spec.js +40 -0
- package/dist/lexer/Lexer.spec.js.map +1 -1
- package/dist/lexer/Token.d.ts +4 -0
- package/dist/lexer/Token.js.map +1 -1
- package/dist/lexer/TokenKind.d.ts +5 -0
- package/dist/lexer/TokenKind.js +14 -2
- package/dist/lexer/TokenKind.js.map +1 -1
- package/dist/parser/AstNode.d.ts +9 -2
- package/dist/parser/AstNode.js +16 -0
- package/dist/parser/AstNode.js.map +1 -1
- package/dist/parser/BrsTranspileState.d.ts +3 -2
- package/dist/parser/BrsTranspileState.js +3 -2
- package/dist/parser/BrsTranspileState.js.map +1 -1
- package/dist/parser/Expression.d.ts +21 -5
- package/dist/parser/Expression.js +128 -35
- package/dist/parser/Expression.js.map +1 -1
- package/dist/parser/Parser.Class.spec.js +103 -1
- package/dist/parser/Parser.Class.spec.js.map +1 -1
- package/dist/parser/Parser.d.ts +7 -0
- package/dist/parser/Parser.js +117 -21
- package/dist/parser/Parser.js.map +1 -1
- package/dist/parser/Parser.spec.js +557 -5
- package/dist/parser/Parser.spec.js.map +1 -1
- package/dist/parser/SGParser.d.ts +4 -4
- package/dist/parser/SGParser.js +3 -3
- package/dist/parser/SGParser.js.map +1 -1
- package/dist/parser/SGParser.spec.js +2 -2
- package/dist/parser/SGParser.spec.js.map +1 -1
- package/dist/parser/SGTypes.d.ts +2 -2
- package/dist/parser/Statement.d.ts +37 -12
- package/dist/parser/Statement.js +153 -46
- package/dist/parser/Statement.js.map +1 -1
- package/dist/parser/tests/Parser.spec.js +2 -1
- package/dist/parser/tests/Parser.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/For.spec.js +16 -8
- package/dist/parser/tests/controlFlow/For.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/ForEach.spec.js +12 -6
- package/dist/parser/tests/controlFlow/ForEach.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/While.spec.js +8 -4
- package/dist/parser/tests/controlFlow/While.spec.js.map +1 -1
- package/dist/parser/tests/expression/Call.spec.js +4 -4
- package/dist/parser/tests/expression/Call.spec.js.map +1 -1
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js +29 -29
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/RegexLiteralExpression.spec.js +10 -10
- package/dist/parser/tests/expression/RegexLiteralExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.js +24 -24
- package/dist/parser/tests/expression/SourceLiteralExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js +75 -36
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TernaryExpression.spec.js +36 -36
- package/dist/parser/tests/expression/TernaryExpression.spec.js.map +1 -1
- 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/ConstStatement.spec.js +71 -22
- package/dist/parser/tests/statement/ConstStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/Continue.spec.js +2 -2
- package/dist/parser/tests/statement/Continue.spec.js.map +1 -1
- package/dist/parser/tests/statement/Enum.spec.js +38 -285
- package/dist/parser/tests/statement/Enum.spec.js.map +1 -1
- package/dist/parser/tests/statement/For.spec.js +6 -6
- package/dist/parser/tests/statement/For.spec.js.map +1 -1
- package/dist/parser/tests/statement/ForEach.spec.js +4 -4
- package/dist/parser/tests/statement/ForEach.spec.js.map +1 -1
- package/dist/parser/tests/statement/InterfaceStatement.spec.js +26 -10
- package/dist/parser/tests/statement/InterfaceStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/PrintStatement.spec.js +16 -13
- package/dist/parser/tests/statement/PrintStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/ReturnStatement.spec.js +5 -3
- package/dist/parser/tests/statement/ReturnStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/Set.spec.js +26 -13
- package/dist/parser/tests/statement/Set.spec.js.map +1 -1
- package/dist/preprocessor/Manifest.d.ts +1 -1
- package/dist/preprocessor/Manifest.js +2 -2
- package/dist/preprocessor/Manifest.js.map +1 -1
- package/dist/roku-types/data.json +243 -293
- package/dist/roku-types/index.d.ts +17 -38
- package/dist/types/ArrayType.d.ts +4 -1
- package/dist/types/ArrayType.js +46 -6
- package/dist/types/ArrayType.js.map +1 -1
- package/dist/types/ArrayType.spec.js +32 -3
- package/dist/types/ArrayType.spec.js.map +1 -1
- package/dist/types/AssociativeArrayType.d.ts +11 -0
- package/dist/types/AssociativeArrayType.js +52 -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 +2 -1
- package/dist/types/BooleanType.js +8 -2
- package/dist/types/BooleanType.js.map +1 -1
- package/dist/types/BscType.d.ts +10 -6
- package/dist/types/BscType.js +69 -16
- package/dist/types/BscType.js.map +1 -1
- package/dist/types/BscTypeKind.d.ts +3 -0
- package/dist/types/BscTypeKind.js +3 -0
- package/dist/types/BscTypeKind.js.map +1 -1
- package/dist/types/BuiltInInterfaceAdder.d.ts +23 -0
- package/dist/types/BuiltInInterfaceAdder.js +157 -0
- package/dist/types/BuiltInInterfaceAdder.js.map +1 -0
- package/dist/types/BuiltInInterfaceAdder.spec.d.ts +1 -0
- package/dist/types/BuiltInInterfaceAdder.spec.js +116 -0
- package/dist/types/BuiltInInterfaceAdder.spec.js.map +1 -0
- package/dist/types/ClassType.d.ts +10 -4
- package/dist/types/ClassType.js +32 -5
- package/dist/types/ClassType.js.map +1 -1
- package/dist/types/ClassType.spec.js +5 -3
- package/dist/types/ClassType.spec.js.map +1 -1
- package/dist/types/ComponentType.d.ts +26 -0
- package/dist/types/ComponentType.js +83 -0
- package/dist/types/ComponentType.js.map +1 -0
- package/dist/types/DoubleType.d.ts +2 -1
- package/dist/types/DoubleType.js +9 -2
- package/dist/types/DoubleType.js.map +1 -1
- package/dist/types/DynamicType.d.ts +2 -2
- package/dist/types/DynamicType.js +3 -1
- package/dist/types/DynamicType.js.map +1 -1
- package/dist/types/EnumType.d.ts +24 -6
- package/dist/types/EnumType.js +29 -7
- package/dist/types/EnumType.js.map +1 -1
- package/dist/types/FloatType.d.ts +2 -1
- package/dist/types/FloatType.js +9 -2
- package/dist/types/FloatType.js.map +1 -1
- package/dist/types/FunctionType.d.ts +8 -20
- package/dist/types/FunctionType.js +17 -45
- package/dist/types/FunctionType.js.map +1 -1
- package/dist/types/InheritableType.d.ts +7 -4
- package/dist/types/InheritableType.js +67 -3
- package/dist/types/InheritableType.js.map +1 -1
- package/dist/types/IntegerType.d.ts +2 -1
- package/dist/types/IntegerType.js +9 -2
- package/dist/types/IntegerType.js.map +1 -1
- package/dist/types/InterfaceType.d.ts +6 -4
- package/dist/types/InterfaceType.js +8 -11
- package/dist/types/InterfaceType.js.map +1 -1
- package/dist/types/InterfaceType.spec.js +30 -2
- package/dist/types/InterfaceType.spec.js.map +1 -1
- package/dist/types/InvalidType.d.ts +2 -1
- package/dist/types/InvalidType.js +7 -1
- package/dist/types/InvalidType.js.map +1 -1
- package/dist/types/LongIntegerType.d.ts +2 -1
- package/dist/types/LongIntegerType.js +9 -2
- package/dist/types/LongIntegerType.js.map +1 -1
- package/dist/types/NamespaceType.d.ts +2 -1
- package/dist/types/NamespaceType.js +3 -0
- package/dist/types/NamespaceType.js.map +1 -1
- package/dist/types/ObjectType.d.ts +2 -2
- package/dist/types/ObjectType.js +5 -10
- package/dist/types/ObjectType.js.map +1 -1
- package/dist/types/ReferenceType.d.ts +15 -3
- package/dist/types/ReferenceType.js +173 -24
- package/dist/types/ReferenceType.js.map +1 -1
- package/dist/types/ReferenceType.spec.js +21 -6
- package/dist/types/ReferenceType.spec.js.map +1 -1
- package/dist/types/StringType.d.ts +2 -1
- package/dist/types/StringType.js +9 -2
- package/dist/types/StringType.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 +2 -1
- package/dist/types/UninitializedType.js +1 -1
- package/dist/types/UninitializedType.js.map +1 -1
- package/dist/types/UnionType.d.ts +4 -2
- package/dist/types/UnionType.js +36 -4
- package/dist/types/UnionType.js.map +1 -1
- package/dist/types/UnionType.spec.js +46 -19
- package/dist/types/UnionType.spec.js.map +1 -1
- package/dist/types/VoidType.d.ts +2 -1
- package/dist/types/VoidType.js +7 -2
- package/dist/types/VoidType.js.map +1 -1
- package/dist/types/helper.spec.js +15 -0
- package/dist/types/helper.spec.js.map +1 -1
- package/dist/types/helpers.d.ts +5 -0
- package/dist/types/helpers.js +50 -3
- package/dist/types/helpers.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/util.d.ts +71 -15
- package/dist/util.js +578 -150
- package/dist/util.js.map +1 -1
- package/dist/validators/ClassValidator.d.ts +0 -1
- package/dist/validators/ClassValidator.js +0 -22
- package/dist/validators/ClassValidator.js.map +1 -1
- package/package.json +3 -2
- package/dist/astUtils/AstEditor.js.map +0 -1
- package/dist/astUtils/AstEditor.spec.js.map +0 -1
- package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.js.map +0 -1
- package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.spec.js +0 -31
- package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.spec.js.map +0 -1
- package/dist/types/FunctionType.spec.js +0 -23
- package/dist/types/FunctionType.spec.js.map +0 -1
- /package/dist/astUtils/{AstEditor.spec.d.ts → Editor.spec.d.ts} +0 -0
- /package/dist/bscPlugin/{transpile/BrsFilePreTranspileProcessor.spec.d.ts → completions/CompletionsProcessor.spec.d.ts} +0 -0
- /package/dist/{types/FunctionType.spec.d.ts → bscPlugin/serialize/BslibInjector.spec.d.ts} +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { Token, Identifier } from '../lexer/Token';
|
|
2
2
|
import { TokenKind } from '../lexer/TokenKind';
|
|
3
|
-
import type { FunctionExpression, FunctionParameterExpression, TypeExpression } from './Expression';
|
|
3
|
+
import type { DottedGetExpression, FunctionExpression, FunctionParameterExpression, TypeExpression } from './Expression';
|
|
4
|
+
import { VariableExpression } from './Expression';
|
|
4
5
|
import type { Range } from 'vscode-languageserver';
|
|
5
6
|
import type { BrsTranspileState } from './BrsTranspileState';
|
|
6
7
|
import { ParseMode } from './Parser';
|
|
7
8
|
import type { WalkVisitor, WalkOptions } from '../astUtils/visitors';
|
|
8
|
-
import type
|
|
9
|
+
import { type GetTypeOptions, type TranspileResult, type TypedefProvider } from '../interfaces';
|
|
9
10
|
import type { SourceNode } from 'source-map';
|
|
10
11
|
import type { TranspileState } from './TranspileState';
|
|
11
12
|
import { SymbolTable } from '../SymbolTable';
|
|
@@ -17,7 +18,7 @@ import { EnumMemberType, EnumType } from '../types/EnumType';
|
|
|
17
18
|
import { NamespaceType } from '../types/NamespaceType';
|
|
18
19
|
import { InterfaceType } from '../types/InterfaceType';
|
|
19
20
|
import type { BscType } from '../types/BscType';
|
|
20
|
-
import {
|
|
21
|
+
import { TypedFunctionType } from '../types/TypedFunctionType';
|
|
21
22
|
export declare class EmptyStatement extends Statement {
|
|
22
23
|
/**
|
|
23
24
|
* Create a negative range to indicate this is an interpolated location
|
|
@@ -119,10 +120,11 @@ export declare class FunctionStatement extends Statement implements TypedefProvi
|
|
|
119
120
|
* Get the name of this expression based on the parse mode
|
|
120
121
|
*/
|
|
121
122
|
getName(parseMode: ParseMode): string;
|
|
123
|
+
getLeadingTrivia(): Token[];
|
|
122
124
|
transpile(state: BrsTranspileState): any[];
|
|
123
125
|
getTypedef(state: BrsTranspileState): any[];
|
|
124
126
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
125
|
-
getType(options: GetTypeOptions):
|
|
127
|
+
getType(options: GetTypeOptions): TypedFunctionType;
|
|
126
128
|
}
|
|
127
129
|
export declare class IfStatement extends Statement {
|
|
128
130
|
readonly tokens: {
|
|
@@ -222,6 +224,7 @@ export declare class LabelStatement extends Statement {
|
|
|
222
224
|
});
|
|
223
225
|
readonly kind = AstNodeKind.LabelStatement;
|
|
224
226
|
readonly range: Range;
|
|
227
|
+
getLeadingTrivia(): Token[];
|
|
225
228
|
transpile(state: BrsTranspileState): SourceNode[];
|
|
226
229
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
227
230
|
}
|
|
@@ -352,10 +355,10 @@ export declare class LibraryStatement extends Statement implements TypedefProvid
|
|
|
352
355
|
}
|
|
353
356
|
export declare class NamespaceStatement extends Statement implements TypedefProvider {
|
|
354
357
|
keyword: Token;
|
|
355
|
-
nameExpression:
|
|
358
|
+
nameExpression: VariableExpression | DottedGetExpression;
|
|
356
359
|
body: Body;
|
|
357
360
|
endKeyword: Token;
|
|
358
|
-
constructor(keyword: Token, nameExpression:
|
|
361
|
+
constructor(keyword: Token, nameExpression: VariableExpression | DottedGetExpression, body: Body, endKeyword: Token);
|
|
359
362
|
readonly kind = AstNodeKind.NamespaceStatement;
|
|
360
363
|
/**
|
|
361
364
|
* The string name for this namespace
|
|
@@ -365,6 +368,8 @@ export declare class NamespaceStatement extends Statement implements TypedefProv
|
|
|
365
368
|
private _range;
|
|
366
369
|
cacheRange(): Range;
|
|
367
370
|
getName(parseMode: ParseMode): string;
|
|
371
|
+
getLeadingTrivia(): Token[];
|
|
372
|
+
getNameParts(): Identifier[];
|
|
368
373
|
transpile(state: BrsTranspileState): TranspileResult;
|
|
369
374
|
getTypedef(state: BrsTranspileState): string[];
|
|
370
375
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
@@ -399,6 +404,7 @@ export declare class InterfaceStatement extends Statement implements TypedefProv
|
|
|
399
404
|
get fields(): InterfaceFieldStatement[];
|
|
400
405
|
get methods(): InterfaceMethodStatement[];
|
|
401
406
|
hasParentInterface(): boolean;
|
|
407
|
+
getLeadingTrivia(): Token[];
|
|
402
408
|
/**
|
|
403
409
|
* The name of the interface WITH its leading namespace (if applicable)
|
|
404
410
|
*/
|
|
@@ -419,14 +425,17 @@ export declare class InterfaceStatement extends Statement implements TypedefProv
|
|
|
419
425
|
export declare class InterfaceFieldStatement extends Statement implements TypedefProvider {
|
|
420
426
|
typeExpression?: TypeExpression;
|
|
421
427
|
transpile(state: BrsTranspileState): TranspileResult;
|
|
422
|
-
constructor(nameToken: Identifier, asToken: Token, typeExpression?: TypeExpression);
|
|
428
|
+
constructor(nameToken: Identifier, asToken: Token, typeExpression?: TypeExpression, optionalToken?: Token);
|
|
423
429
|
readonly kind = AstNodeKind.InterfaceFieldStatement;
|
|
424
430
|
range: Range;
|
|
425
431
|
tokens: {
|
|
426
432
|
name: Identifier;
|
|
427
433
|
as: Token;
|
|
434
|
+
optional?: Token;
|
|
428
435
|
};
|
|
436
|
+
getLeadingTrivia(): Token[];
|
|
429
437
|
get name(): string;
|
|
438
|
+
get isOptional(): boolean;
|
|
430
439
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
431
440
|
getTypedef(state: BrsTranspileState): (string | SourceNode)[];
|
|
432
441
|
getType(options: GetTypeOptions): BscType;
|
|
@@ -435,19 +444,26 @@ export declare class InterfaceMethodStatement extends Statement implements Typed
|
|
|
435
444
|
params: FunctionParameterExpression[];
|
|
436
445
|
returnTypeExpression?: TypeExpression;
|
|
437
446
|
transpile(state: BrsTranspileState): TranspileResult;
|
|
438
|
-
constructor(functionTypeToken: Token, nameToken: Identifier, leftParen: Token, params: FunctionParameterExpression[], rightParen: Token, asToken?: Token, returnTypeExpression?: TypeExpression);
|
|
447
|
+
constructor(functionTypeToken: Token, nameToken: Identifier, leftParen: Token, params: FunctionParameterExpression[], rightParen: Token, asToken?: Token, returnTypeExpression?: TypeExpression, optionalToken?: Token);
|
|
439
448
|
readonly kind = AstNodeKind.InterfaceMethodStatement;
|
|
440
449
|
get range(): Range;
|
|
450
|
+
/**
|
|
451
|
+
* Get the name of this method.
|
|
452
|
+
*/
|
|
453
|
+
getName(parseMode: ParseMode): string;
|
|
441
454
|
tokens: {
|
|
455
|
+
optional?: Token;
|
|
442
456
|
functionType: Token;
|
|
443
457
|
name: Identifier;
|
|
444
458
|
leftParen: Token;
|
|
445
459
|
rightParen: Token;
|
|
446
460
|
as: Token;
|
|
447
461
|
};
|
|
462
|
+
get isOptional(): boolean;
|
|
463
|
+
getLeadingTrivia(): Token[];
|
|
448
464
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
449
465
|
getTypedef(state: BrsTranspileState): TranspileResult;
|
|
450
|
-
getType(options:
|
|
466
|
+
getType(options: GetTypeOptions): TypedFunctionType;
|
|
451
467
|
}
|
|
452
468
|
export declare class ClassStatement extends Statement implements TypedefProvider {
|
|
453
469
|
readonly classKeyword: Token;
|
|
@@ -466,6 +482,7 @@ export declare class ClassStatement extends Statement implements TypedefProvider
|
|
|
466
482
|
name: Identifier, body: Statement[], end: Token, extendsKeyword?: Token, parentClassName?: TypeExpression);
|
|
467
483
|
readonly kind = AstNodeKind.ClassStatement;
|
|
468
484
|
getName(parseMode: ParseMode): string;
|
|
485
|
+
getLeadingTrivia(): Token[];
|
|
469
486
|
memberMap: Record<string, MemberStatement>;
|
|
470
487
|
methods: MethodStatement[];
|
|
471
488
|
fields: FieldStatement[];
|
|
@@ -485,6 +502,7 @@ export declare class ClassStatement extends Statement implements TypedefProvider
|
|
|
485
502
|
*/
|
|
486
503
|
getAncestors(state: BrsTranspileState): ClassStatement[];
|
|
487
504
|
private getBuilderName;
|
|
505
|
+
getConstructorType(): TypedFunctionType;
|
|
488
506
|
/**
|
|
489
507
|
* Get the constructor function for this class (if exists), or undefined if not exist
|
|
490
508
|
*/
|
|
@@ -519,6 +537,7 @@ export declare class MethodStatement extends FunctionStatement {
|
|
|
519
537
|
* Get the name of this method.
|
|
520
538
|
*/
|
|
521
539
|
getName(parseMode: ParseMode): string;
|
|
540
|
+
getLeadingTrivia(): Token[];
|
|
522
541
|
transpile(state: BrsTranspileState): any[];
|
|
523
542
|
getTypedef(state: BrsTranspileState): (string | SourceNode)[];
|
|
524
543
|
/**
|
|
@@ -539,7 +558,8 @@ export declare class FieldStatement extends Statement implements TypedefProvider
|
|
|
539
558
|
readonly typeExpression?: TypeExpression;
|
|
540
559
|
readonly equal?: Token;
|
|
541
560
|
readonly initialValue?: Expression;
|
|
542
|
-
|
|
561
|
+
readonly optional?: Token;
|
|
562
|
+
constructor(accessModifier?: Token, name?: Identifier, as?: Token, typeExpression?: TypeExpression, equal?: Token, initialValue?: Expression, optional?: Token);
|
|
543
563
|
readonly kind = AstNodeKind.FieldStatement;
|
|
544
564
|
/**
|
|
545
565
|
* Derive a ValueKind from the type token, or the initial value.
|
|
@@ -547,6 +567,8 @@ export declare class FieldStatement extends Statement implements TypedefProvider
|
|
|
547
567
|
*/
|
|
548
568
|
getType(options: GetTypeOptions): BscType;
|
|
549
569
|
readonly range: Range;
|
|
570
|
+
getLeadingTrivia(): Token[];
|
|
571
|
+
get isOptional(): boolean;
|
|
550
572
|
transpile(state: BrsTranspileState): TranspileResult;
|
|
551
573
|
getTypedef(state: BrsTranspileState): any[];
|
|
552
574
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
@@ -607,6 +629,7 @@ export declare class EnumStatement extends Statement implements TypedefProvider
|
|
|
607
629
|
symbolTable: SymbolTable;
|
|
608
630
|
get range(): Range;
|
|
609
631
|
getMembers(): EnumMemberStatement[];
|
|
632
|
+
getLeadingTrivia(): Token[];
|
|
610
633
|
/**
|
|
611
634
|
* Get a map of member names and their values.
|
|
612
635
|
* All values are stored as their AST LiteralExpression representation (i.e. string enum values include the wrapping quotes)
|
|
@@ -624,7 +647,7 @@ export declare class EnumStatement extends Statement implements TypedefProvider
|
|
|
624
647
|
transpile(state: BrsTranspileState): any[];
|
|
625
648
|
getTypedef(state: BrsTranspileState): TranspileResult;
|
|
626
649
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
627
|
-
getType(): EnumType;
|
|
650
|
+
getType(options: GetTypeOptions): EnumType;
|
|
628
651
|
}
|
|
629
652
|
export declare class EnumMemberStatement extends Statement implements TypedefProvider {
|
|
630
653
|
tokens: {
|
|
@@ -642,10 +665,11 @@ export declare class EnumMemberStatement extends Statement implements TypedefPro
|
|
|
642
665
|
* The name of the member
|
|
643
666
|
*/
|
|
644
667
|
get name(): string;
|
|
668
|
+
getLeadingTrivia(): Token[];
|
|
645
669
|
transpile(state: BrsTranspileState): TranspileResult;
|
|
646
670
|
getTypedef(state: BrsTranspileState): (string | SourceNode)[];
|
|
647
671
|
walk(visitor: WalkVisitor, options: WalkOptions): void;
|
|
648
|
-
getType(): EnumMemberType;
|
|
672
|
+
getType(options: GetTypeOptions): EnumMemberType;
|
|
649
673
|
}
|
|
650
674
|
export declare class ConstStatement extends Statement implements TypedefProvider {
|
|
651
675
|
tokens: {
|
|
@@ -662,6 +686,7 @@ export declare class ConstStatement extends Statement implements TypedefProvider
|
|
|
662
686
|
readonly kind = AstNodeKind.ConstStatement;
|
|
663
687
|
range: Range;
|
|
664
688
|
get name(): string;
|
|
689
|
+
getLeadingTrivia(): Token[];
|
|
665
690
|
/**
|
|
666
691
|
* The name of the statement WITH its leading namespace (if applicable)
|
|
667
692
|
*/
|