diff --git a/src/compiler/mod.rs b/src/compiler/mod.rs index cbdc9b9..dced7c8 100644 --- a/src/compiler/mod.rs +++ b/src/compiler/mod.rs @@ -6,7 +6,6 @@ mod compiler_source; mod cst; mod native_fn; mod rst; -mod source_finder; mod util; pub(crate) use compilation_result::Compilation; diff --git a/src/compiler/source_finder.rs b/src/compiler/source_finder.rs deleted file mode 100644 index 1c12e0c..0000000 --- a/src/compiler/source_finder.rs +++ /dev/null @@ -1,25 +0,0 @@ -use crate::compiler::{CompilerSource, FileCompilerSource}; -use std::path::PathBuf; - -pub(crate) trait SourceFinder { - fn find(&self, path: PathBuf) -> Option; -} - -pub(crate) struct FileSourceFinder { - root_dir: PathBuf, -} - -impl SourceFinder for FileSourceFinder { - fn find(&self, path: PathBuf) -> Option { - let path = self.root_dir.join(path); - - let source = FileCompilerSource::new(path); - Some(source) - } -} - -impl FileSourceFinder { - pub(crate) fn new(root_dir: PathBuf) -> FileSourceFinder { - FileSourceFinder { root_dir } - } -}