Parse pointer optional-ness

This commit is contained in:
Robin Voetter
2020-06-11 19:39:35 +02:00
parent 5aba419165
commit 52d1d45948
3 changed files with 20 additions and 3 deletions

View File

@@ -382,6 +382,7 @@ fn parseFnPtrSuffix(allocator: *Allocator, xctok: *XmlCTokenizer, return_type: T
.decl_type = .{
.pointer = .{
.is_const = true,
.is_optional = false,
.size = .one,
.child = command,
}
@@ -455,8 +456,9 @@ fn parsePointers(allocator: *Allocator, xctok: *XmlCTokenizer, inner_const: bool
type_info = .{
.pointer = .{
.size = .one, // set elsewhere
.is_const = is_const or first_const,
.is_optional = false, // set elsewhere
.size = .one, // set elsewhere
.child = child,
},
};