mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-22 11:59:43 +01:00
applets/c2english: fix switch case labels
This commit is contained in:
parent
59b7ee7115
commit
eb301ea948
@ -424,7 +424,7 @@ labeled_statement:
|
|||||||
identifier ':' statement[context => 'label'] (';')(?)
|
identifier ':' statement[context => 'label'] (';')(?)
|
||||||
{ "Let there be a label $item{identifier}.\n$item{statement}" }
|
{ "Let there be a label $item{identifier}.\n$item{statement}" }
|
||||||
| ('case' constant_expression
|
| ('case' constant_expression
|
||||||
{ $item{constant_expression} }
|
{ $return = $item{constant_expression} }
|
||||||
':')(s)
|
':')(s)
|
||||||
{
|
{
|
||||||
my @items = @{$item[1]};
|
my @items = @{$item[1]};
|
||||||
@ -444,7 +444,7 @@ labeled_statement:
|
|||||||
} elsif (not length $statements and not $last) {
|
} elsif (not length $statements and not $last) {
|
||||||
$statements = "Do nothing.\n";
|
$statements = "Do nothing.\n";
|
||||||
}
|
}
|
||||||
$return = "If it has the value $item[-2], ^L$statements$last";
|
$return = "If it has the value $item[1]->[0], ^L$statements$last";
|
||||||
}
|
}
|
||||||
| 'default' ':' statement
|
| 'default' ':' statement
|
||||||
{ "In the default case, ^L$item{statement}" }
|
{ "In the default case, ^L$item{statement}" }
|
||||||
|
@ -25,8 +25,8 @@ use PBot::Imports;
|
|||||||
# These are set by the /misc/update_version script
|
# These are set by the /misc/update_version script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 4683,
|
BUILD_REVISION => 4685,
|
||||||
BUILD_DATE => "2023-08-19",
|
BUILD_DATE => "2023-09-21",
|
||||||
};
|
};
|
||||||
|
|
||||||
sub initialize {}
|
sub initialize {}
|
||||||
|
Loading…
Reference in New Issue
Block a user