Add generate function for Tuple

Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
This commit is contained in:
Francis Bouvier
2023-05-23 15:23:09 +02:00
parent fdafd96003
commit 76c8d8594c
3 changed files with 149 additions and 76 deletions

View File

@@ -16,7 +16,7 @@ pub const HTMLElement = struct {
}
};
const HTMLElementsTypes = .{
pub const HTMLElementsTypes = .{
HTMLUnknownElement,
HTMLAnchorElement,
HTMLAreaElement,
@@ -78,10 +78,7 @@ const HTMLElementsTypes = .{
HTMLUListElement,
HTMLVideoElement,
};
fn generateElements() generate.Union {
return generate.Union.compile(HTMLElementsTypes);
}
const HTMLElementsGenerated = generateElements();
const HTMLElementsGenerated = generate.Union.compile(HTMLElementsTypes);
pub const HTMLElements = HTMLElementsGenerated._union;
pub const HTMLElementsTags = HTMLElementsGenerated._enum;