use proc_macro2::{Literal, TokenStream};
#[derive(Debug)]
pub enum Attribute {
ImplicitToggle { name: String },
ExplicitToggle { name: String, value: TokenStream },
Constant { name: String },
ConstantLiteral { name: String, literal: Literal },
ConstantGroup { name: String, contents: TokenStream },
}
impl Attribute {
pub fn is_static(&self) -> bool {
match &self {
Attribute::ImplicitToggle { .. } => false,
Attribute::ExplicitToggle { .. } => false,
Attribute::Constant { .. } => true,
Attribute::ConstantLiteral { .. } => true,
Attribute::ConstantGroup { .. } => false,
}
}
}