(project: ast.Project)
| 688 | */ |
| 689 | export const parseFile = |
| 690 | (project: ast.Project) => |
| 691 | (file: Domain.File): Effect.Effect<Domain.Module, Array<string>, Configuration.Configuration | Path.Path> => { |
| 692 | return Effect.gen(function*() { |
| 693 | const path = yield* Path.Path |
| 694 | const sourceFile = project.getSourceFile(file.path) |
| 695 | const filePath = file.path.split(path.sep) |
| 696 | if (sourceFile !== undefined && Array.isArrayNonEmpty(filePath)) { |
| 697 | return yield* Effect.provideService(parseModule, Source, { sourceFile, path: filePath }) |
| 698 | } |
| 699 | return yield* Effect.fail([`Unable to locate file: ${file.path}`]) |
| 700 | }) |
| 701 | } |
| 702 | |
| 703 | const createProject = (files: ReadonlyArray<Domain.File>) => |
| 704 | Effect.gen(function*() { |
no test coverage detected