glsl_lang_pp/types/
type_names.rs

1#![allow(dead_code)]
2
3include!(concat!(env!("OUT_DIR"), "/type_names.rs"));
4
5#[derive(Debug, Clone)]
6pub enum TypeNameState {
7    Ident,
8    Type,
9    #[cfg(feature = "exts")]
10    WarnType(crate::exts::names::ExtNameAtom),
11}
12
13impl TypeNameState {
14    #[cfg(feature = "exts")]
15    pub fn is_type_name(&self) -> bool {
16        matches!(self, Self::Type | Self::WarnType(_))
17    }
18
19    #[cfg(not(feature = "exts"))]
20    pub fn is_type_name(&self) -> bool {
21        matches!(self, Self::Type)
22    }
23}