mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 17:08:38 +00:00
genbindings/namespace: support unnamed namespace { } blocks
This commit is contained in:
parent
c0ff37a9c6
commit
5f1b704c1a
@ -18,6 +18,7 @@ func parseHeader(topLevel []interface{}, addNamePrefix string) (*CppParsedHeader
|
|||||||
|
|
||||||
var ret CppParsedHeader
|
var ret CppParsedHeader
|
||||||
|
|
||||||
|
nextTopLevel:
|
||||||
for _, node := range topLevel {
|
for _, node := range topLevel {
|
||||||
|
|
||||||
node, ok := node.(map[string]interface{})
|
node, ok := node.(map[string]interface{})
|
||||||
@ -71,7 +72,10 @@ func parseHeader(topLevel []interface{}, addNamePrefix string) (*CppParsedHeader
|
|||||||
// Then copy the parsed elements back into our own file
|
// Then copy the parsed elements back into our own file
|
||||||
namespace, ok := node["name"].(string)
|
namespace, ok := node["name"].(string)
|
||||||
if !ok {
|
if !ok {
|
||||||
panic("NamespaceDecl missing name")
|
// Qt 5 has none of these
|
||||||
|
// Qt 6 has some e.g. qloggingcategory.h
|
||||||
|
// Treat it as not having existed
|
||||||
|
continue nextTopLevel
|
||||||
}
|
}
|
||||||
|
|
||||||
namespaceInner, ok := node["inner"].([]interface{})
|
namespaceInner, ok := node["inner"].([]interface{})
|
||||||
|
Loading…
Reference in New Issue
Block a user