1mod annotation;
2mod annotation_builtin;
3mod compound;
4mod const_dcl;
5mod declarator;
6mod enum_dcl;
7mod exception_dcl;
8mod expr;
9mod include;
10mod interface;
11mod interface_codegen;
12mod pragma;
13mod scoped_name;
14mod serialization;
15mod spec;
16mod struct_dcl;
17mod type_dcl;
18mod types;
19
20pub use annotation::*;
21pub use compound::*;
22pub use const_dcl::*;
23pub use declarator::*;
24pub use enum_dcl::*;
25pub use exception_dcl::*;
26pub use expr::*;
27pub use interface::*;
28pub use pragma::*;
29pub use scoped_name::*;
30pub use serialization::*;
31pub use struct_dcl::*;
32pub use type_dcl::*;
33pub use types::*;
34
35use serde::{Deserialize, Serialize};
36use serde_json::Value;
37use std::collections::HashMap;
38
39#[derive(Debug, Serialize, Deserialize, Clone)]
40pub struct Specification(pub Vec<Definition>);
41
42pub type ParserProperties = HashMap<String, Value>;
43
44#[derive(Debug, Serialize, Deserialize, Clone)]
45pub enum Definition {
46 ModuleDcl(ModuleDcl),
47 Pragma(Pragma),
48 ConstrTypeDcl(ConstrTypeDcl),
49 TypeDcl(TypeDcl),
50 ConstDcl(ConstDcl),
51 ExceptDcl(ExceptDcl),
52 InterfaceDcl(InterfaceDcl),
53}
54
55#[derive(Debug, Serialize, Deserialize, Clone)]
56pub struct ModuleDcl {
57 pub annotations: Vec<Annotation>,
58 pub ident: String,
59 pub definition: Vec<Definition>,
60}