Skip to main content

xidl_parser/hir/
exception_dcl.rs

1use super::*;
2use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Serialize, Deserialize, Clone)]
5pub struct ExceptDcl {
6    pub annotations: Vec<Annotation>,
7    pub ident: String,
8    pub member: Vec<Member>,
9}
10
11impl From<crate::typed_ast::ExceptDcl> for ExceptDcl {
12    fn from(value: crate::typed_ast::ExceptDcl) -> Self {
13        Self {
14            annotations: expand_annotations(value.annotations),
15            ident: value.ident.0,
16            member: value.member.into_iter().map(Into::into).collect(),
17        }
18    }
19}