mirror of
https://github.com/mappu/miqt.git
synced 2024-12-23 01:18:37 +00:00
genbindings: minor compatibility improvements for qwidget.h
This commit is contained in:
parent
bdc13f71c4
commit
ab9c015501
@ -58,6 +58,13 @@ func parseHeader(inner []interface{}) (*CppParsedHeader, error) {
|
|||||||
case "NamespaceDecl":
|
case "NamespaceDecl":
|
||||||
// ignore
|
// ignore
|
||||||
|
|
||||||
|
case "FunctionDecl":
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
case "CXXMethodDecl":
|
||||||
|
// A C++ class method implementation directly in the header
|
||||||
|
// Skip over these
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("missing handling for clang ast node type %q", kind)
|
return nil, fmt.Errorf("missing handling for clang ast node type %q", kind)
|
||||||
}
|
}
|
||||||
@ -306,6 +313,10 @@ func parseTypeString(typeString string) (CppParameter, []CppParameter, error) {
|
|||||||
return CppParameter{}, nil, ErrTooComplex
|
return CppParameter{}, nil, ErrTooComplex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if strings.Contains(typeString, `&&`) { // TODO Rvalue references
|
||||||
|
return CppParameter{}, nil, ErrTooComplex
|
||||||
|
}
|
||||||
|
|
||||||
// Cut to exterior-most (, ) pair
|
// Cut to exterior-most (, ) pair
|
||||||
opos := strings.Index(typeString, `(`)
|
opos := strings.Index(typeString, `(`)
|
||||||
epos := strings.LastIndex(typeString, `)`)
|
epos := strings.LastIndex(typeString, `)`)
|
||||||
|
@ -214,7 +214,7 @@ import "C"
|
|||||||
formattedSrc, err := format.Source([]byte(goSrc))
|
formattedSrc, err := format.Source([]byte(goSrc))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("gofmt failure: %v", err)
|
log.Printf("gofmt failure: %v", err)
|
||||||
formattedSrc = []byte(ret.String())
|
formattedSrc = []byte(goSrc)
|
||||||
}
|
}
|
||||||
|
|
||||||
return string(formattedSrc), nil
|
return string(formattedSrc), nil
|
||||||
|
Loading…
Reference in New Issue
Block a user