google / mangle

Apache License 2.0
1.07k stars 38 forks source link

proper syntax for struct and map types #27

Open burakemir opened 9 months ago

burakemir commented 9 months ago

Right now, in order to specify that an argument is a struct, one has to write something like

Decl foo(X) bound [fn:Struct(/field1, <type of field1>, /field2, <type of field2>...)].

The proper way to write such a type would be:

Decl foo(X) bound [ { /field1: <type of field1>, /field2: <type of field2>} ].

so that the struct type looks more like a struct value. Same for map types.