add ex082 anon structs 3
This commit is contained in:
parent
b86230d160
commit
5ff9d69231
3 changed files with 150 additions and 0 deletions
20
patches/patches/082_anonymous_structs3.patch
Normal file
20
patches/patches/082_anonymous_structs3.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
85c85
|
||||
< const fields = ???;
|
||||
---
|
||||
> const fields = @typeInfo(@TypeOf(tuple)).Struct.fields;
|
||||
92c92
|
||||
< for (fields) |field| {
|
||||
---
|
||||
> inline for (fields) |field| {
|
||||
116c116
|
||||
< // @field(foo, "x"); // returns the value at foo.x
|
||||
---
|
||||
> // @field(foo, "x");
|
||||
120,122c120,122
|
||||
< field.???,
|
||||
< field.???,
|
||||
< ???,
|
||||
---
|
||||
> field.name,
|
||||
> field.field_type,
|
||||
> @field(tuple, field.name),
|
||||
Loading…
Add table
Add a link
Reference in a new issue