diff --git a/ipub/ast/ast.go b/ipub/ast/ast.go index e18e445..7939d33 100644 --- a/ipub/ast/ast.go +++ b/ipub/ast/ast.go @@ -186,3 +186,11 @@ func ensureIsolated(e Element) { type ElementKind string +var elementKindList = map[ElementKind]Element{} + +func NewElementKind(name string, t Element) ElementKind { + k := ElementKind(name) + elementKindList[k] = t + + return k +}