# Skip all lines outside of typedef {}
/^typedef/ { codeSkip = 0; next }
+/^enum class / {
+ codeSkip = 0
+ type = $3
+ next;
+}
+/^enum / {
+ codeSkip = 0
+ type = $2
+ next;
+}
codeSkip == 1 { next }
/^[ \t]*[A-Z]/ {
next
}
+/};/ {
+ codeSkip = 1;
+}
+
/^} / {
split($2, t, ";") # remove ;
- type = t[1]
- codeSkip = 1
+ if (!type)
+ type = t[1]
+ codeSkip = 1
+ next
+}
+END {
if (sbuf) print "#include \"SBuf.h\""
print "#include \"" nspath type ".h\""
print "\t" Element[i]
print "};"
if (namespace) print "}; // namespace " namespace
- next
}