(fileName string, libFile *LibFile, includeReason *FileIncludeReason)
| 200 | } |
| 201 | |
| 202 | func (p *fileLoader) addRootFileTask(fileName string, libFile *LibFile, includeReason *FileIncludeReason) { |
| 203 | currDir := p.opts.Host.GetCurrentDirectory() |
| 204 | absPath := tspath.GetNormalizedAbsolutePath(fileName, currDir) |
| 205 | containingFile := currDir |
| 206 | if p.opts.Config.ConfigFile != nil { |
| 207 | containingFile = tspath.GetNormalizedAbsolutePath(p.opts.Config.ConfigFile.SourceFile.FileName(), currDir) |
| 208 | } |
| 209 | resolvedFile, diagnostic := p.getSourceFileFromReference(absPath, fileName, containingFile, includeReason) |
| 210 | rootTask := &parseTask{ |
| 211 | normalizedFilePath: resolvedFile, |
| 212 | libFile: libFile, |
| 213 | includeReason: includeReason, |
| 214 | } |
| 215 | if diagnostic != nil { |
| 216 | rootTask.normalizedFilePath = absPath |
| 217 | rootTask.processingDiagnostics = []*processingDiagnostic{{ |
| 218 | kind: processingDiagnosticKindExplainingFileInclude, |
| 219 | data: &includeExplainingDiagnostic{ |
| 220 | diagnosticReason: includeReason, |
| 221 | message: diagnostic.message, |
| 222 | args: diagnostic.args, |
| 223 | }, |
| 224 | }} |
| 225 | } |
| 226 | p.rootTasks = append(p.rootTasks, rootTask) |
| 227 | } |
| 228 | |
| 229 | func (p *fileLoader) addAutomaticTypeDirectiveTasks() { |
| 230 | var containingDirectory string |
no test coverage detected