slicec/grammar/elements/
field.rs1use super::super::*;
4use crate::slice_file::Span;
5use crate::utils::ptr_util::WeakPtr;
6
7#[derive(Debug)]
8pub struct Field {
9 pub identifier: Identifier,
10 pub data_type: TypeRef,
11 pub tag: Option<Integer<u32>>,
12 pub parent: WeakPtr<dyn Container<Field>>,
13 pub scope: Scope,
14 pub attributes: Vec<WeakPtr<Attribute>>,
15 pub comment: Option<DocComment>,
16 pub span: Span,
17}
18
19implement_Element_for!(Field, "field");
20implement_Attributable_for!(@Contained Field);
21implement_Entity_for!(Field);
22implement_Commentable_for!(Field);
23implement_Contained_for!(Field, dyn Container<Field> + 'static);
24implement_Member_for!(Field);