Improve type handling for enums. Handle "__kindof" qualifiers.

Add examples/app. Allow VisibilityAttr "Hidden".
This commit is contained in:
gmp
2019-05-06 13:21:36 -04:00
parent 959b87342e
commit 511f2f1968
12 changed files with 105 additions and 24 deletions
+3
View File
@@ -7,6 +7,7 @@ type VisibilityAttr struct {
ChildNodes []Node
IsDefault bool
IsInherited bool
IsHidden bool
}
func parseVisibilityAttr(line string) *VisibilityAttr {
@@ -14,6 +15,7 @@ func parseVisibilityAttr(line string) *VisibilityAttr {
`<(?P<position>.*)>
(?P<inherited> Inherited)?
(?P<default> Default)?
(?P<hidden> Hidden)?
`,
line,
)
@@ -24,6 +26,7 @@ func parseVisibilityAttr(line string) *VisibilityAttr {
ChildNodes: []Node{},
IsDefault: len(groups["default"]) > 0,
IsInherited: len(groups["inherited"]) > 0,
IsHidden: len(groups["hidden"]) > 0,
}
}