brighterscript 0.66.0-alpha.6 → 0.66.0-alpha.8

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.
Files changed (288) hide show
  1. package/CHANGELOG.md +88 -10
  2. package/README.md +16 -0
  3. package/bsconfig.schema.json +15 -0
  4. package/dist/ActionPipeline.d.ts +10 -0
  5. package/dist/ActionPipeline.js +40 -0
  6. package/dist/ActionPipeline.js.map +1 -0
  7. package/dist/AstValidationSegmenter.d.ts +25 -0
  8. package/dist/AstValidationSegmenter.js +150 -0
  9. package/dist/AstValidationSegmenter.js.map +1 -0
  10. package/dist/BsConfig.d.ts +15 -1
  11. package/dist/CommentFlagProcessor.d.ts +4 -3
  12. package/dist/CommentFlagProcessor.js.map +1 -1
  13. package/dist/DiagnosticMessages.d.ts +8 -1
  14. package/dist/DiagnosticMessages.js +30 -13
  15. package/dist/DiagnosticMessages.js.map +1 -1
  16. package/dist/LanguageServer.js +7 -1
  17. package/dist/LanguageServer.js.map +1 -1
  18. package/dist/PluginInterface.d.ts +11 -2
  19. package/dist/PluginInterface.js +69 -10
  20. package/dist/PluginInterface.js.map +1 -1
  21. package/dist/Program.d.ts +107 -38
  22. package/dist/Program.js +502 -270
  23. package/dist/Program.js.map +1 -1
  24. package/dist/ProgramBuilder.d.ts +10 -4
  25. package/dist/ProgramBuilder.js +44 -54
  26. package/dist/ProgramBuilder.js.map +1 -1
  27. package/dist/Scope.d.ts +26 -38
  28. package/dist/Scope.js +153 -174
  29. package/dist/Scope.js.map +1 -1
  30. package/dist/SymbolTable.d.ts +4 -1
  31. package/dist/SymbolTable.js +19 -7
  32. package/dist/SymbolTable.js.map +1 -1
  33. package/dist/XmlScope.d.ts +5 -4
  34. package/dist/XmlScope.js +16 -14
  35. package/dist/XmlScope.js.map +1 -1
  36. package/dist/astUtils/{AstEditor.d.ts → Editor.d.ts} +6 -1
  37. package/dist/astUtils/{AstEditor.js → Editor.js} +9 -3
  38. package/dist/astUtils/Editor.js.map +1 -0
  39. package/dist/astUtils/{AstEditor.spec.js → Editor.spec.js} +10 -6
  40. package/dist/astUtils/Editor.spec.js.map +1 -0
  41. package/dist/astUtils/reflection.d.ts +9 -4
  42. package/dist/astUtils/reflection.js +23 -7
  43. package/dist/astUtils/reflection.js.map +1 -1
  44. package/dist/astUtils/reflection.spec.js +2 -2
  45. package/dist/astUtils/reflection.spec.js.map +1 -1
  46. package/dist/astUtils/visitors.d.ts +14 -3
  47. package/dist/astUtils/visitors.js +22 -2
  48. package/dist/astUtils/visitors.js.map +1 -1
  49. package/dist/astUtils/visitors.spec.js +58 -7
  50. package/dist/astUtils/visitors.spec.js.map +1 -1
  51. package/dist/bscPlugin/BscPlugin.d.ts +10 -2
  52. package/dist/bscPlugin/BscPlugin.js +24 -4
  53. package/dist/bscPlugin/BscPlugin.js.map +1 -1
  54. package/dist/bscPlugin/FileWriter.d.ts +6 -0
  55. package/dist/bscPlugin/FileWriter.js +24 -0
  56. package/dist/bscPlugin/FileWriter.js.map +1 -0
  57. package/dist/bscPlugin/codeActions/CodeActionsProcessor.js +8 -8
  58. package/dist/bscPlugin/codeActions/CodeActionsProcessor.js.map +1 -1
  59. package/dist/bscPlugin/codeActions/CodeActionsProcessor.spec.js.map +1 -1
  60. package/dist/bscPlugin/completions/CompletionsProcessor.d.ts +7 -2
  61. package/dist/bscPlugin/completions/CompletionsProcessor.js +112 -44
  62. package/dist/bscPlugin/completions/CompletionsProcessor.js.map +1 -1
  63. package/dist/bscPlugin/completions/CompletionsProcessor.spec.js +212 -6
  64. package/dist/bscPlugin/completions/CompletionsProcessor.spec.js.map +1 -1
  65. package/dist/bscPlugin/fileProviders/FileProvider.d.ts +9 -0
  66. package/dist/bscPlugin/fileProviders/FileProvider.js +51 -0
  67. package/dist/bscPlugin/fileProviders/FileProvider.js.map +1 -0
  68. package/dist/bscPlugin/hover/HoverProcessor.d.ts +1 -7
  69. package/dist/bscPlugin/hover/HoverProcessor.js +10 -8
  70. package/dist/bscPlugin/hover/HoverProcessor.js.map +1 -1
  71. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.d.ts +1 -0
  72. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js +43 -0
  73. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.js.map +1 -1
  74. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js +22 -0
  75. package/dist/bscPlugin/semanticTokens/BrsFileSemanticTokensProcessor.spec.js.map +1 -1
  76. package/dist/bscPlugin/serialize/BslibInjector.spec.js +19 -0
  77. package/dist/bscPlugin/serialize/BslibInjector.spec.js.map +1 -0
  78. package/dist/bscPlugin/serialize/BslibManager.d.ts +9 -0
  79. package/dist/bscPlugin/serialize/BslibManager.js +40 -0
  80. package/dist/bscPlugin/serialize/BslibManager.js.map +1 -0
  81. package/dist/bscPlugin/serialize/FileSerializer.d.ts +9 -0
  82. package/dist/bscPlugin/serialize/FileSerializer.js +72 -0
  83. package/dist/bscPlugin/serialize/FileSerializer.js.map +1 -0
  84. package/dist/bscPlugin/transpile/{BrsFilePreTranspileProcessor.d.ts → BrsFileTranspileProcessor.d.ts} +4 -2
  85. package/dist/bscPlugin/transpile/{BrsFilePreTranspileProcessor.js → BrsFileTranspileProcessor.js} +29 -5
  86. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.js.map +1 -0
  87. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.d.ts +1 -0
  88. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.js +41 -0
  89. package/dist/bscPlugin/transpile/BrsFileTranspileProcessor.spec.js.map +1 -0
  90. package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.d.ts +2 -2
  91. package/dist/bscPlugin/transpile/XmlFilePreTranspileProcessor.js.map +1 -1
  92. package/dist/bscPlugin/validation/BrsFileValidator.js +8 -3
  93. package/dist/bscPlugin/validation/BrsFileValidator.js.map +1 -1
  94. package/dist/bscPlugin/validation/BrsFileValidator.spec.js +1 -1
  95. package/dist/bscPlugin/validation/BrsFileValidator.spec.js.map +1 -1
  96. package/dist/bscPlugin/validation/ScopeValidator.d.ts +5 -9
  97. package/dist/bscPlugin/validation/ScopeValidator.js +214 -222
  98. package/dist/bscPlugin/validation/ScopeValidator.js.map +1 -1
  99. package/dist/bscPlugin/validation/ScopeValidator.spec.js +669 -0
  100. package/dist/bscPlugin/validation/ScopeValidator.spec.js.map +1 -1
  101. package/dist/bscPlugin/validation/XmlFileValidator.js +2 -2
  102. package/dist/bscPlugin/validation/XmlFileValidator.js.map +1 -1
  103. package/dist/cli.js +1 -0
  104. package/dist/cli.js.map +1 -1
  105. package/dist/deferred.d.ts +2 -2
  106. package/dist/deferred.js.map +1 -1
  107. package/dist/diagnosticUtils.d.ts +1 -0
  108. package/dist/diagnosticUtils.js +4 -3
  109. package/dist/diagnosticUtils.js.map +1 -1
  110. package/dist/examples/plugins/removePrint.js +1 -1
  111. package/dist/examples/plugins/removePrint.js.map +1 -1
  112. package/dist/files/AssetFile.d.ts +26 -0
  113. package/dist/files/AssetFile.js +26 -0
  114. package/dist/files/AssetFile.js.map +1 -0
  115. package/dist/files/BrsFile.Class.spec.js +241 -40
  116. package/dist/files/BrsFile.Class.spec.js.map +1 -1
  117. package/dist/files/BrsFile.d.ts +66 -16
  118. package/dist/files/BrsFile.js +330 -80
  119. package/dist/files/BrsFile.js.map +1 -1
  120. package/dist/files/BrsFile.spec.js +1134 -167
  121. package/dist/files/BrsFile.spec.js.map +1 -1
  122. package/dist/files/Factory.d.ts +25 -0
  123. package/dist/files/Factory.js +22 -0
  124. package/dist/files/Factory.js.map +1 -0
  125. package/dist/files/File.d.ts +106 -0
  126. package/dist/files/File.js +16 -0
  127. package/dist/files/File.js.map +1 -0
  128. package/dist/files/LazyFileData.d.ts +20 -0
  129. package/dist/files/LazyFileData.js +54 -0
  130. package/dist/files/LazyFileData.js.map +1 -0
  131. package/dist/files/LazyFileData.spec.d.ts +1 -0
  132. package/dist/files/LazyFileData.spec.js +27 -0
  133. package/dist/files/LazyFileData.spec.js.map +1 -0
  134. package/dist/files/XmlFile.d.ts +55 -17
  135. package/dist/files/XmlFile.js +88 -47
  136. package/dist/files/XmlFile.js.map +1 -1
  137. package/dist/files/XmlFile.spec.js +64 -57
  138. package/dist/files/XmlFile.spec.js.map +1 -1
  139. package/dist/files/tests/imports.spec.js +21 -8
  140. package/dist/files/tests/imports.spec.js.map +1 -1
  141. package/dist/files/tests/optionalChaning.spec.js +14 -14
  142. package/dist/files/tests/optionalChaning.spec.js.map +1 -1
  143. package/dist/globalCallables.js +1 -1
  144. package/dist/globalCallables.js.map +1 -1
  145. package/dist/index.d.ts +6 -1
  146. package/dist/index.js +6 -1
  147. package/dist/index.js.map +1 -1
  148. package/dist/interfaces.d.ts +357 -89
  149. package/dist/interfaces.js +10 -2
  150. package/dist/interfaces.js.map +1 -1
  151. package/dist/lexer/Lexer.js +1 -1
  152. package/dist/lexer/TokenKind.d.ts +1 -0
  153. package/dist/lexer/TokenKind.js +4 -1
  154. package/dist/lexer/TokenKind.js.map +1 -1
  155. package/dist/parser/AstNode.d.ts +2 -2
  156. package/dist/parser/AstNode.js +1 -1
  157. package/dist/parser/AstNode.js.map +1 -1
  158. package/dist/parser/BrsTranspileState.d.ts +3 -2
  159. package/dist/parser/BrsTranspileState.js +3 -2
  160. package/dist/parser/BrsTranspileState.js.map +1 -1
  161. package/dist/parser/Expression.d.ts +2 -2
  162. package/dist/parser/Expression.js +23 -19
  163. package/dist/parser/Expression.js.map +1 -1
  164. package/dist/parser/Parser.Class.spec.js +103 -0
  165. package/dist/parser/Parser.Class.spec.js.map +1 -1
  166. package/dist/parser/Parser.js +61 -13
  167. package/dist/parser/Parser.js.map +1 -1
  168. package/dist/parser/Parser.spec.js +227 -1
  169. package/dist/parser/Parser.spec.js.map +1 -1
  170. package/dist/parser/SGParser.d.ts +2 -2
  171. package/dist/parser/SGParser.js +3 -3
  172. package/dist/parser/SGParser.js.map +1 -1
  173. package/dist/parser/SGParser.spec.js +2 -2
  174. package/dist/parser/SGParser.spec.js.map +1 -1
  175. package/dist/parser/SGTypes.d.ts +1 -1
  176. package/dist/parser/Statement.d.ts +12 -5
  177. package/dist/parser/Statement.js +56 -26
  178. package/dist/parser/Statement.js.map +1 -1
  179. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js +16 -16
  180. package/dist/parser/tests/expression/NullCoalescenceExpression.spec.js.map +1 -1
  181. package/dist/parser/tests/expression/RegexLiteralExpression.spec.js +10 -10
  182. package/dist/parser/tests/expression/RegexLiteralExpression.spec.js.map +1 -1
  183. package/dist/parser/tests/expression/SourceLiteralExpression.spec.js +24 -24
  184. package/dist/parser/tests/expression/SourceLiteralExpression.spec.js.map +1 -1
  185. package/dist/parser/tests/expression/TemplateStringExpression.spec.js +64 -36
  186. package/dist/parser/tests/expression/TemplateStringExpression.spec.js.map +1 -1
  187. package/dist/parser/tests/expression/TernaryExpression.spec.js +34 -34
  188. package/dist/parser/tests/expression/TernaryExpression.spec.js.map +1 -1
  189. package/dist/parser/tests/expression/UnaryExpression.spec.d.ts +1 -0
  190. package/dist/parser/tests/expression/UnaryExpression.spec.js +52 -0
  191. package/dist/parser/tests/expression/UnaryExpression.spec.js.map +1 -0
  192. package/dist/parser/tests/statement/ConstStatement.spec.js +90 -16
  193. package/dist/parser/tests/statement/ConstStatement.spec.js.map +1 -1
  194. package/dist/parser/tests/statement/Continue.spec.js +2 -2
  195. package/dist/parser/tests/statement/Continue.spec.js.map +1 -1
  196. package/dist/parser/tests/statement/Enum.spec.js +35 -26
  197. package/dist/parser/tests/statement/Enum.spec.js.map +1 -1
  198. package/dist/parser/tests/statement/For.spec.js +6 -6
  199. package/dist/parser/tests/statement/For.spec.js.map +1 -1
  200. package/dist/parser/tests/statement/ForEach.spec.js +4 -4
  201. package/dist/parser/tests/statement/ForEach.spec.js.map +1 -1
  202. package/dist/parser/tests/statement/InterfaceStatement.spec.js +20 -12
  203. package/dist/parser/tests/statement/InterfaceStatement.spec.js.map +1 -1
  204. package/dist/parser/tests/statement/PrintStatement.spec.js +10 -10
  205. package/dist/parser/tests/statement/PrintStatement.spec.js.map +1 -1
  206. package/dist/preprocessor/Manifest.d.ts +1 -1
  207. package/dist/preprocessor/Manifest.js +2 -2
  208. package/dist/preprocessor/Manifest.js.map +1 -1
  209. package/dist/roku-types/data.json +98 -193
  210. package/dist/roku-types/index.d.ts +15 -11
  211. package/dist/types/ArrayType.d.ts +1 -1
  212. package/dist/types/ArrayType.js +4 -0
  213. package/dist/types/ArrayType.js.map +1 -1
  214. package/dist/types/ArrayType.spec.js +1 -1
  215. package/dist/types/ArrayType.spec.js.map +1 -1
  216. package/dist/types/AssociativeArrayType.d.ts +1 -1
  217. package/dist/types/AssociativeArrayType.js +1 -1
  218. package/dist/types/AssociativeArrayType.js.map +1 -1
  219. package/dist/types/BooleanType.d.ts +1 -1
  220. package/dist/types/BooleanType.js +2 -1
  221. package/dist/types/BooleanType.js.map +1 -1
  222. package/dist/types/BscType.d.ts +2 -2
  223. package/dist/types/BscType.js +30 -9
  224. package/dist/types/BscType.js.map +1 -1
  225. package/dist/types/BuiltInInterfaceAdder.d.ts +3 -0
  226. package/dist/types/BuiltInInterfaceAdder.js +37 -16
  227. package/dist/types/BuiltInInterfaceAdder.js.map +1 -1
  228. package/dist/types/BuiltInInterfaceAdder.spec.js +7 -0
  229. package/dist/types/BuiltInInterfaceAdder.spec.js.map +1 -1
  230. package/dist/types/ClassType.d.ts +4 -3
  231. package/dist/types/ClassType.js +6 -3
  232. package/dist/types/ClassType.js.map +1 -1
  233. package/dist/types/ClassType.spec.js +5 -3
  234. package/dist/types/ClassType.spec.js.map +1 -1
  235. package/dist/types/ComponentType.d.ts +1 -1
  236. package/dist/types/ComponentType.js +3 -0
  237. package/dist/types/ComponentType.js.map +1 -1
  238. package/dist/types/DoubleType.js +3 -1
  239. package/dist/types/DoubleType.js.map +1 -1
  240. package/dist/types/EnumType.d.ts +1 -1
  241. package/dist/types/EnumType.js +7 -2
  242. package/dist/types/EnumType.js.map +1 -1
  243. package/dist/types/FloatType.js +3 -1
  244. package/dist/types/FloatType.js.map +1 -1
  245. package/dist/types/InheritableType.d.ts +7 -4
  246. package/dist/types/InheritableType.js +67 -3
  247. package/dist/types/InheritableType.js.map +1 -1
  248. package/dist/types/IntegerType.js +3 -1
  249. package/dist/types/IntegerType.js.map +1 -1
  250. package/dist/types/InterfaceType.d.ts +5 -4
  251. package/dist/types/InterfaceType.js +5 -12
  252. package/dist/types/InterfaceType.js.map +1 -1
  253. package/dist/types/InterfaceType.spec.js +23 -0
  254. package/dist/types/InterfaceType.spec.js.map +1 -1
  255. package/dist/types/LongIntegerType.js +3 -1
  256. package/dist/types/LongIntegerType.js.map +1 -1
  257. package/dist/types/NamespaceType.d.ts +2 -1
  258. package/dist/types/NamespaceType.js +3 -0
  259. package/dist/types/NamespaceType.js.map +1 -1
  260. package/dist/types/ObjectType.d.ts +1 -1
  261. package/dist/types/ReferenceType.js +40 -6
  262. package/dist/types/ReferenceType.js.map +1 -1
  263. package/dist/types/StringType.js +2 -2
  264. package/dist/types/StringType.js.map +1 -1
  265. package/dist/types/TypedFunctionType.d.ts +6 -1
  266. package/dist/types/TypedFunctionType.js +46 -16
  267. package/dist/types/TypedFunctionType.js.map +1 -1
  268. package/dist/types/TypedFunctionType.spec.js +99 -0
  269. package/dist/types/TypedFunctionType.spec.js.map +1 -1
  270. package/dist/types/UnionType.js +8 -0
  271. package/dist/types/UnionType.js.map +1 -1
  272. package/dist/types/helper.spec.js +15 -0
  273. package/dist/types/helper.spec.js.map +1 -1
  274. package/dist/types/helpers.d.ts +3 -0
  275. package/dist/types/helpers.js +33 -1
  276. package/dist/types/helpers.js.map +1 -1
  277. package/dist/util.d.ts +25 -9
  278. package/dist/util.js +165 -72
  279. package/dist/util.js.map +1 -1
  280. package/dist/validators/ClassValidator.js.map +1 -1
  281. package/package.json +2 -2
  282. package/dist/astUtils/AstEditor.js.map +0 -1
  283. package/dist/astUtils/AstEditor.spec.js.map +0 -1
  284. package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.js.map +0 -1
  285. package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.spec.js +0 -31
  286. package/dist/bscPlugin/transpile/BrsFilePreTranspileProcessor.spec.js.map +0 -1
  287. /package/dist/astUtils/{AstEditor.spec.d.ts → Editor.spec.d.ts} +0 -0
  288. /package/dist/bscPlugin/{transpile/BrsFilePreTranspileProcessor.spec.d.ts → serialize/BslibInjector.spec.d.ts} +0 -0
