(fileToAnalyze: SourceFileInfo, options: ConfigOptions)
| 227 | } |
| 228 | |
| 229 | private _doSemanticAnalysis(fileToAnalyze: SourceFileInfo, options: ConfigOptions) { |
| 230 | if (!this._isFileNeeded(fileToAnalyze) || !fileToAnalyze.sourceFile.isSemanticAnalysisRequired()) { |
| 231 | return; |
| 232 | } |
| 233 | |
| 234 | this._parseFile(fileToAnalyze, options); |
| 235 | |
| 236 | // We need to parse and semantically analyze the builtins import first. |
| 237 | let builtinsScope: Scope | undefined; |
| 238 | if (fileToAnalyze.builtinsImport) { |
| 239 | this._doSemanticAnalysis(fileToAnalyze.builtinsImport, options); |
| 240 | |
| 241 | // Get the builtins scope to pass to the semantic analyzer pass. |
| 242 | const parseResults = fileToAnalyze.builtinsImport.sourceFile.getParseResults(); |
| 243 | if (parseResults) { |
| 244 | builtinsScope = AnalyzerNodeInfo.getScope(parseResults.parseTree); |
| 245 | assert(builtinsScope !== undefined); |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | fileToAnalyze.sourceFile.doSemanticAnalysis(options, builtinsScope); |
| 250 | } |
| 251 | |
| 252 | private _doFullAnalysis(fileToAnalyze: SourceFileInfo, options: ConfigOptions, |
| 253 | timeElapsedCallback: () => boolean): boolean { |
no test coverage detected