mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-04 18:09:31 +01:00
CGrammar: Improve chained assignment
This commit is contained in:
parent
c6e893a4fa
commit
0f5dbeda7a
@ -13,7 +13,7 @@ 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 => 634,
|
BUILD_REVISION => 635,
|
||||||
BUILD_DATE => "2014-06-12",
|
BUILD_DATE => "2014-06-12",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -404,7 +404,7 @@ assignment_expression:
|
|||||||
$return .= "${$item{assignment_operator}}[1] " if $assignment_expression !~ /the result of/;
|
$return .= "${$item{assignment_operator}}[1] " if $assignment_expression !~ /the result of/;
|
||||||
$return .= $assignment_expression;
|
$return .= $assignment_expression;
|
||||||
} else {
|
} else {
|
||||||
$return = "$item{unary_expression}, $assignment_operator $assignment_expression";
|
$return = "$item{unary_expression} $assignment_operator $assignment_expression";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
| conditional_expression[context => $arg{context}]
|
| conditional_expression[context => $arg{context}]
|
||||||
@ -427,7 +427,7 @@ assignment_operator:
|
|||||||
} elsif ($arg{context} eq 'for loop') {
|
} elsif ($arg{context} eq 'for loop') {
|
||||||
$return = ['assigning to', 'the value' ];
|
$return = ['assigning to', 'the value' ];
|
||||||
} else {
|
} else {
|
||||||
$return = ', which is assigned to be ';
|
$return = 'which is assigned to be';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
| '+='
|
| '+='
|
||||||
|
Loading…
Reference in New Issue
Block a user