Commit f2b15363 authored by Russ Cox's avatar Russ Cox

annotations on embedded types

R=ken
OCL=18179
CL=18179
parent 1850b29d
...@@ -1395,11 +1395,16 @@ structdcl: ...@@ -1395,11 +1395,16 @@ structdcl:
$$->type = $2; $$->type = $2;
$$->val = $3; $$->val = $3;
} }
| embed | embed oliteral
| '*' embed {
$$ = $1;
$$->val = $2;
}
| '*' embed oliteral
{ {
$$ = $2; $$ = $2;
$$->type = ptrto($$->type); $$->type = ptrto($$->type);
$$->val = $3;
} }
embed: embed:
...@@ -1898,13 +1903,14 @@ hidden_structdcl: ...@@ -1898,13 +1903,14 @@ hidden_structdcl:
$$->type = $2; $$->type = $2;
$$->val = $3; $$->val = $3;
} }
| '?' hidden_type | '?' hidden_type oliteral
{ {
if(isptr[$2->etype]) { if(isptr[$2->etype]) {
$$ = embedded($2->type->sym); $$ = embedded($2->type->sym);
$$->type = ptrto($$->type); $$->type = ptrto($$->type);
} else } else
$$ = embedded($2->sym); $$ = embedded($2->sym);
$$->val = $3;
} }
hidden_interfacedcl: hidden_interfacedcl:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment