brighterscript 1.0.0-alpha.24 → 1.0.0-alpha.26
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 +521 -233
- package/README.md +45 -139
- package/bsconfig.schema.json +46 -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 +152 -0
- package/dist/AstValidationSegmenter.js.map +1 -0
- package/dist/BsConfig.d.ts +40 -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 +7 -0
- package/dist/CacheVerifier.js +20 -0
- package/dist/CacheVerifier.js.map +1 -0
- package/dist/CodeActionUtil.d.ts +3 -3
- package/dist/CodeActionUtil.js.map +1 -1
- package/dist/CommentFlagProcessor.d.ts +3 -2
- package/dist/CommentFlagProcessor.js +5 -4
- package/dist/CommentFlagProcessor.js.map +1 -1
- package/dist/DependencyGraph.d.ts +3 -2
- package/dist/DependencyGraph.js +11 -10
- package/dist/DependencyGraph.js.map +1 -1
- package/dist/DiagnosticCollection.js +9 -5
- package/dist/DiagnosticCollection.js.map +1 -1
- package/dist/DiagnosticFilterer.d.ts +1 -0
- package/dist/DiagnosticFilterer.js +5 -3
- package/dist/DiagnosticFilterer.js.map +1 -1
- package/dist/DiagnosticMessages.d.ts +61 -13
- package/dist/DiagnosticMessages.js +116 -19
- 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 +23 -11
- package/dist/LanguageServer.js +150 -69
- package/dist/LanguageServer.js.map +1 -1
- package/dist/Logger.d.ts +3 -2
- package/dist/Logger.js +11 -3
- package/dist/Logger.js.map +1 -1
- package/dist/PluginInterface.d.ts +21 -3
- package/dist/PluginInterface.js +74 -6
- package/dist/PluginInterface.js.map +1 -1
- package/dist/Program.d.ts +158 -79
- package/dist/Program.js +841 -706
- package/dist/Program.js.map +1 -1
- package/dist/ProgramBuilder.d.ts +22 -12
- package/dist/ProgramBuilder.js +130 -103
- package/dist/ProgramBuilder.js.map +1 -1
- package/dist/Scope.d.ts +86 -137
- package/dist/Scope.js +453 -519
- package/dist/Scope.js.map +1 -1
- package/dist/Stopwatch.js +1 -1
- package/dist/Stopwatch.js.map +1 -1
- package/dist/SymbolTable.d.ts +89 -34
- package/dist/SymbolTable.js +239 -114
- 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/Watcher.d.ts +0 -3
- package/dist/Watcher.js +0 -3
- package/dist/Watcher.js.map +1 -1
- package/dist/XmlScope.d.ts +4 -11
- package/dist/XmlScope.js +75 -88
- package/dist/XmlScope.js.map +1 -1
- package/dist/astUtils/CachedLookups.d.ts +48 -0
- package/dist/astUtils/CachedLookups.js +323 -0
- package/dist/astUtils/CachedLookups.js.map +1 -0
- package/dist/astUtils/{AstEditor.d.ts → Editor.d.ts} +9 -5
- package/dist/astUtils/{AstEditor.js → Editor.js} +10 -4
- package/dist/astUtils/Editor.js.map +1 -0
- package/dist/astUtils/{AstEditor.spec.js → Editor.spec.js} +69 -65
- package/dist/astUtils/Editor.spec.js.map +1 -0
- package/dist/astUtils/creators.d.ts +10 -10
- package/dist/astUtils/creators.js +54 -24
- 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 +132 -104
- package/dist/astUtils/reflection.js +220 -174
- package/dist/astUtils/reflection.js.map +1 -1
- package/dist/astUtils/reflection.spec.js +256 -157
- package/dist/astUtils/reflection.spec.js.map +1 -1
- package/dist/astUtils/stackedVisitor.spec.js +12 -12
- package/dist/astUtils/stackedVisitor.spec.js.map +1 -1
- package/dist/astUtils/visitors.d.ts +53 -35
- package/dist/astUtils/visitors.js +29 -3
- package/dist/astUtils/visitors.js.map +1 -1
- package/dist/astUtils/visitors.spec.js +208 -52
- package/dist/astUtils/visitors.spec.js.map +1 -1
- package/dist/astUtils/xml.d.ts +9 -9
- package/dist/astUtils/xml.js +9 -9
- package/dist/astUtils/xml.js.map +1 -1
- package/dist/bscPlugin/BscPlugin.d.ts +11 -2
- package/dist/bscPlugin/BscPlugin.js +37 -3
- package/dist/bscPlugin/BscPlugin.js.map +1 -1
- package/dist/bscPlugin/CallExpressionInfo.d.ts +36 -0
- package/dist/bscPlugin/CallExpressionInfo.js +131 -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 +136 -0
- package/dist/bscPlugin/SignatureHelpUtil.js.map +1 -0
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js +16 -13
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.js.map +1 -1
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js +16 -16
- package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js.map +1 -1
- package/dist/bscPlugin/completions/CompletionsProcessor.d.ts +52 -1
- package/dist/bscPlugin/completions/CompletionsProcessor.js +517 -26
- package/dist/bscPlugin/completions/CompletionsProcessor.js.map +1 -1
- package/dist/bscPlugin/completions/CompletionsProcessor.spec.js +1909 -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 +210 -0
- package/dist/bscPlugin/definition/DefinitionProvider.js.map +1 -0
- package/dist/bscPlugin/definition/DefinitionProvider.spec.js +88 -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 +7 -7
- package/dist/bscPlugin/hover/HoverProcessor.js +123 -125
- package/dist/bscPlugin/hover/HoverProcessor.js.map +1 -1
- package/dist/bscPlugin/hover/HoverProcessor.spec.js +371 -53
- package/dist/bscPlugin/hover/HoverProcessor.spec.js.map +1 -1
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.d.ts +2 -1
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js +83 -23
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js.map +1 -1
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js +83 -6
- package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js.map +1 -1
- package/dist/bscPlugin/serialize/BslibInjector.spec.d.ts +1 -0
- 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} +38 -12
- 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 +12 -0
- package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js +99 -0
- package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js.map +1 -0
- package/dist/bscPlugin/validation/BrsFileValidator.d.ts +13 -5
- package/dist/bscPlugin/validation/BrsFileValidator.js +262 -52
- package/dist/bscPlugin/validation/BrsFileValidator.js.map +1 -1
- package/dist/bscPlugin/validation/BrsFileValidator.spec.js +230 -14
- package/dist/bscPlugin/validation/BrsFileValidator.spec.js.map +1 -1
- package/dist/bscPlugin/validation/ProgramValidator.d.ts +10 -0
- package/dist/bscPlugin/validation/ProgramValidator.js +32 -0
- package/dist/bscPlugin/validation/ProgramValidator.js.map +1 -0
- package/dist/bscPlugin/validation/ScopeValidator.d.ts +58 -27
- package/dist/bscPlugin/validation/ScopeValidator.js +514 -286
- 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 +2527 -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 +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 +47 -17
- package/dist/diagnosticUtils.js.map +1 -1
- package/dist/examples/plugins/removePrint.js +8 -10
- 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 +523 -493
- package/dist/files/BrsFile.Class.spec.js.map +1 -1
- package/dist/files/BrsFile.d.ts +111 -117
- package/dist/files/BrsFile.js +684 -1142
- package/dist/files/BrsFile.js.map +1 -1
- package/dist/files/BrsFile.spec.js +1783 -1233
- package/dist/files/BrsFile.spec.js.map +1 -1
- package/dist/files/BscFile.d.ts +104 -0
- package/dist/files/BscFile.js +16 -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 +70 -32
- package/dist/files/XmlFile.js +106 -118
- package/dist/files/XmlFile.js.map +1 -1
- package/dist/files/XmlFile.spec.js +325 -262
- package/dist/files/XmlFile.spec.js.map +1 -1
- package/dist/files/tests/imports.spec.js +48 -40
- package/dist/files/tests/imports.spec.js.map +1 -1
- package/dist/files/tests/optionalChaning.spec.js +84 -24
- package/dist/files/tests/optionalChaning.spec.js.map +1 -1
- package/dist/globalCallables.js +16 -21
- package/dist/globalCallables.js.map +1 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +421 -162
- package/dist/interfaces.js +27 -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 +12 -5
- package/dist/lexer/Lexer.js +28 -13
- package/dist/lexer/Lexer.js.map +1 -1
- package/dist/lexer/Lexer.spec.js +181 -135
- package/dist/lexer/Lexer.spec.js.map +1 -1
- package/dist/lexer/Token.d.ts +9 -1
- package/dist/lexer/Token.js +9 -1
- package/dist/lexer/Token.js.map +1 -1
- package/dist/lexer/TokenKind.d.ts +8 -0
- package/dist/lexer/TokenKind.js +24 -4
- package/dist/lexer/TokenKind.js.map +1 -1
- package/dist/parser/AstNode.d.ts +162 -0
- package/dist/parser/AstNode.js +225 -0
- package/dist/parser/AstNode.js.map +1 -0
- package/dist/parser/AstNode.spec.d.ts +1 -0
- package/dist/parser/AstNode.spec.js +165 -0
- package/dist/parser/AstNode.spec.js.map +1 -0
- package/dist/parser/BrsTranspileState.d.ts +4 -7
- package/dist/parser/BrsTranspileState.js +4 -12
- package/dist/parser/BrsTranspileState.js.map +1 -1
- package/dist/parser/Expression.d.ts +376 -283
- package/dist/parser/Expression.js +742 -585
- package/dist/parser/Expression.js.map +1 -1
- package/dist/parser/Parser.Class.spec.js +151 -145
- package/dist/parser/Parser.Class.spec.js.map +1 -1
- package/dist/parser/Parser.d.ts +48 -201
- package/dist/parser/Parser.js +705 -1026
- package/dist/parser/Parser.js.map +1 -1
- package/dist/parser/Parser.spec.d.ts +3 -1
- package/dist/parser/Parser.spec.js +861 -848
- package/dist/parser/Parser.spec.js.map +1 -1
- package/dist/parser/SGParser.d.ts +9 -8
- package/dist/parser/SGParser.js +10 -8
- package/dist/parser/SGParser.js.map +1 -1
- package/dist/parser/SGParser.spec.js +27 -38
- package/dist/parser/SGParser.spec.js.map +1 -1
- package/dist/parser/SGTypes.d.ts +98 -35
- package/dist/parser/SGTypes.js +169 -99
- package/dist/parser/SGTypes.js.map +1 -1
- package/dist/parser/Statement.d.ts +468 -272
- package/dist/parser/Statement.js +904 -631
- package/dist/parser/Statement.js.map +1 -1
- package/dist/parser/Statement.spec.js +47 -23
- package/dist/parser/Statement.spec.js.map +1 -1
- package/dist/parser/TranspileState.d.ts +1 -1
- package/dist/parser/TranspileState.js +7 -12
- package/dist/parser/TranspileState.js.map +1 -1
- package/dist/parser/tests/Parser.spec.js +3 -2
- package/dist/parser/tests/Parser.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/For.spec.js +33 -23
- package/dist/parser/tests/controlFlow/For.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/ForEach.spec.js +25 -20
- package/dist/parser/tests/controlFlow/ForEach.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/If.spec.js +96 -94
- package/dist/parser/tests/controlFlow/If.spec.js.map +1 -1
- package/dist/parser/tests/controlFlow/While.spec.js +22 -16
- package/dist/parser/tests/controlFlow/While.spec.js.map +1 -1
- package/dist/parser/tests/expression/Additive.spec.js +8 -8
- package/dist/parser/tests/expression/Additive.spec.js.map +1 -1
- package/dist/parser/tests/expression/ArrayLiterals.spec.js +58 -21
- package/dist/parser/tests/expression/ArrayLiterals.spec.js.map +1 -1
- package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js +62 -21
- package/dist/parser/tests/expression/AssociativeArrayLiterals.spec.js.map +1 -1
- package/dist/parser/tests/expression/Boolean.spec.js +8 -8
- package/dist/parser/tests/expression/Boolean.spec.js.map +1 -1
- package/dist/parser/tests/expression/Call.spec.js +129 -21
- package/dist/parser/tests/expression/Call.spec.js.map +1 -1
- package/dist/parser/tests/expression/Exponential.spec.js +5 -5
- package/dist/parser/tests/expression/Exponential.spec.js.map +1 -1
- package/dist/parser/tests/expression/Function.spec.js +36 -36
- package/dist/parser/tests/expression/Function.spec.js.map +1 -1
- package/dist/parser/tests/expression/Indexing.spec.js +92 -22
- package/dist/parser/tests/expression/Indexing.spec.js.map +1 -1
- package/dist/parser/tests/expression/Multiplicative.spec.js +9 -9
- package/dist/parser/tests/expression/Multiplicative.spec.js.map +1 -1
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js +59 -59
- package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/PrefixUnary.spec.js +12 -12
- package/dist/parser/tests/expression/PrefixUnary.spec.js.map +1 -1
- package/dist/parser/tests/expression/Primary.spec.js +12 -12
- package/dist/parser/tests/expression/Primary.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/Relational.spec.js +13 -13
- package/dist/parser/tests/expression/Relational.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 +96 -57
- package/dist/parser/tests/expression/TemplateStringExpression.spec.js.map +1 -1
- package/dist/parser/tests/expression/TernaryExpression.spec.js +89 -89
- 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 +127 -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 +15 -15
- package/dist/parser/tests/statement/AssignmentOperators.spec.js.map +1 -1
- package/dist/parser/tests/statement/ConstStatement.spec.js +82 -33
- package/dist/parser/tests/statement/ConstStatement.spec.js.map +1 -1
- 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 +19 -19
- 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.js +98 -302
- package/dist/parser/tests/statement/Enum.spec.js.map +1 -1
- package/dist/parser/tests/statement/For.spec.js +9 -10
- package/dist/parser/tests/statement/For.spec.js.map +1 -1
- package/dist/parser/tests/statement/ForEach.spec.js +8 -9
- package/dist/parser/tests/statement/ForEach.spec.js.map +1 -1
- package/dist/parser/tests/statement/Function.spec.js +44 -35
- package/dist/parser/tests/statement/Function.spec.js.map +1 -1
- package/dist/parser/tests/statement/Goto.spec.js +5 -5
- package/dist/parser/tests/statement/Goto.spec.js.map +1 -1
- package/dist/parser/tests/statement/Increment.spec.js +20 -20
- package/dist/parser/tests/statement/Increment.spec.js.map +1 -1
- package/dist/parser/tests/statement/InterfaceStatement.spec.js +30 -196
- package/dist/parser/tests/statement/InterfaceStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/LibraryStatement.spec.js +11 -11
- package/dist/parser/tests/statement/LibraryStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/Misc.spec.js +16 -78
- package/dist/parser/tests/statement/Misc.spec.js.map +1 -1
- package/dist/parser/tests/statement/PrintStatement.spec.js +36 -34
- package/dist/parser/tests/statement/PrintStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/ReturnStatement.spec.js +14 -12
- package/dist/parser/tests/statement/ReturnStatement.spec.js.map +1 -1
- package/dist/parser/tests/statement/Set.spec.js +48 -35
- package/dist/parser/tests/statement/Set.spec.js.map +1 -1
- package/dist/parser/tests/statement/Stop.spec.js +6 -6
- package/dist/parser/tests/statement/Stop.spec.js.map +1 -1
- package/dist/parser/tests/statement/Throw.spec.js +6 -6
- package/dist/parser/tests/statement/Throw.spec.js.map +1 -1
- package/dist/parser/tests/statement/TryCatch.spec.js +18 -16
- package/dist/parser/tests/statement/TryCatch.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/preprocessor/Manifest.spec.js +8 -8
- package/dist/preprocessor/Manifest.spec.js.map +1 -1
- package/dist/preprocessor/Preprocessor.d.ts +5 -6
- package/dist/preprocessor/Preprocessor.js +5 -5
- package/dist/preprocessor/Preprocessor.js.map +1 -1
- package/dist/preprocessor/Preprocessor.spec.js +25 -25
- package/dist/preprocessor/Preprocessor.spec.js.map +1 -1
- package/dist/preprocessor/PreprocessorParser.d.ts +1 -1
- package/dist/preprocessor/PreprocessorParser.js +7 -1
- package/dist/preprocessor/PreprocessorParser.js.map +1 -1
- package/dist/preprocessor/PreprocessorParser.spec.js +13 -13
- package/dist/preprocessor/PreprocessorParser.spec.js.map +1 -1
- package/dist/roku-types/data.json +5892 -10081
- package/dist/roku-types/index.d.ts +622 -1719
- package/dist/types/ArrayType.d.ts +10 -9
- package/dist/types/ArrayType.js +65 -60
- package/dist/types/ArrayType.js.map +1 -1
- package/dist/types/ArrayType.spec.js +36 -68
- 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 +8 -5
- package/dist/types/BooleanType.js +14 -7
- package/dist/types/BooleanType.js.map +1 -1
- package/dist/types/BooleanType.spec.js +10 -6
- package/dist/types/BooleanType.spec.js.map +1 -1
- package/dist/types/BscType.d.ts +32 -21
- package/dist/types/BscType.js +118 -21
- 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 +23 -0
- package/dist/types/BuiltInInterfaceAdder.js +171 -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 +17 -0
- package/dist/types/ClassType.js +58 -0
- package/dist/types/ClassType.js.map +1 -0
- package/dist/types/ClassType.spec.d.ts +1 -0
- package/dist/types/ClassType.spec.js +77 -0
- package/dist/types/ClassType.spec.js.map +1 -0
- 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 +8 -5
- package/dist/types/DoubleType.js +18 -16
- package/dist/types/DoubleType.js.map +1 -1
- package/dist/types/DoubleType.spec.js +12 -6
- package/dist/types/DoubleType.spec.js.map +1 -1
- package/dist/types/DynamicType.d.ts +9 -5
- package/dist/types/DynamicType.js +15 -4
- 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 +30 -12
- package/dist/types/EnumType.js +43 -17
- package/dist/types/EnumType.js.map +1 -1
- 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 +8 -5
- package/dist/types/FloatType.js +18 -16
- package/dist/types/FloatType.js.map +1 -1
- package/dist/types/FloatType.spec.js +4 -6
- package/dist/types/FloatType.spec.js.map +1 -1
- package/dist/types/FunctionType.d.ts +13 -8
- package/dist/types/FunctionType.js +30 -14
- package/dist/types/FunctionType.js.map +1 -1
- package/dist/types/InheritableType.d.ts +28 -0
- package/dist/types/InheritableType.js +152 -0
- package/dist/types/InheritableType.js.map +1 -0
- package/dist/types/IntegerType.d.ts +8 -5
- package/dist/types/IntegerType.js +18 -16
- package/dist/types/IntegerType.js.map +1 -1
- package/dist/types/IntegerType.spec.js +8 -6
- package/dist/types/IntegerType.spec.js.map +1 -1
- package/dist/types/InterfaceType.d.ts +12 -13
- package/dist/types/InterfaceType.js +20 -48
- package/dist/types/InterfaceType.js.map +1 -1
- package/dist/types/InterfaceType.spec.js +90 -56
- package/dist/types/InterfaceType.spec.js.map +1 -1
- package/dist/types/InvalidType.d.ts +7 -5
- package/dist/types/InvalidType.js +13 -7
- package/dist/types/InvalidType.js.map +1 -1
- package/dist/types/InvalidType.spec.js +8 -6
- package/dist/types/InvalidType.spec.js.map +1 -1
- package/dist/types/LongIntegerType.d.ts +8 -5
- package/dist/types/LongIntegerType.js +17 -15
- package/dist/types/LongIntegerType.js.map +1 -1
- package/dist/types/LongIntegerType.spec.js +10 -6
- 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 +9 -8
- package/dist/types/ObjectType.js +21 -11
- 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 +63 -0
- package/dist/types/ReferenceType.js +423 -0
- package/dist/types/ReferenceType.js.map +1 -0
- package/dist/types/ReferenceType.spec.d.ts +1 -0
- package/dist/types/ReferenceType.spec.js +137 -0
- package/dist/types/ReferenceType.spec.js.map +1 -0
- package/dist/types/StringType.d.ts +11 -5
- package/dist/types/StringType.js +18 -7
- package/dist/types/StringType.js.map +1 -1
- package/dist/types/StringType.spec.js +3 -5
- package/dist/types/StringType.spec.js.map +1 -1
- package/dist/types/TypedFunctionType.d.ts +22 -17
- package/dist/types/TypedFunctionType.js +78 -60
- package/dist/types/TypedFunctionType.js.map +1 -1
- package/dist/types/TypedFunctionType.spec.js +105 -20
- package/dist/types/TypedFunctionType.spec.js.map +1 -1
- package/dist/types/UninitializedType.d.ts +8 -6
- package/dist/types/UninitializedType.js +13 -7
- package/dist/types/UninitializedType.js.map +1 -1
- package/dist/types/UnionType.d.ts +20 -0
- package/dist/types/UnionType.js +123 -0
- package/dist/types/UnionType.js.map +1 -0
- package/dist/types/UnionType.spec.d.ts +1 -0
- package/dist/types/UnionType.spec.js +130 -0
- package/dist/types/UnionType.spec.js.map +1 -0
- package/dist/types/VoidType.d.ts +8 -5
- package/dist/types/VoidType.js +14 -7
- 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 +145 -0
- package/dist/types/helper.spec.js.map +1 -0
- package/dist/types/helpers.d.ts +19 -37
- package/dist/types/helpers.js +159 -99
- package/dist/types/helpers.js.map +1 -1
- 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 +143 -139
- package/dist/util.js +864 -385
- package/dist/util.js.map +1 -1
- package/dist/validators/ClassValidator.d.ts +8 -25
- package/dist/validators/ClassValidator.js +99 -179
- package/dist/validators/ClassValidator.js.map +1 -1
- package/package.json +165 -152
- 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 -32
- package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.spec.js.map +0 -1
- package/dist/parser/SGTypes.spec.js +0 -351
- package/dist/parser/SGTypes.spec.js.map +0 -1
- package/dist/types/CustomType.d.ts +0 -12
- package/dist/types/CustomType.js +0 -44
- package/dist/types/CustomType.js.map +0 -1
- package/dist/types/LazyType.d.ts +0 -16
- package/dist/types/LazyType.js +0 -44
- package/dist/types/LazyType.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/{parser/SGTypes.spec.d.ts → bscPlugin/definition/DefinitionProvider.spec.d.ts} +0 -0
package/dist/interfaces.d.ts
CHANGED
|
@@ -1,20 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { Range, Diagnostic, CodeAction, SemanticTokenTypes, SemanticTokenModifiers, Position, CompletionItem, Location } from 'vscode-languageserver';
|
|
2
3
|
import type { Scope } from './Scope';
|
|
3
4
|
import type { BrsFile } from './files/BrsFile';
|
|
4
5
|
import type { XmlFile } from './files/XmlFile';
|
|
6
|
+
import type { FunctionScope } from './FunctionScope';
|
|
5
7
|
import type { TypedFunctionType } from './types/TypedFunctionType';
|
|
6
8
|
import type { ParseMode } from './parser/Parser';
|
|
7
9
|
import type { Program } from './Program';
|
|
8
10
|
import type { ProgramBuilder } from './ProgramBuilder';
|
|
9
|
-
import type { ClassStatement, EnumStatement, FunctionStatement,
|
|
10
|
-
import type { Expression,
|
|
11
|
+
import type { ClassStatement, ConstStatement, EnumStatement, FunctionStatement, NamespaceStatement } from './parser/Statement';
|
|
12
|
+
import type { AstNode, Expression, Statement } from './parser/AstNode';
|
|
11
13
|
import type { TranspileState } from './parser/TranspileState';
|
|
12
|
-
import type {
|
|
13
|
-
import type { BscType
|
|
14
|
-
import type {
|
|
15
|
-
import type {
|
|
16
|
-
import type {
|
|
17
|
-
import type {
|
|
14
|
+
import type { SourceNode } from 'source-map';
|
|
15
|
+
import type { BscType } from './types/BscType';
|
|
16
|
+
import type { Editor } from './astUtils/Editor';
|
|
17
|
+
import type { Identifier, Token } from './lexer/Token';
|
|
18
|
+
import type { BscFile } from './files/BscFile';
|
|
19
|
+
import type { FileFactory } from './files/Factory';
|
|
20
|
+
import type { LazyFileData } from './files/LazyFileData';
|
|
21
|
+
import type { SymbolTable, SymbolTypeFlag } from './SymbolTable';
|
|
22
|
+
import type { CallExpression } from './parser/Expression';
|
|
18
23
|
export interface BsDiagnostic extends Diagnostic {
|
|
19
24
|
file: BscFile;
|
|
20
25
|
/**
|
|
@@ -22,7 +27,16 @@ export interface BsDiagnostic extends Diagnostic {
|
|
|
22
27
|
*/
|
|
23
28
|
data?: any;
|
|
24
29
|
}
|
|
25
|
-
export declare
|
|
30
|
+
export declare enum DiagnosticOrigin {
|
|
31
|
+
Program = "Program",
|
|
32
|
+
Scope = "Scope",
|
|
33
|
+
File = "File",
|
|
34
|
+
ASTSegment = "AstSegment"
|
|
35
|
+
}
|
|
36
|
+
export interface BsDiagnosticWithOrigin extends BsDiagnostic {
|
|
37
|
+
origin: DiagnosticOrigin;
|
|
38
|
+
astSegment?: AstNode;
|
|
39
|
+
}
|
|
26
40
|
export interface Callable {
|
|
27
41
|
file: BscFile;
|
|
28
42
|
name: string;
|
|
@@ -64,12 +78,12 @@ export interface FunctionCall {
|
|
|
64
78
|
* The full range of this function call (from the start of the function name to its closing paren)
|
|
65
79
|
*/
|
|
66
80
|
range: Range;
|
|
67
|
-
|
|
81
|
+
expression: CallExpression;
|
|
82
|
+
functionScope: FunctionScope;
|
|
68
83
|
file: BscFile;
|
|
69
|
-
name:
|
|
84
|
+
name: string;
|
|
70
85
|
args: CallableArg[];
|
|
71
86
|
nameRange: Range;
|
|
72
|
-
isDottedInvocation: boolean;
|
|
73
87
|
}
|
|
74
88
|
/**
|
|
75
89
|
* An argument for an expression call.
|
|
@@ -102,12 +116,12 @@ export interface FileObj {
|
|
|
102
116
|
*/
|
|
103
117
|
export interface FileReference {
|
|
104
118
|
/**
|
|
105
|
-
* The
|
|
119
|
+
* The destPath for the referenced file.
|
|
106
120
|
*/
|
|
107
|
-
|
|
121
|
+
destPath: string;
|
|
108
122
|
text: string;
|
|
109
123
|
/**
|
|
110
|
-
* The file that is doing the import. Note this is NOT the file the
|
|
124
|
+
* The file that is doing the import. Note this is NOT the file the destPath points to.
|
|
111
125
|
*/
|
|
112
126
|
sourceFile: XmlFile | BrsFile;
|
|
113
127
|
/**
|
|
@@ -120,7 +134,7 @@ export interface FileReference {
|
|
|
120
134
|
}
|
|
121
135
|
export interface VariableDeclaration {
|
|
122
136
|
name: string;
|
|
123
|
-
|
|
137
|
+
getType: () => BscType;
|
|
124
138
|
/**
|
|
125
139
|
* The range for the variable name
|
|
126
140
|
*/
|
|
@@ -165,17 +179,42 @@ export interface CommentFlag {
|
|
|
165
179
|
export declare type CompilerPluginFactory = () => CompilerPlugin;
|
|
166
180
|
export interface CompilerPlugin {
|
|
167
181
|
name: string;
|
|
182
|
+
/**
|
|
183
|
+
* Called before a new program is created
|
|
184
|
+
*/
|
|
168
185
|
beforeProgramCreate?: PluginHandler<BeforeProgramCreateEvent>;
|
|
186
|
+
/**
|
|
187
|
+
* Called after a new program is created
|
|
188
|
+
*/
|
|
169
189
|
afterProgramCreate?: PluginHandler<AfterProgramCreateEvent>;
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
190
|
+
/**
|
|
191
|
+
* Called before the program gets prepared for building
|
|
192
|
+
*/
|
|
193
|
+
beforePrepareProgram?: PluginHandler<BeforePrepareProgramEvent>;
|
|
194
|
+
/**
|
|
195
|
+
* Called when the program gets prepared for building
|
|
196
|
+
*/
|
|
197
|
+
prepareProgram?: PluginHandler<PrepareProgramEvent>;
|
|
198
|
+
/**
|
|
199
|
+
* Called after the program gets prepared for building
|
|
200
|
+
*/
|
|
201
|
+
afterPrepareProgram?: PluginHandler<AfterPrepareProgramEvent>;
|
|
202
|
+
/**
|
|
203
|
+
* Called before the entire program is validated
|
|
204
|
+
*/
|
|
174
205
|
beforeProgramValidate?: PluginHandler<BeforeProgramValidateEvent>;
|
|
206
|
+
/**
|
|
207
|
+
* Called before the entire program is validated
|
|
208
|
+
*/
|
|
209
|
+
onProgramValidate?: PluginHandler<OnProgramValidateEvent>;
|
|
210
|
+
/**
|
|
211
|
+
* Called after the program has been validated
|
|
212
|
+
*/
|
|
175
213
|
afterProgramValidate?: PluginHandler<AfterProgramValidateEvent>;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
214
|
+
/**
|
|
215
|
+
* Called right before the program is disposed/destroyed
|
|
216
|
+
*/
|
|
217
|
+
beforeProgramDispose?: PluginHandler<BeforeProgramDisposeEvent>;
|
|
179
218
|
/**
|
|
180
219
|
* Emitted before the program starts collecting completions
|
|
181
220
|
*/
|
|
@@ -200,15 +239,63 @@ export interface CompilerPlugin {
|
|
|
200
239
|
* Called after the `provideHover` hook. Use this if you want to intercept or sanitize the hover data (even from other plugins) before it gets sent to the client.
|
|
201
240
|
*/
|
|
202
241
|
afterProvideHover?: PluginHandler<AfterProvideHoverEvent>;
|
|
203
|
-
|
|
242
|
+
/**
|
|
243
|
+
* Called after a scope was created
|
|
244
|
+
*/
|
|
204
245
|
afterScopeCreate?: PluginHandler<AfterScopeCreateEvent>;
|
|
205
246
|
beforeScopeDispose?: PluginHandler<BeforeScopeDisposeEvent>;
|
|
247
|
+
onScopeDispose?: PluginHandler<OnScopeDisposeEvent>;
|
|
206
248
|
afterScopeDispose?: PluginHandler<AfterScopeDisposeEvent>;
|
|
207
249
|
beforeScopeValidate?: PluginHandler<BeforeScopeValidateEvent>;
|
|
250
|
+
/**
|
|
251
|
+
* Called before the `provideDefinition` hook
|
|
252
|
+
*/
|
|
253
|
+
beforeProvideDefinition?(event: BeforeProvideDefinitionEvent): any;
|
|
254
|
+
/**
|
|
255
|
+
* Provide one or more `Location`s where the symbol at the given position was originally defined
|
|
256
|
+
* @param event
|
|
257
|
+
*/
|
|
258
|
+
provideDefinition?(event: ProvideDefinitionEvent): any;
|
|
259
|
+
/**
|
|
260
|
+
* Called after `provideDefinition`. Use this if you want to intercept or sanitize the definition data provided by bsc or other plugins
|
|
261
|
+
* @param event
|
|
262
|
+
*/
|
|
263
|
+
afterProvideDefinition?(event: AfterProvideDefinitionEvent): any;
|
|
208
264
|
onScopeValidate?: PluginHandler<OnScopeValidateEvent>;
|
|
209
|
-
afterScopeValidate?: PluginHandler<
|
|
210
|
-
|
|
211
|
-
|
|
265
|
+
afterScopeValidate?: PluginHandler<BeforeScopeValidateEvent>;
|
|
266
|
+
onGetCodeActions?: PluginHandler<OnGetCodeActionsEvent>;
|
|
267
|
+
onGetSemanticTokens?: PluginHandler<OnGetSemanticTokensEvent>;
|
|
268
|
+
/**
|
|
269
|
+
* Called before plugins are asked to provide files to the program. (excludes virtual files produced by `provideFile` events).
|
|
270
|
+
* Call the `setFileData()` method to override the file contents.
|
|
271
|
+
*/
|
|
272
|
+
beforeProvideFile?: PluginHandler<BeforeProvideFileEvent>;
|
|
273
|
+
/**
|
|
274
|
+
* Give plugins the opportunity to handle processing a file. (excludes virtual files produced by `provideFile` events)
|
|
275
|
+
*/
|
|
276
|
+
provideFile?: PluginHandler<ProvideFileEvent>;
|
|
277
|
+
/**
|
|
278
|
+
* Called after a file was added to the program. (excludes virtual files produced by `provideFile` events)
|
|
279
|
+
*/
|
|
280
|
+
afterProvideFile?: PluginHandler<AfterProvideFileEvent>;
|
|
281
|
+
/**
|
|
282
|
+
* Called before a file is added to the program.
|
|
283
|
+
* Includes physical files as well as any virtual files produced by `provideFile` events
|
|
284
|
+
*/
|
|
285
|
+
beforeFileAdd?: PluginHandler<BeforeFileAddEvent>;
|
|
286
|
+
/**
|
|
287
|
+
* Called after a file has been added to the program.
|
|
288
|
+
* Includes physical files as well as any virtual files produced by `provideFile` events
|
|
289
|
+
*/
|
|
290
|
+
afterFileAdd?: PluginHandler<AfterFileAddEvent>;
|
|
291
|
+
/**
|
|
292
|
+
* Called before a file is removed from the program. This includes physical and virtual files
|
|
293
|
+
*/
|
|
294
|
+
beforeFileRemove?: PluginHandler<BeforeFileRemoveEvent>;
|
|
295
|
+
/**
|
|
296
|
+
* Called after a file has been removed from the program. This includes physical and virtual files
|
|
297
|
+
*/
|
|
298
|
+
afterFileRemove?: PluginHandler<AfterFileRemoveEvent>;
|
|
212
299
|
/**
|
|
213
300
|
* Called before each file is validated
|
|
214
301
|
*/
|
|
@@ -221,34 +308,83 @@ export interface CompilerPlugin {
|
|
|
221
308
|
* Called after each file is validated
|
|
222
309
|
*/
|
|
223
310
|
afterFileValidate?: PluginHandler<AfterFileValidateEvent>;
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
311
|
+
/**
|
|
312
|
+
* Called right before the program builds (i.e. generates the code and puts it in the stagingDir
|
|
313
|
+
*/
|
|
314
|
+
beforeBuildProgram?: PluginHandler<BeforeBuildProgramEvent>;
|
|
315
|
+
/**
|
|
316
|
+
* Called right after the program builds (i.e. generates the code and puts it in the stagingDir
|
|
317
|
+
*/
|
|
318
|
+
afterBuildProgram?: PluginHandler<AfterBuildProgramEvent>;
|
|
319
|
+
/**
|
|
320
|
+
* Before preparing the file for building
|
|
321
|
+
*/
|
|
322
|
+
beforePrepareFile?: PluginHandler<BeforePrepareFileEvent>;
|
|
323
|
+
/**
|
|
324
|
+
* Prepare the file for building
|
|
325
|
+
*/
|
|
326
|
+
prepareFile?: PluginHandler<PrepareFileEvent>;
|
|
327
|
+
/**
|
|
328
|
+
* After preparing the file for building
|
|
329
|
+
*/
|
|
330
|
+
afterPrepareFile?: PluginHandler<AfterPrepareFileEvent>;
|
|
331
|
+
/**
|
|
332
|
+
* Before the program turns all file objects into their final buffers
|
|
333
|
+
*/
|
|
334
|
+
beforeSerializeProgram?: PluginHandler<BeforeSerializeProgramEvent>;
|
|
335
|
+
/**
|
|
336
|
+
* Emitted right at the start of the program turning all file objects into their final buffers
|
|
337
|
+
*/
|
|
338
|
+
onSerializeProgram?: PluginHandler<OnSerializeProgramEvent>;
|
|
339
|
+
/**
|
|
340
|
+
* After the program turns all file objects into their final buffers
|
|
341
|
+
*/
|
|
342
|
+
afterSerializeProgram?: PluginHandler<AfterSerializeProgramEvent>;
|
|
343
|
+
/**
|
|
344
|
+
* Before turning the file into its final contents
|
|
345
|
+
*/
|
|
346
|
+
beforeSerializeFile?: PluginHandler<BeforeSerializeFileEvent>;
|
|
347
|
+
/**
|
|
348
|
+
* Turn the file into its final contents (i.e. transpile a bs file, compress a jpeg, etc)
|
|
349
|
+
*/
|
|
350
|
+
serializeFile?: PluginHandler<SerializeFileEvent>;
|
|
351
|
+
/**
|
|
352
|
+
* After turning the file into its final contents
|
|
353
|
+
*/
|
|
354
|
+
afterSerializeFile?: PluginHandler<AfterSerializeFileEvent>;
|
|
355
|
+
/**
|
|
356
|
+
* Called before any files are written
|
|
357
|
+
*/
|
|
358
|
+
beforeWriteProgram?: PluginHandler<BeforeWriteProgramEvent>;
|
|
359
|
+
/**
|
|
360
|
+
* Called after all files are written
|
|
361
|
+
*/
|
|
362
|
+
afterWriteProgram?: PluginHandler<AfterWriteProgramEvent>;
|
|
363
|
+
/**
|
|
364
|
+
* Before a file is written to disk. These are raw files that contain the final output. One `File` may produce several of these
|
|
365
|
+
*/
|
|
366
|
+
beforeWriteFile?: PluginHandler<BeforeWriteFileEvent>;
|
|
367
|
+
/**
|
|
368
|
+
* Called when a file should be persisted (usually writing to storage). These are raw files that contain the final output. One `File` may produce several of these.
|
|
369
|
+
* When a plugin has handled a file, it should be pushed to the `handledFiles` set so future plugins don't write the file multiple times
|
|
370
|
+
*/
|
|
371
|
+
writeFile?: PluginHandler<WriteFileEvent>;
|
|
372
|
+
/**
|
|
373
|
+
* Before a file is written to disk. These are raw files that contain the final output. One `File` may produce several of these
|
|
374
|
+
*/
|
|
375
|
+
afterWriteFile?: PluginHandler<AfterWriteFileEvent>;
|
|
228
376
|
}
|
|
229
377
|
export declare type PluginHandler<T, R = void> = (event: T) => R;
|
|
230
|
-
export interface
|
|
231
|
-
builder: ProgramBuilder;
|
|
232
|
-
}
|
|
233
|
-
export interface BeforePrepublishEvent {
|
|
234
|
-
builder: ProgramBuilder;
|
|
235
|
-
program: Program;
|
|
236
|
-
files: FileObj[];
|
|
237
|
-
}
|
|
238
|
-
export interface AfterPrepublishEvent {
|
|
239
|
-
builder: ProgramBuilder;
|
|
240
|
-
program: Program;
|
|
241
|
-
files: FileObj[];
|
|
242
|
-
}
|
|
243
|
-
export interface BeforePublishEvent {
|
|
244
|
-
builder: ProgramBuilder;
|
|
378
|
+
export interface OnGetCodeActionsEvent<TFile extends BscFile = BscFile> {
|
|
245
379
|
program: Program;
|
|
246
|
-
|
|
380
|
+
file: TFile;
|
|
381
|
+
range: Range;
|
|
382
|
+
scopes: Scope[];
|
|
383
|
+
diagnostics: BsDiagnostic[];
|
|
384
|
+
codeActions: CodeAction[];
|
|
247
385
|
}
|
|
248
|
-
export interface
|
|
386
|
+
export interface BeforeProgramCreateEvent {
|
|
249
387
|
builder: ProgramBuilder;
|
|
250
|
-
program: Program;
|
|
251
|
-
files: FileObj[];
|
|
252
388
|
}
|
|
253
389
|
export interface AfterProgramCreateEvent {
|
|
254
390
|
builder: ProgramBuilder;
|
|
@@ -257,27 +393,8 @@ export interface AfterProgramCreateEvent {
|
|
|
257
393
|
export interface BeforeProgramValidateEvent {
|
|
258
394
|
program: Program;
|
|
259
395
|
}
|
|
260
|
-
export
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
export interface BeforeProgramTranspileEvent {
|
|
264
|
-
program: Program;
|
|
265
|
-
entries: TranspileEntry[];
|
|
266
|
-
editor: AstEditor;
|
|
267
|
-
}
|
|
268
|
-
export interface AfterProgramTranspileEvent {
|
|
269
|
-
program: Program;
|
|
270
|
-
entries: TranspileEntry[];
|
|
271
|
-
editor: AstEditor;
|
|
272
|
-
}
|
|
273
|
-
export interface OnGetCodeActionsEvent {
|
|
274
|
-
program: Program;
|
|
275
|
-
file: BscFile;
|
|
276
|
-
range: Range;
|
|
277
|
-
scopes: Scope[];
|
|
278
|
-
diagnostics: BsDiagnostic[];
|
|
279
|
-
codeActions: CodeAction[];
|
|
280
|
-
}
|
|
396
|
+
export declare type OnProgramValidateEvent = BeforeProgramValidateEvent;
|
|
397
|
+
export declare type AfterProgramValidateEvent = BeforeProgramValidateEvent;
|
|
281
398
|
export interface ProvideCompletionsEvent<TFile extends BscFile = BscFile> {
|
|
282
399
|
program: Program;
|
|
283
400
|
file: TFile;
|
|
@@ -287,6 +404,12 @@ export interface ProvideCompletionsEvent<TFile extends BscFile = BscFile> {
|
|
|
287
404
|
}
|
|
288
405
|
export declare type BeforeProvideCompletionsEvent<TFile extends BscFile = BscFile> = ProvideCompletionsEvent<TFile>;
|
|
289
406
|
export declare type AfterProvideCompletionsEvent<TFile extends BscFile = BscFile> = ProvideCompletionsEvent<TFile>;
|
|
407
|
+
export interface BeforeBuildProgramEvent {
|
|
408
|
+
program: Program;
|
|
409
|
+
files: BscFile[];
|
|
410
|
+
editor: Editor;
|
|
411
|
+
}
|
|
412
|
+
export declare type AfterBuildProgramEvent = BeforeBuildProgramEvent;
|
|
290
413
|
export interface ProvideHoverEvent {
|
|
291
414
|
program: Program;
|
|
292
415
|
file: BscFile;
|
|
@@ -319,30 +442,25 @@ export interface BeforeScopeDisposeEvent {
|
|
|
319
442
|
program: Program;
|
|
320
443
|
scope: Scope;
|
|
321
444
|
}
|
|
322
|
-
export interface
|
|
445
|
+
export interface OnScopeDisposeEvent {
|
|
323
446
|
program: Program;
|
|
324
447
|
scope: Scope;
|
|
325
448
|
}
|
|
326
|
-
export interface
|
|
449
|
+
export interface AfterScopeDisposeEvent {
|
|
327
450
|
program: Program;
|
|
328
451
|
scope: Scope;
|
|
329
452
|
}
|
|
330
|
-
export interface
|
|
453
|
+
export interface BeforeScopeValidateEvent {
|
|
331
454
|
program: Program;
|
|
332
455
|
scope: Scope;
|
|
333
456
|
}
|
|
334
|
-
export
|
|
457
|
+
export declare type AfterScopeValidateEvent = BeforeScopeValidateEvent;
|
|
458
|
+
export interface BeforeFileParseEvent {
|
|
335
459
|
program: Program;
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
range: Range;
|
|
339
|
-
/**
|
|
340
|
-
* A filtered list of diagnostics whose lines touch the lines of the given range
|
|
341
|
-
*/
|
|
342
|
-
diagnostics: BsDiagnostic[];
|
|
343
|
-
codeActions: CodeAction[];
|
|
460
|
+
srcPath: string;
|
|
461
|
+
source: string;
|
|
344
462
|
}
|
|
345
|
-
export interface
|
|
463
|
+
export interface OnFileParseEvent {
|
|
346
464
|
program: Program;
|
|
347
465
|
srcPath: string;
|
|
348
466
|
source: string;
|
|
@@ -351,6 +469,23 @@ export interface AfterFileParseEvent {
|
|
|
351
469
|
program: Program;
|
|
352
470
|
file: BscFile;
|
|
353
471
|
}
|
|
472
|
+
export interface ProvideDefinitionEvent<TFile = BscFile> {
|
|
473
|
+
program: Program;
|
|
474
|
+
/**
|
|
475
|
+
* The file that the getDefinition request was invoked in
|
|
476
|
+
*/
|
|
477
|
+
file: TFile;
|
|
478
|
+
/**
|
|
479
|
+
* The position in the text document where the getDefinition request was invoked
|
|
480
|
+
*/
|
|
481
|
+
position: Position;
|
|
482
|
+
/**
|
|
483
|
+
* The list of locations for where the item at the file and position was defined
|
|
484
|
+
*/
|
|
485
|
+
definitions: Location[];
|
|
486
|
+
}
|
|
487
|
+
export declare type BeforeProvideDefinitionEvent<TFile = BscFile> = ProvideDefinitionEvent<TFile>;
|
|
488
|
+
export declare type AfterProvideDefinitionEvent<TFile = BscFile> = ProvideDefinitionEvent<TFile>;
|
|
354
489
|
export interface OnGetSemanticTokensEvent<T extends BscFile = BscFile> {
|
|
355
490
|
/**
|
|
356
491
|
* The program this file is from
|
|
@@ -369,28 +504,30 @@ export interface OnGetSemanticTokensEvent<T extends BscFile = BscFile> {
|
|
|
369
504
|
*/
|
|
370
505
|
semanticTokens: SemanticToken[];
|
|
371
506
|
}
|
|
372
|
-
export
|
|
507
|
+
export declare type BeforeFileValidateEvent = OnFileValidateEvent;
|
|
508
|
+
export interface OnFileValidateEvent<T extends BscFile = BscFile> {
|
|
373
509
|
program: Program;
|
|
374
510
|
file: T;
|
|
375
511
|
}
|
|
512
|
+
export declare type AfterFileValidateEvent = OnFileValidateEvent;
|
|
376
513
|
export interface OnFileValidateEvent<T extends BscFile = BscFile> {
|
|
377
514
|
program: Program;
|
|
378
515
|
file: T;
|
|
379
516
|
}
|
|
380
|
-
export interface
|
|
381
|
-
|
|
382
|
-
|
|
517
|
+
export interface TranspileEntry {
|
|
518
|
+
file: BscFile;
|
|
519
|
+
outputPath: string;
|
|
383
520
|
}
|
|
384
|
-
export interface
|
|
521
|
+
export interface ScopeValidationOptions {
|
|
522
|
+
changedFiles?: BscFile[];
|
|
523
|
+
changedSymbols?: Map<SymbolTypeFlag, Set<string>>;
|
|
524
|
+
force?: boolean;
|
|
525
|
+
}
|
|
526
|
+
export interface OnScopeValidateEvent {
|
|
385
527
|
program: Program;
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
* An editor that can be used to transform properties or arrays. Once the `afterFileTranspile` event has fired, these changes will be reverted,
|
|
390
|
-
* restoring the objects to their prior state. This is useful for changing code right before a file gets transpiled, but when you don't want
|
|
391
|
-
* the changes to persist in the in-memory file.
|
|
392
|
-
*/
|
|
393
|
-
editor: Editor;
|
|
528
|
+
scope: Scope;
|
|
529
|
+
changedFiles?: BscFile[];
|
|
530
|
+
changedSymbols?: Map<SymbolTypeFlag, Set<string>>;
|
|
394
531
|
}
|
|
395
532
|
export interface AfterFileTranspileEvent<TFile extends BscFile = BscFile> {
|
|
396
533
|
/**
|
|
@@ -406,45 +543,150 @@ export interface AfterFileTranspileEvent<TFile extends BscFile = BscFile> {
|
|
|
406
543
|
/**
|
|
407
544
|
* The sourceMaps for the generated code (if emitting source maps is enabled)
|
|
408
545
|
*/
|
|
409
|
-
map?:
|
|
546
|
+
map?: string;
|
|
410
547
|
/**
|
|
411
548
|
* The generated type definition file contents (if emitting type definitions are enabled)
|
|
412
549
|
*/
|
|
413
550
|
typedef?: string;
|
|
551
|
+
}
|
|
552
|
+
export declare type BeforeProvideFileEvent<TFile extends BscFile = BscFile> = ProvideFileEvent<TFile>;
|
|
553
|
+
export interface ProvideFileEvent<TFile extends BscFile = BscFile> {
|
|
554
|
+
/**
|
|
555
|
+
* The lower-case file extension for the srcPath. (i.e. ".brs", ".xml")
|
|
556
|
+
*/
|
|
557
|
+
srcExtension: string;
|
|
558
|
+
/**
|
|
559
|
+
* The srcPath for the file. (i.e. `/user/bob/projects/VideoApp/source/main.bs`)
|
|
560
|
+
*/
|
|
561
|
+
srcPath: string;
|
|
562
|
+
/**
|
|
563
|
+
* The destPath for the file. (i.e. for `/user/bob/projects/VideoApp/source/main.bs`, destPath would be `source/main.bs`)
|
|
564
|
+
*/
|
|
565
|
+
destPath: string;
|
|
566
|
+
/**
|
|
567
|
+
* A lazy-loading container for this file's data. Call `.get()` to lazy load the data, and `.set()` to override file contents
|
|
568
|
+
*/
|
|
569
|
+
data: LazyFileData;
|
|
570
|
+
/**
|
|
571
|
+
* An array of files that should be added to the program as a result of this event
|
|
572
|
+
*/
|
|
573
|
+
files: TFile[];
|
|
414
574
|
/**
|
|
415
|
-
*
|
|
416
|
-
* restoring the objects to their prior state. This is useful for changing code right before a file gets transpiled, but when you don't want
|
|
417
|
-
* the changes to persist in the in-memory file.
|
|
575
|
+
* The program for this event
|
|
418
576
|
*/
|
|
577
|
+
program: Program;
|
|
578
|
+
/**
|
|
579
|
+
* A factory used to create new instances of the BrighterScript built-in file types. This mitigates the issue
|
|
580
|
+
* of a plugin's version of a File not being the same as the LanguageServer or CLI version of BrighterScript
|
|
581
|
+
* (due to npm installing multiple versions of brighterscript)
|
|
582
|
+
*/
|
|
583
|
+
fileFactory: FileFactory;
|
|
584
|
+
}
|
|
585
|
+
export declare type AfterProvideFileEvent<TFile extends BscFile = BscFile> = ProvideFileEvent<TFile>;
|
|
586
|
+
export interface BeforeFileAddEvent<TFile extends BscFile = BscFile> {
|
|
587
|
+
file: TFile;
|
|
588
|
+
program: Program;
|
|
589
|
+
}
|
|
590
|
+
export declare type AfterFileAddEvent<TFile extends BscFile = BscFile> = BeforeFileAddEvent<TFile>;
|
|
591
|
+
export interface BeforeFileRemoveEvent<TFile extends BscFile = BscFile> {
|
|
592
|
+
file: TFile;
|
|
593
|
+
program: Program;
|
|
594
|
+
}
|
|
595
|
+
export declare type AfterFileRemoveEvent<TFile extends BscFile = BscFile> = BeforeFileRemoveEvent<TFile>;
|
|
596
|
+
export declare type BeforePrepareProgramEvent = PrepareProgramEvent;
|
|
597
|
+
/**
|
|
598
|
+
* Event for when the program prepares itself for building
|
|
599
|
+
*/
|
|
600
|
+
export interface PrepareProgramEvent {
|
|
601
|
+
program: Program;
|
|
419
602
|
editor: Editor;
|
|
420
603
|
}
|
|
421
|
-
export
|
|
604
|
+
export declare type AfterPrepareProgramEvent = PrepareProgramEvent;
|
|
605
|
+
export declare type BeforePrepareFileEvent<TFile extends BscFile = BscFile> = PrepareFileEvent<TFile>;
|
|
606
|
+
/**
|
|
607
|
+
* Prepare the file for building
|
|
608
|
+
*/
|
|
609
|
+
export interface PrepareFileEvent<TFile extends BscFile = BscFile> {
|
|
422
610
|
program: Program;
|
|
423
|
-
file:
|
|
611
|
+
file: TFile;
|
|
612
|
+
editor: Editor;
|
|
613
|
+
}
|
|
614
|
+
export declare type OnPrepareFileEvent<TFile extends BscFile = BscFile> = PrepareFileEvent<TFile>;
|
|
615
|
+
export declare type AfterPrepareFileEvent<TFile extends BscFile = BscFile> = PrepareFileEvent<TFile>;
|
|
616
|
+
/**
|
|
617
|
+
* A container that holds the code, map, and typedef for serialized code files.
|
|
618
|
+
*/
|
|
619
|
+
export interface SerializedCodeFile {
|
|
620
|
+
code?: string;
|
|
621
|
+
map?: string;
|
|
622
|
+
typedef?: string;
|
|
424
623
|
}
|
|
425
|
-
export interface
|
|
624
|
+
export interface BeforeSerializeProgramEvent {
|
|
426
625
|
program: Program;
|
|
427
|
-
|
|
626
|
+
files: BscFile[];
|
|
627
|
+
result: Map<BscFile, SerializedFile[]>;
|
|
628
|
+
}
|
|
629
|
+
export declare type OnSerializeProgramEvent = BeforeSerializeProgramEvent;
|
|
630
|
+
export declare type AfterSerializeProgramEvent = BeforeSerializeProgramEvent;
|
|
631
|
+
/**
|
|
632
|
+
* During the `SerializeFile` events, this is how plugins will contribute file data for a specific file
|
|
633
|
+
*/
|
|
634
|
+
export interface SerializedFile {
|
|
635
|
+
/**
|
|
636
|
+
* The raw data for this file (i.e. a binary buffer for a .jpeg file, or the transpiled code for a .bs file)
|
|
637
|
+
*/
|
|
638
|
+
data: Buffer;
|
|
639
|
+
/**
|
|
640
|
+
* The pkgPath for this chunk of data.
|
|
641
|
+
*/
|
|
642
|
+
pkgPath: string;
|
|
428
643
|
}
|
|
429
|
-
export
|
|
644
|
+
export declare type BeforeSerializeFileEvent<TFile extends BscFile = BscFile> = SerializeFileEvent<TFile>;
|
|
645
|
+
export interface SerializeFileEvent<TFile extends BscFile = BscFile> {
|
|
430
646
|
program: Program;
|
|
431
|
-
file:
|
|
432
|
-
range: Range;
|
|
647
|
+
file: TFile;
|
|
433
648
|
/**
|
|
434
|
-
*
|
|
649
|
+
* The list of all files created across all the `SerializeFile` events.
|
|
650
|
+
* The key is the pkgPath of the file, and the
|
|
435
651
|
*/
|
|
436
|
-
|
|
437
|
-
codeActions: CodeAction[];
|
|
652
|
+
result: Map<TFile, SerializedFile[]>;
|
|
438
653
|
}
|
|
439
|
-
export
|
|
654
|
+
export declare type AfterSerializeFileEvent<TFile extends BscFile = BscFile> = SerializeFileEvent<TFile>;
|
|
655
|
+
export interface BeforeWriteProgramEvent {
|
|
656
|
+
program: Program;
|
|
657
|
+
stagingDir: string;
|
|
658
|
+
files: Map<BscFile, SerializedFile[]>;
|
|
659
|
+
}
|
|
660
|
+
export declare type AfterWriteProgramEvent = BeforeWriteProgramEvent;
|
|
661
|
+
export declare type BeforeWriteFileEvent = WriteFileEvent;
|
|
662
|
+
export interface WriteFileEvent {
|
|
663
|
+
program: Program;
|
|
664
|
+
file: SerializedFile;
|
|
665
|
+
/**
|
|
666
|
+
* The full path to where the file was (or will be) written to.
|
|
667
|
+
*/
|
|
668
|
+
outputPath: string;
|
|
669
|
+
/**
|
|
670
|
+
* A set of all files that have been properly written. Plugins should add any handled files to this list so future plugins don't write then again
|
|
671
|
+
*/
|
|
672
|
+
processedFiles: Set<SerializedFile>;
|
|
673
|
+
}
|
|
674
|
+
export declare type AfterWriteFileEvent = BeforeWriteFileEvent;
|
|
675
|
+
export interface TranspileObj {
|
|
440
676
|
file: BscFile;
|
|
677
|
+
/**
|
|
678
|
+
* The absolute path to where the file should be written during build. (i.e. somewhere inside the stagingDir)
|
|
679
|
+
*/
|
|
441
680
|
outputPath: string;
|
|
442
681
|
}
|
|
443
|
-
export interface
|
|
682
|
+
export interface BeforeFileDisposeEvent {
|
|
683
|
+
program: Program;
|
|
684
|
+
file: BscFile;
|
|
685
|
+
}
|
|
686
|
+
export declare type AfterFileDisposeEvent = BeforeFileDisposeEvent;
|
|
687
|
+
export interface BeforeProgramDisposeEvent {
|
|
444
688
|
program: Program;
|
|
445
|
-
scope: Scope;
|
|
446
689
|
}
|
|
447
|
-
export declare type Editor = Pick<AstEditor, 'addToArray' | 'hasChanges' | 'removeFromArray' | 'setArrayValue' | 'setProperty' | 'overrideTranspileResult' | 'arrayPop' | 'arrayPush' | 'arrayShift' | 'arraySplice' | 'arrayUnshift' | 'removeProperty' | 'edit'>;
|
|
448
690
|
export interface SemanticToken {
|
|
449
691
|
range: Range;
|
|
450
692
|
tokenType: SemanticTokenTypes;
|
|
@@ -457,10 +699,7 @@ export interface TypedefProvider {
|
|
|
457
699
|
getTypedef(state: TranspileState): Array<SourceNode | string>;
|
|
458
700
|
}
|
|
459
701
|
export declare type TranspileResult = Array<(string | SourceNode)>;
|
|
460
|
-
|
|
461
|
-
* @param srcPath The absolute path to the source file on disk
|
|
462
|
-
*/
|
|
463
|
-
export declare type FileResolver = (srcPath: string) => string | undefined | Thenable<string | undefined> | void;
|
|
702
|
+
export declare type FileResolver = (srcPath: string) => string | Buffer | undefined | Thenable<string | Buffer | undefined> | void;
|
|
464
703
|
export interface ExpressionInfo {
|
|
465
704
|
expressions: Expression[];
|
|
466
705
|
varExpressions: Expression[];
|
|
@@ -471,46 +710,66 @@ export interface FileLink<T> {
|
|
|
471
710
|
item: T;
|
|
472
711
|
file: BrsFile;
|
|
473
712
|
}
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
713
|
+
export interface ExtraSymbolData {
|
|
714
|
+
definingNode?: AstNode;
|
|
715
|
+
description?: string;
|
|
716
|
+
completionPriority?: number;
|
|
717
|
+
flags?: SymbolTypeFlag;
|
|
718
|
+
memberOfAncestor?: boolean;
|
|
719
|
+
}
|
|
720
|
+
export interface GetTypeOptions {
|
|
721
|
+
flags: SymbolTypeFlag;
|
|
722
|
+
typeChain?: TypeChainEntry[];
|
|
723
|
+
data?: ExtraSymbolData;
|
|
724
|
+
ignoreCall?: boolean;
|
|
725
|
+
onlyCacheResolvedTypes?: boolean;
|
|
726
|
+
ignoreCacheForRetrieval?: boolean;
|
|
727
|
+
}
|
|
728
|
+
export declare class TypeChainEntry {
|
|
729
|
+
name: string;
|
|
730
|
+
type: BscType;
|
|
731
|
+
range: Range;
|
|
732
|
+
separatorToken: Token;
|
|
733
|
+
data: ExtraSymbolData;
|
|
734
|
+
constructor(name: string, type: BscType, data: ExtraSymbolData, range: Range, separatorToken?: Token);
|
|
735
|
+
get isResolved(): boolean;
|
|
736
|
+
}
|
|
737
|
+
export interface TypeChainProcessResult {
|
|
738
|
+
itemName: string;
|
|
739
|
+
itemParentTypeName: string;
|
|
740
|
+
fullNameOfItem: string;
|
|
741
|
+
fullChainName: string;
|
|
742
|
+
range: Range;
|
|
743
|
+
containsDynamic: boolean;
|
|
744
|
+
}
|
|
745
|
+
export interface TypeCompatibilityData {
|
|
746
|
+
missingFields?: {
|
|
747
|
+
name: string;
|
|
748
|
+
expectedType: BscType;
|
|
749
|
+
}[];
|
|
750
|
+
fieldMismatches?: {
|
|
751
|
+
name: string;
|
|
752
|
+
expectedType: BscType;
|
|
753
|
+
actualType: BscType;
|
|
754
|
+
}[];
|
|
755
|
+
depth?: number;
|
|
756
|
+
}
|
|
757
|
+
export interface NamespaceContainer {
|
|
758
|
+
file: BscFile;
|
|
759
|
+
fullName: string;
|
|
760
|
+
fullNameLower: string;
|
|
761
|
+
parentNameLower: string;
|
|
762
|
+
nameParts: Identifier[];
|
|
763
|
+
nameRange: Range;
|
|
764
|
+
lastPartName: string;
|
|
765
|
+
lastPartNameLower: string;
|
|
766
|
+
functionStatements: Map<string, FunctionStatement>;
|
|
767
|
+
isTopLevel: boolean;
|
|
768
|
+
namespaceStatements?: NamespaceStatement[];
|
|
769
|
+
statements?: Statement[];
|
|
770
|
+
classStatements?: Map<string, ClassStatement>;
|
|
771
|
+
enumStatements?: Map<string, EnumStatement>;
|
|
772
|
+
constStatements?: Map<string, ConstStatement>;
|
|
773
|
+
namespaces?: Map<string, NamespaceContainer>;
|
|
774
|
+
symbolTable: SymbolTable;
|
|
516
775
|
}
|