mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-25 04:02:37 +01:00
CGrammar: correct order of sizeof unary expressions
This commit is contained in:
parent
fbfc390b0c
commit
4a646f61c9
@ -13,7 +13,7 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 715,
|
BUILD_REVISION => 717,
|
||||||
BUILD_DATE => "2014-07-07",
|
BUILD_DATE => "2014-07-07",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -978,12 +978,12 @@ unary_expression:
|
|||||||
$return = $item{unary_operator} . $item{cast_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'] ')'
|
| 'sizeof' '(' type_name[context => 'sizeof'] ')'
|
||||||
{ $return = "the size of the type $item{type_name}"; }
|
{ $return = "the size of the type $item{type_name}"; }
|
||||||
| 'sizeof' '(' assignment_expression[context => 'sizeof'] ')'
|
| 'sizeof' '(' assignment_expression[context => 'sizeof'] ')'
|
||||||
{ $return = "the size of the type of the expression ($item{assignment_expression})"; }
|
{ $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 ')'
|
| Alignof '(' type_name ')'
|
||||||
{ $return = "the alignment of the type $item{type_name}"; }
|
{ $return = "the alignment of the type $item{type_name}"; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user