@@ -49,6 +49,25 @@ function collect_top_level_nodes!(nodes::Vector{ExprNode}, cursor::CLTypedefDecl
49
49
return nodes
50
50
end
51
51
52
+ function collect_top_level_nodes! (nodes:: Vector{ExprNode} , cursor:: CLTypeAliasDecl , options)
53
+ # lhs_type = getTypedefDeclUnderlyingType(cursor)
54
+
55
+ # @show lhs_type
56
+ # if has_elaborated_reference(lhs_type)
57
+ # ty = TypedefElaborated()
58
+ # elseif has_function_reference(lhs_type)
59
+ ty = TypedefFunction ()
60
+ # else
61
+ # ty = TypedefDefault()
62
+ # end
63
+
64
+ id = Symbol (spelling (cursor))
65
+
66
+ push! (nodes, ExprNode (id, ty, cursor, Expr[], Int[]))
67
+
68
+ return nodes
69
+ end
70
+
52
71
function collect_top_level_nodes! (nodes:: Vector{ExprNode} , cursor:: CLMacroDefinition , options)
53
72
is_macro_no_op (cursor) && return nodes
54
73
@@ -159,7 +178,12 @@ collect_top_level_nodes!(nodes::Vector{ExprNode}, cursor::CLInclusionDirective,
159
178
collect_top_level_nodes! (nodes:: Vector{ExprNode} , cursor:: CLLastPreprocessing , options) = nodes # FIXME : fix cltype.jl
160
179
161
180
# skip unexposed decl
162
- collect_top_level_nodes! (nodes:: Vector{ExprNode} , cursor:: CLUnexposedDecl , options) = nodes
181
+ function collect_top_level_nodes! (nodes:: Vector{ExprNode} , cursor:: CLUnexposedDecl , options)
182
+ for child in children (cursor)
183
+ collect_top_level_nodes! (nodes, child, options)
184
+ end
185
+ nodes
186
+ end
163
187
collect_top_level_nodes! (nodes:: Vector{ExprNode} , cursor:: CLFirstDecl , options) = nodes # FIXME : fix cltype.jl
164
188
165
189
# skip C11's `_Static_assert`
0 commit comments