summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorBranislav ZahradnĂ­k <barney@cpan.org>2020-12-11 17:19:11 +0100
committerKarl Williamson <khw@cpan.org>2020-12-27 09:46:09 -0700
commit68a66a8beadf6521143536cc70b76b1127b141e7 (patch)
tree0d5592d0e0faa9df012a63bf59a96f1f17525e5f /toke.c
parenta1ad62bfea2492db90c01a1b1dfe6612521d7c3a (diff)
downloadperl-68a66a8beadf6521143536cc70b76b1127b141e7.tar.gz
Distinguish C- and perly- literals - PERLY_MINUS
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/toke.c b/toke.c
index 0535e8f9d0..65ed54058b 100644
--- a/toke.c
+++ b/toke.c
@@ -396,6 +396,7 @@ static struct debug_tokens {
DEBUG_TOKEN (IVAL, PERLY_DOT),
DEBUG_TOKEN (IVAL, PERLY_EQUAL_SIGN),
DEBUG_TOKEN (IVAL, PERLY_EXCLAMATION_MARK),
+ DEBUG_TOKEN (IVAL, PERLY_MINUS),
DEBUG_TOKEN (IVAL, PERLY_QUESTION_MARK),
DEBUG_TOKEN (IVAL, PERLY_SEMICOLON),
DEBUG_TOKEN (IVAL, PERLY_TILDE),
@@ -5549,7 +5550,7 @@ yyl_hyphen(pTHX_ char *s)
if (memBEGINs(s, (STRLEN) (PL_bufend - s), "=>")) {
s = force_word(PL_bufptr,BAREWORD,FALSE,FALSE);
DEBUG_T( { printbuf("### Saw unary minus before =>, forcing word %s\n", s); } );
- OPERATOR('-'); /* unary minus */
+ OPERATOR(PERLY_MINUS); /* unary minus */
}
switch (tmp) {
case 'r': ftst = OP_FTEREAD; break;
@@ -5650,7 +5651,7 @@ yyl_hyphen(pTHX_ char *s)
else {
if (isSPACE(*s) || !isSPACE(*PL_bufptr))
check_uni();
- OPERATOR('-'); /* unary minus */
+ OPERATOR(PERLY_MINUS); /* unary minus */
}
}
}
@@ -6030,7 +6031,7 @@ yyl_leftcurly(pTHX_ char *s, const U8 formbrack)
const char minus = (PL_tokenbuf[0] == '-');
s = force_word(s + minus, BAREWORD, FALSE, TRUE);
if (minus)
- force_next('-');
+ force_next(PERLY_MINUS);
}
}
/* FALLTHROUGH */