summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
authorBranislav ZahradnĂ­k <barney@cpan.org>2020-12-11 17:19:08 +0100
committerKarl Williamson <khw@cpan.org>2020-12-27 09:46:09 -0700
commit3d92c6b8aa91a3ee216dd4aafedacd8b6e129803 (patch)
tree64ff928de2d72c03ead2982d33e788991b3f522b /perly.y
parent1c2e9449254ebd07b473cb641d8568dffc1ecbb0 (diff)
downloadperl-3d92c6b8aa91a3ee216dd4aafedacd8b6e129803.tar.gz
Distinguish C- and perly- literals - PERLY_TILDE
Diffstat (limited to 'perly.y')
-rw-r--r--perly.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/perly.y b/perly.y
index 4998d660c9..67bbda88ec 100644
--- a/perly.y
+++ b/perly.y
@@ -116,7 +116,7 @@
%left ADDOP
%left MULOP
%left <ival> MATCHOP
-%right <ival> PERLY_EXCLAMATION_MARK '~' UMINUS REFGEN
+%right <ival> PERLY_EXCLAMATION_MARK PERLY_TILDE UMINUS REFGEN
%right <ival> POWOP
%nonassoc <ival> PREINC PREDEC POSTINC POSTDEC POSTJOIN
%left <ival> ARROW
@@ -1102,8 +1102,8 @@ termunop : '-' term %prec UMINUS /* -$x */
| PERLY_EXCLAMATION_MARK term /* !$x */
{ $$ = newUNOP(OP_NOT, 0, scalar($term)); }
- | '~' term /* ~$x */
- { $$ = newUNOP($1, 0, scalar($term)); }
+ | PERLY_TILDE term /* ~$x */
+ { $$ = newUNOP($PERLY_TILDE, 0, scalar($term)); }
| term POSTINC /* $x++ */
{ $$ = newUNOP(OP_POSTINC, 0,
op_lvalue(scalar($term), OP_POSTINC)); }