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 include::*;
27pub use interface::*;
28pub use pragma::*;
29pub use scoped_name::*;
30pub use struct_dcl::*;
31pub use type_dcl::*;
32pub use types::*;
33
34use serde::{Deserialize, Serialize};
35use serde_json::Value;
36use std::collections::HashMap;
37
38#[derive(Debug, Serialize, Deserialize, Clone)]
39pub struct Specification(pub Vec<Definition>);
40
41pub type ParserProperties = HashMap<String, Value>;
42
43#[derive(Debug, Serialize, Deserialize, Clone)]
44pub enum Definition {
45 ModuleDcl(ModuleDcl),
46 Pragma(Pragma),
47 ConstrTypeDcl(ConstrTypeDcl),
48 TypeDcl(TypeDcl),
49 ConstDcl(ConstDcl),
50 ExceptDcl(ExceptDcl),
51 InterfaceDcl(InterfaceDcl),
52}
53
54#[derive(Debug, Serialize, Deserialize, Clone)]
55pub struct ModuleDcl {
56 pub annotations: Vec<Annotation>,
57 pub ident: String,
58 pub definition: Vec<Definition>,
59}