v.ast: improve Expr.str() for `sizeof(Type)`
parent
79a8e34e33
commit
c5884a5f4d
|
@ -318,6 +318,9 @@ pub fn (x Expr) str() string {
|
|||
return '${x.expr.str()}.$x.field_name'
|
||||
}
|
||||
SizeOf {
|
||||
if x.is_type {
|
||||
return 'sizeof(Type($x.typ))'
|
||||
}
|
||||
return 'sizeof($x.expr)'
|
||||
}
|
||||
OffsetOf {
|
||||
|
|
Loading…
Reference in New Issue