diff options
Diffstat (limited to 'src/path.rs')
-rw-r--r-- | src/path.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/path.rs b/src/path.rs new file mode 100644 index 0000000..bfb5719 --- /dev/null +++ b/src/path.rs @@ -0,0 +1,27 @@ +lalrpop_mod!(pub parser, "/path/parser.rs"); + + +#[derive(Debug)] +pub struct DirectoryName(String); + +#[derive(Debug)] +pub struct FileName(String); + +#[derive(Debug)] +pub struct AbsoluteDirectoryPath { + components: Vec<DirectoryName>, +} + +#[derive(Debug)] +pub enum GenericPathComponent { + FileOrDirectoryName(String), + CurrentDirectory, + ParentDirectory, +} + +#[derive(Debug)] +pub struct GenericPath { + components: Vec<GenericPathComponent>, + starts_with_slash: bool, + ends_with_slash: bool, +} |