package/dist/Scope.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import type { Position, Range, Location } from 'vscode-languageserver';
2
- import type { CallableContainer, BsDiagnostic, BscFile, CallableContainerMap, FileLink, Callable } from './interfaces';
1
+ import type { Position, Location } from 'vscode-languageserver';
2
+ import { type CallableContainer, type BsDiagnosticWithOrigin, type CallableContainerMap, type FileLink, type Callable, type NamespaceContainer, type ScopeValidationOptions, type BsDiagnostic } from './interfaces';
3
3
  import type { Program } from './Program';
4
- import type { NamespaceStatement, FunctionStatement, ClassStatement, EnumStatement, InterfaceStatement, EnumMemberStatement, ConstStatement } from './parser/Statement';
5
- import type { NewExpression } from './parser/Expression';
4
+ import type { NamespaceStatement, ClassStatement, EnumStatement, InterfaceStatement, EnumMemberStatement, ConstStatement } from './parser/Statement';
5
+ import { type NewExpression } from './parser/Expression';
6
6
  import { Cache } from './Cache';
7
7
  import type { BrsFile } from './files/BrsFile';
8
8
  import type { DependencyGraph, DependencyChangedEvent } from './DependencyGraph';
9
9
  import { SymbolTable } from './SymbolTable';
10
- import type { Statement } from './parser/AstNode';
11
- import type { Identifier } from './lexer/Token';
10
+ import type { File } from './files/File';
11
+ import type { AstNode } from './parser/AstNode';
12
12
  /**
13
13
  * A class to keep track of all declarations within a given scope (like source scope, component scope)
14
14
  */
