summary refs log tree commit diff
path: root/src/path.rs
blob: bfb5719f629429a07cebdb4b16a7248b87bb73ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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,
}