mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-19 18:39:35 +01:00
CGrammar: Correct context for translation of "post-incremented" vs "increment by one"
This commit is contained in:
parent
26e8f1552c
commit
3a3827fe40
@ -13,8 +13,8 @@ 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 => 680,
|
BUILD_REVISION => 681,
|
||||||
BUILD_DATE => "2014-06-26",
|
BUILD_DATE => "2014-06-27",
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -965,7 +965,7 @@ postfix_productions:
|
|||||||
{
|
{
|
||||||
my $increment = join('',@{$item[-1]});
|
my $increment = join('',@{$item[-1]});
|
||||||
if ($increment) {
|
if ($increment) {
|
||||||
if($arg{context} eq 'struct access' or $arg{context} eq 'for increment statement') {
|
if($arg{context} eq 'struct access' or $arg{context} =~ /statement/) {
|
||||||
$return = ['increment', 'by one'];
|
$return = ['increment', 'by one'];
|
||||||
} else {
|
} else {
|
||||||
$return = "post-incremented $arg{primary_expression}";
|
$return = "post-incremented $arg{primary_expression}";
|
||||||
@ -976,7 +976,7 @@ postfix_productions:
|
|||||||
{
|
{
|
||||||
my $increment = join('',@{$item[-1]});
|
my $increment = join('',@{$item[-1]});
|
||||||
if ($increment) {
|
if ($increment) {
|
||||||
if($arg{context} eq 'struct access' or $arg{context} eq 'for increment statement') {
|
if($arg{context} eq 'struct access' or $arg{context} =~ /statement/) {
|
||||||
$return = ['decrement', 'by one'];
|
$return = ['decrement', 'by one'];
|
||||||
} else {
|
} else {
|
||||||
$return = "post-decremented $arg{primary_expression}";
|
$return = "post-decremented $arg{primary_expression}";
|
||||||
|
Loading…
Reference in New Issue
Block a user