diff options
author | Branislav ZahradnĂk <barney@cpan.org> | 2020-12-11 17:19:11 +0100 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-12-27 09:46:09 -0700 |
commit | 68a66a8beadf6521143536cc70b76b1127b141e7 (patch) | |
tree | 0d5592d0e0faa9df012a63bf59a96f1f17525e5f /toke.c | |
parent | a1ad62bfea2492db90c01a1b1dfe6612521d7c3a (diff) | |
download | perl-68a66a8beadf6521143536cc70b76b1127b141e7.tar.gz |
Distinguish C- and perly- literals - PERLY_MINUS
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 */ |