150
|
1 include "spec/spec.td"
|
|
2
|
|
3 class MacroDef<string name> {
|
|
4 string Name = name;
|
|
5 string Defn = "";
|
|
6 }
|
|
7
|
|
8 class SimpleMacroDef<string name, string value> : MacroDef<name> {
|
|
9 let Defn = !strconcat("#define ", name, " ", value);
|
|
10 }
|
|
11
|
|
12 class MacroDefineIfNot<string name, string value> : MacroDef<name> {
|
|
13 let Defn = !strconcat("#ifndef ", name, "\n",
|
|
14 "#define " , name, " ", value, "\n",
|
|
15 "#endif // ", name);
|
|
16 }
|
|
17
|
|
18 class PublicAPI<string name> {
|
|
19 string HeaderName = name;
|
|
20 list<MacroDef> Macros = [];
|
236
|
21 list<string> Types = [];
|
173
|
22 list<string> Enumerations = [];
|
150
|
23 list<string> Structs = [];
|
|
24 list<string> Functions = [];
|
236
|
25 list<string> Objects = [];
|
150
|
26 }
|