CGrammar: Do not use "result of the expression" for single terms

This commit is contained in:
Pragmatic Software 2014-07-10 01:23:19 +00:00
parent 4520be1a2c
commit fab1986a3e
2 changed files with 4 additions and 3 deletions

View File

@ -13,7 +13,7 @@ use warnings;
# These are set automatically by the build/commit script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 722,
BUILD_REVISION => 723,
BUILD_DATE => "2014-07-09",
};

View File

@ -623,10 +623,11 @@ rel_add_mul_shift_expression:
{ $return = $item{cast_expression}; }
| <leftop: cast_expression rel_mul_add_ex_op cast_expression>
{
if($arg{context} =~ /expression/) {
my $expression = join('', @{$item[1]});
if($arg{context} =~ /expression/ and $expression =~ / /) {
$return = 'the result of the expression ';
}
$return .= join('' , @{$item[1]});
$return .= $expression;
}
closure: