diff options
author | Branislav ZahradnĂk <barney@cpan.org> | 2020-12-11 17:19:12 +0100 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-12-27 09:46:09 -0700 |
commit | 5776f3e52dc3d9bddaadfc7c058c4e18589018b3 (patch) | |
tree | 2e83f1b7587c11a73c7774010f2dd4d3bc367dec /perly.y | |
parent | 68a66a8beadf6521143536cc70b76b1127b141e7 (diff) | |
download | perl-5776f3e52dc3d9bddaadfc7c058c4e18589018b3.tar.gz |
Distinguish C- and perly- literals - PERLY_PLUS
Diffstat (limited to 'perly.y')
-rw-r--r-- | perly.y | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -45,7 +45,7 @@ %token <ival> GRAMPROG GRAMEXPR GRAMBLOCK GRAMBARESTMT GRAMFULLSTMT GRAMSTMTSEQ GRAMSUBSIGNATURE -%token <ival> '+' '@' '%' +%token <ival> '@' '%' %token <ival> PERLY_AMPERSAND %token <ival> PERLY_BRACE_OPEN %token <ival> PERLY_BRACE_CLOSE @@ -55,6 +55,7 @@ %token <ival> PERLY_DOT %token <ival> PERLY_EQUAL_SIGN %token <ival> PERLY_MINUS +%token <ival> PERLY_PLUS %token <ival> PERLY_SEMICOLON %token <opval> BAREWORD METHOD FUNCMETH THING PMFUNC PRIVATEREF QWLIST @@ -1098,7 +1099,7 @@ eqopchain: term[lhs] CHEQOP term[rhs] /* Unary operators and terms */ termunop : PERLY_MINUS term %prec UMINUS /* -$x */ { $$ = newUNOP(OP_NEGATE, 0, scalar($term)); } - | '+' term %prec UMINUS /* +$x */ + | PERLY_PLUS term %prec UMINUS /* +$x */ { $$ = $term; } | PERLY_EXCLAMATION_MARK term /* !$x */ |