mirror of
https://github.com/samba-team/samba.git
synced 2025-01-14 19:24:43 +03:00
r8919: Return references to structs and unions in parse tree. Fill in type
names for structs and unions also.
This commit is contained in:
parent
6339cc75fa
commit
c31be38346
@ -27,7 +27,7 @@ struct: STRUCT optional_identifier '{' elements '}' pointers optional_identifier
|
||||
my $name = defined($_[2]) ? $_[2] : $_[7];
|
||||
{
|
||||
"NAME" => $name,
|
||||
"TYPE" => "STRUCT",
|
||||
"TYPE" => "struct",
|
||||
"DATA" => $_[4],
|
||||
}
|
||||
}
|
||||
@ -39,7 +39,7 @@ union:
|
||||
my $name = defined($_[2]) ? $_[2] : $_[7];
|
||||
{
|
||||
"NAME" => $name,
|
||||
"TYPE" => "UNION",
|
||||
"TYPE" => "union",
|
||||
"DATA" => $_[4],
|
||||
}
|
||||
}
|
||||
@ -69,7 +69,17 @@ element:
|
||||
| struct
|
||||
| union
|
||||
| STRUCT IDENTIFIER pointers IDENTIFIER ';'
|
||||
{{
|
||||
"NAME" => $_[2],
|
||||
"POINTERS" => $_[3],
|
||||
"TYPE" => "struct $_[2]",
|
||||
}}
|
||||
| UNION IDENTIFIER pointers IDENTIFIER ';'
|
||||
{{
|
||||
"NAME" => $_[2],
|
||||
"POINTERS" => $_[3],
|
||||
"TYPE" => "union $_[2]",
|
||||
}}
|
||||
| CONST type pointers IDENTIFIER array ';'
|
||||
{{
|
||||
"NAME" => $_[4],
|
||||
@ -90,6 +100,7 @@ array: #empty
|
||||
|
||||
type: IDENTIFIER
|
||||
| ENUM IDENTIFIER
|
||||
{ "enum $_[2]" }
|
||||
;
|
||||
|
||||
pointers:
|
||||
|
Loading…
x
Reference in New Issue
Block a user