3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-01 17:16:39 +02:00

CGrammar: correct order of sizeof unary expressions

This commit is contained in:
Pragmatic Software 2014-07-07 10:24:15 +00:00
parent fbfc390b0c
commit 4a646f61c9
2 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ use warnings;
# These are set automatically by the build/commit script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 715,
BUILD_REVISION => 717,
BUILD_DATE => "2014-07-07",
};

View File

@ -978,12 +978,12 @@ unary_expression:
$return = $item{unary_operator} . $item{cast_expression};
}
}
| 'sizeof' unary_expression[context => 'sizeof']
{ $return = "the size of $item{unary_expression}"; }
| 'sizeof' '(' type_name[context => 'sizeof'] ')'
{ $return = "the size of the type $item{type_name}"; }
| 'sizeof' '(' assignment_expression[context => 'sizeof'] ')'
{ $return = "the size of the type of the expression ($item{assignment_expression})"; }
| 'sizeof' unary_expression[context => 'sizeof']
{ $return = "the size of $item{unary_expression}"; }
| Alignof '(' type_name ')'
{ $return = "the alignment of the type $item{type_name}"; }