mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-23 19:22:40 +01:00
CGrammar: Remove "the list" from initializer lists; restore skipping of whitespace to struct/union/enum specifier
This commit is contained in:
parent
7b42e9220e
commit
07f9ef6120
@ -13,7 +13,7 @@ use warnings;
|
||||
# These are set automatically by the build/commit script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 693,
|
||||
BUILD_REVISION => 694,
|
||||
BUILD_DATE => "2014-07-02",
|
||||
};
|
||||
|
||||
|
@ -819,7 +819,7 @@ initializer:
|
||||
}
|
||||
}
|
||||
| '{' comment(?) initializer_list (',' )(?) '}'
|
||||
{ $return = 'the list { ' . $item{'initializer_list'} . ' }'; }
|
||||
{ $return = '{ ' . $item{'initializer_list'} . ' }'; }
|
||||
|
||||
initializer_list:
|
||||
<leftop: initializer ',' initializer >
|
||||
@ -1129,7 +1129,7 @@ postfix_expression:
|
||||
| '(' type_name ')' '{' initializer_list '}' postfix_productions[context => "$arg{context}|compound literal"](?)
|
||||
{
|
||||
my $postfix = $item[-1]->[0];
|
||||
$return = "A compound-literal of type $item{type_name} initialized to the list { $item{initializer_list} }";
|
||||
$return = "A compound-literal of type $item{type_name} initialized to { $item{initializer_list} }";
|
||||
$return = "$postfix $return" if $postfix;
|
||||
}
|
||||
|
||||
@ -1462,8 +1462,8 @@ type_specifier:
|
||||
| 'div_t' | 'ldiv_t' | 'lldiv_t' | 'imaxdiv_t'
|
||||
| 'cnd_t' | 'thrd_t' | 'tss_t' | 'mtx_t' | 'tss_dtor_t' | 'thrd_start_t' | 'once_flag'
|
||||
| 'clock_t' | 'time_t'
|
||||
| struct_or_union_specifier
|
||||
| enum_specifier
|
||||
| <skip:'[\s]*'> struct_or_union_specifier
|
||||
| <skip:'[\s]*'> enum_specifier
|
||||
| typedef_name) .../\W/
|
||||
{ $return = $item[3]; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user