diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-05-31 20:24:31 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-05-31 20:34:23 -0700 |
commit | fb602e323d7ed710b725e9f942a6eaf03c4ab9f4 (patch) | |
tree | 674eaac0bafea569836fd695937b443de7cf9ed2 /perly.y | |
parent | 4ebc798659d1b2b92cfe1d21cb6a18cf64ce9f31 (diff) | |
download | perl-fb602e323d7ed710b725e9f942a6eaf03c4ab9f4.tar.gz |
Correct three sub call comments in perly.y
NOAMP is only emitted by toke.c when there are no parentheses. If
there is a parenthesis following a word, the lexer conjures up an '&'
token from nowhere.
Diffstat (limited to 'perly.y')
-rw-r--r-- | perly.y | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1219,12 +1219,12 @@ term : termbinop { $$ = $1; } | amper /* &foo; */ { $$ = newUNOP(OP_ENTERSUB, 0, scalar($1)); } - | amper '(' ')' /* &foo() */ + | amper '(' ')' /* &foo() or foo() */ { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar($1)); TOKEN_GETMAD($2,$$,'('); TOKEN_GETMAD($3,$$,')'); } - | amper '(' expr ')' /* &foo(@args) */ + | amper '(' expr ')' /* &foo(@args) or foo(@args) */ { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, $3, scalar($1))); @@ -1237,7 +1237,7 @@ term : termbinop token_getmad($4,op,')'); }); } - | NOAMP subname optlistexpr /* foo(@args) */ + | NOAMP subname optlistexpr /* foo @args (no parens) */ { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, op_append_elem(OP_LIST, $3, scalar($2))); TOKEN_GETMAD($1,$$,'o'); |