mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 11:42:35 +01:00
CGrammar: Improve _Static_assert translation
This commit is contained in:
parent
b470359071
commit
d244af52d8
@ -13,7 +13,7 @@ use warnings;
|
||||
# These are set automatically by the build/commit script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 713,
|
||||
BUILD_REVISION => 714,
|
||||
BUILD_DATE => "2014-07-07",
|
||||
};
|
||||
|
||||
|
@ -640,7 +640,10 @@ Static_assert:
|
||||
static_assert_declaration:
|
||||
Static_assert '(' constant_expression ',' string ')' ';'
|
||||
{
|
||||
$return = "Declare a static assertion to produce the diagnostic $item{string} if $item{constant_expression} is false.\n";
|
||||
if(not $item{constant_expression} =~ s/ is / is not /) {
|
||||
$item{constant_expression} .= ' is false';
|
||||
}
|
||||
$return = "Halt compilation and produce the diagnostic $item{string} if $item{constant_expression}.\n";
|
||||
}
|
||||
|
||||
declaration_list:
|
||||
|
Loading…
Reference in New Issue
Block a user