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