summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
authorBranislav ZahradnĂ­k <barney@cpan.org>2020-12-11 17:19:09 +0100
committerKarl Williamson <khw@cpan.org>2020-12-27 09:46:09 -0700
commit3d9ccdfc9c042f91d022df1227f4b05ddeca831c (patch)
tree003566736db9c024cb22cd450aeadf9fc5cbd515 /perly.y
parent3d92c6b8aa91a3ee216dd4aafedacd8b6e129803 (diff)
downloadperl-3d9ccdfc9c042f91d022df1227f4b05ddeca831c.tar.gz
Distinguish C- and perly- literals - PERLY_COLON
Diffstat (limited to 'perly.y')
-rw-r--r--perly.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/perly.y b/perly.y
index 67bbda88ec..b05536b23a 100644
--- a/perly.y
+++ b/perly.y
@@ -102,7 +102,7 @@
%nonassoc LSTOP LSTOPSUB
%left PERLY_COMMA
%right <ival> ASSIGNOP
-%right <ival> '?' ':'
+%right <ival> '?' PERLY_COLON
%nonassoc DOTDOT
%left <ival> OROR DORDOR
%left <ival> ANDAND
@@ -1158,7 +1158,7 @@ term[product] : termbinop
| termunop
| anonymous
| termdo
- | term[condition] '?' term[then] ':' term[else]
+ | term[condition] '?' term[then] PERLY_COLON term[else]
{ $$ = newCONDOP(0, $condition, $then, $else); }
| REFGEN term[operand] /* \$x, \@y, \%z */
{ $$ = newUNOP(OP_REFGEN, 0, $operand); }