Initial commit.
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user