mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 11:42:35 +01:00
CGrammar: _Static_assert: use "unless" instead of negating the condition
This commit is contained in:
parent
6295b0f503
commit
fbfc390b0c
@ -640,10 +640,7 @@ Static_assert:
|
||||
static_assert_declaration:
|
||||
Static_assert '(' constant_expression ',' string ')' ';'
|
||||
{
|
||||
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";
|
||||
$return = "Halt compilation and produce the diagnostic $item{string} unless $item{constant_expression}.\n";
|
||||
}
|
||||
|
||||
declaration_list:
|
||||
|
Loading…
Reference in New Issue
Block a user