mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 22:09:26 +01:00
CGrammar: Progress on C11 features -- added compound-literals
This commit is contained in:
parent
34def4f9ad
commit
73967e0721
@ -13,7 +13,7 @@ use warnings;
|
||||
# These are set automatically by the build/commit script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 689,
|
||||
BUILD_REVISION => 690,
|
||||
BUILD_DATE => "2014-07-01",
|
||||
};
|
||||
|
||||
|
@ -1080,6 +1080,12 @@ postfix_expression:
|
||||
$return = undef;
|
||||
}
|
||||
}
|
||||
| '(' 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 set { $item{initializer_list} }";
|
||||
$return = "$postfix $return" if $postfix;
|
||||
}
|
||||
|
||||
postfix_suffix:
|
||||
'[' expression ']'
|
||||
@ -1517,7 +1523,6 @@ enum_specifier:
|
||||
| 'enum' identifier
|
||||
{ $return = "an enumeration of type $item{identifier}"; }
|
||||
|
||||
|
||||
enumerator_list:
|
||||
<leftop:enumerator ',' enumerator>
|
||||
|
||||
|
@ -81,6 +81,7 @@ foreach my $arg (@ARGV) {
|
||||
$output =~ s/of evaluate/of/g;
|
||||
$output =~ s/the evaluate the/the/g;
|
||||
$output =~ s/by evaluate the/by the/g;
|
||||
$output =~ s/the a/the/g;
|
||||
|
||||
foreach my $quote (@quotes) {
|
||||
next unless $quote;
|
||||
|
Loading…
Reference in New Issue
Block a user