3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-03 01:48:38 +02:00

CGrammar: Fix int const i to translate to constant int i instead of int constant i

This commit is contained in:
Pragmatic Software 2014-06-18 22:31:56 +00:00
parent 7590644422
commit f898580d33
2 changed files with 8 additions and 5 deletions

View File

@ -13,8 +13,8 @@ use warnings;
# These are set automatically by the build/commit script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 654,
BUILD_DATE => "2014-06-17",
BUILD_REVISION => 655,
BUILD_DATE => "2014-06-18",
};
1;

View File

@ -1238,12 +1238,15 @@ declaration_specifiers:
| comment(?) type_specifier declaration_specifiers(?)
{
my $decl_spec = join(' ', @{$item{'declaration_specifiers(?)'}});
$return = join('',@{$item{'comment(?)'}}) . $item{type_specifier};
if ($decl_spec) { $return .= ' ' . $decl_spec; }
$return = join('',@{$item{'comment(?)'}});
$return .= "$decl_spec " if $decl_spec;
$return .= $item{type_specifier};
}
| comment(?) type_qualifier declaration_specifiers(?)
{
my $decl_spec = $return = join('',@{$item{'comment(?)'}}) . $item{type_qualifier} . ' ' . join(' ',@{$item{'declaration_specifiers(?)'}});
my $decl_spec = join(' ',@{$item{'declaration_specifiers(?)'}});
$return = join('',@{$item{'comment(?)'}}) . $item{type_qualifier};
$return .= " $decl_spec" if $decl_spec;
}
storage_class_specifier: