glsl_lang_pp/types/
path.rs

1#[derive(Debug, Clone, PartialEq, Eq)]
2pub struct ParsedPath {
3    pub path: String,
4    pub ty: PathType,
5}
6
7impl std::fmt::Display for ParsedPath {
8    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
9        match self.ty {
10            PathType::Angle => write!(f, "<{}>", self.path),
11            PathType::Quote => write!(f, "\"{}\"", self.path),
12        }
13    }
14}
15
16#[derive(Debug, Clone, Copy, PartialEq, Eq)]
17pub enum PathType {
18    Angle,
19    Quote,
20}