Initial commit.

This commit is contained in:
gmp
2019-04-09 11:52:21 -04:00
commit 6a9c5c2811
230 changed files with 10509 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
package wrap
import (
"fmt"
"reflect"
"gitlab.wow.st/gmp/clast/ast"
)
type Wrapper struct {
}
func NewWrapper() *Wrapper {
return &Wrapper{}
}
func (w *Wrapper) Wrap(n *ast.ObjCInterfaceDecl) {
fmt.Println("//generated by gitlab.wow.st/gmp/clast")
for _,c := range n.Children() {
switch x := c.(type) {
case *ast.Unknown:
fmt.Printf("%s: %s\n",x.Name,x.Content)
case *ast.ObjCMethodDecl:
fmt.Printf("*ast.ObjCMethodDecl: %s (%s %s)\n",x.Name,x.Type, x.Attr)
default:
fmt.Println(reflect.TypeOf(x))
}
}
}