@@ -129,7 +129,7 @@ export declare class Scope {
129
129
  /**
130
130
  * The list of diagnostics found specifically for this scope. Individual file diagnostics are stored on the files themselves.
131
131
  */
132
- protected diagnostics: BsDiagnostic[];
132
+ protected diagnostics: BsDiagnosticWithOrigin[];
133
133
  protected onDependenciesChanged(event: DependencyChangedEvent): void;
134
134
  /**
135
135
  * Clean up all event handles
@@ -154,26 +154,25 @@ export declare class Scope {
154
154
  attachDependencyGraph(dependencyGraph: DependencyGraph): void;
155
155
  /**
156
156
  * Get the file from this scope with the given path.
157
- * @param filePath can be a srcPath or pkgPath
157
+ * @param filePath can be a srcPath or destPath
158
158
  * @param normalizePath should this function repair and standardize the path? Passing false should have a performance boost if you can guarantee your path is already sanitized
159
159
  */
160
- getFile<TFile extends BscFile>(filePath: string, normalizePath?: boolean): TFile;
160
+ getFile<TFile extends File>(filePath: string, normalizePath?: boolean): TFile;
161
161
  /**
162
162
  * Get the list of files referenced by this scope that are actually loaded in the program.
163
163
  * Excludes files from ancestor scopes
164
164
  */
165
- getOwnFiles(): BscFile[];
165
+ getOwnFiles(): File[];
166
166
  /**
167
167
  * Get the list of files referenced by this scope that are actually loaded in the program.
168
168
  * Includes files from this scope and all ancestor scopes
169
169
  */
170
- getAllFiles(): BscFile[];
170
+ getAllFiles(): File[];
171
171
  /**
172
- * Get the list of errors for this scope. It's calculated on the fly, so
173
- * call this sparingly.
172
+ * Get the list of errors for this scope. It's calculated on the fly, so call this sparingly.
174
173
  */
175
174
  getDiagnostics(): BsDiagnostic[];
176
- addDiagnostics(diagnostics: BsDiagnostic[]): void;
175
+ addDiagnostics(diagnostics: BsDiagnosticWithOrigin[]): void;
177
176
  /**
178
177
  * Get the list of callables available in this scope (either declared in this scope or in a parent scope)
179
178
  */
@@ -191,7 +190,7 @@ export declare class Scope {
191
190
  /**
192
191
  * Call a function for each file directly included in this scope (excluding files found only in parent scopes).
193
192
  */
194
- enumerateOwnFiles(callback: (file: BscFile) => void): void;
193
+ enumerateOwnFiles(callback: (file: File) => void): void;
195
194
  /**
196
195
  * Get the list of callables explicitly defined in files in this scope.
197
196
  * This excludes ancestor callables
@@ -200,12 +199,17 @@ export declare class Scope {
200
199
  /**
201
200
  * Builds a tree of namespace objects
202
201
  */
203
- buildNamespaceLookup(): Map<string, NamespaceContainer>;
202
+ buildNamespaceLookup(options?: {
203
+ okToCache?: boolean;
204
+ }): Map<string, NamespaceContainer>;
204
205
  getAllNamespaceStatements(): NamespaceStatement[];
205
206
  protected logDebug(...args: any[]): void;
206
207
  private _debugLogComponentName;
207
- validate(force?: boolean): void;
208
+ validate(validationOptions?: ScopeValidationOptions): void;
208
209
  protected _validate(callableContainerMap: CallableContainerMap): void;
210
+ clearAstSegmentDiagnostics(astSegment: AstNode): void;
211
+ clearAstSegmentDiagnosticsByFile(file: File): void;
212
+ clearScopeLevelDiagnostics(): void;
209
213
  /**
210
214
  * Mark this scope as invalid, which means its `validate()` function needs to be called again before use.
211
215
  */
@@ -215,6 +219,7 @@ export declare class Scope {
215
219
  * A list of functions that will be called whenever `unlinkSymbolTable` is called
216
220
  */
217
221
  private linkSymbolTableDisposables;
222
+ private symbolsAddedDuringLinking;
218
223
  /**
219
224
  * Builds the current symbol table for the scope, by merging the tables for all the files in this scope.
220
225
  * Also links all file symbols tables to this new table
@@ -262,15 +267,15 @@ export declare class Scope {
262
267
  /**
263
268
  * Find the file with the specified relative path
264
269
  */
265
- protected getFileByRelativePath(relativePath: string): BscFile;
270
+ protected getFileByRelativePath(relativePath: string): File;
266
271
  /**
267
272
  * Determine if this file is included in this scope (excluding parent scopes)
268
273
  */
269
- hasFile(file: BscFile): boolean;
274
+ hasFile(file: File): boolean;
270
275
  /**
271
276
  * Get the definition (where was this thing first defined) of the symbol under the position
272
277
  */
273
- getDefinition(file: BscFile, position: Position): Location[];
278
+ getDefinition(file: File, position: Position): Location[];
274
279
  /**
275
280
  * @param className - The name of the class (including namespace if possible)
276
281
  * @param callsiteNamespace - the name of the namespace where the call site resides (this is NOT the known namespace of the class).
@@ -278,24 +283,7 @@ export declare class Scope {
278
283
  */
279
284
  getClassHierarchy(className: string, callsiteNamespace?: string): FileLink<ClassStatement>[];
280
285
  }
281
- interface NamespaceContainer {
282
- file: BscFile;
283
- fullName: string;
284
- fullNameLower: string;
285
- parentNameLower: string;
286
- nameParts: Identifier[];
287
- nameRange: Range;
288
- lastPartName: string;
289
- lastPartNameLower: string;
290
- statements: Statement[];
291
- classStatements: Map<string, ClassStatement>;
292
- functionStatements: Map<string, FunctionStatement>;
293
- enumStatements: Map<string, EnumStatement>;
294
- constStatements: Map<string, ConstStatement>;
295
- namespaces: Map<string, NamespaceContainer>;
296
- symbolTable: SymbolTable;
297
- }
298
286
  interface AugmentedNewExpression extends NewExpression {
299
- file: BscFile;
287
+ file: File;
300
288
  }
301
289
  export {};