From: Father Chrysostomos Date: Fri, 20 Sep 2013 07:50:54 +0000 (-0700) Subject: Fix line nums when multiline ${expr} spans here-doc X-Git-Tag: upstream/5.20.0~1736 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8c29fccb2d2fd2d0d9fd6074018645febe1cb943;p=platform%2Fupstream%2Fperl.git Fix line nums when multiline ${expr} spans here-doc <herelines, which records how many line numbers to skip when next incrementing it (to skip past here-doc bodies). So save and restore that value, too. --- diff --git a/t/comp/parser.t b/t/comp/parser.t index 6578c74..8fd7e85 100644 --- a/t/comp/parser.t +++ b/t/comp/parser.t @@ -8,7 +8,7 @@ BEGIN { chdir 't'; } -print "1..167\n"; +print "1..168\n"; sub failed { my ($got, $expected, $name) = @_; @@ -634,5 +634,13 @@ ${; END check_line(627, 'line number after heredoc containing #line'); +#line 638 +<herelines; SSize_t bracket = -1; char funny = *s++; char *d = dest; @@ -9552,6 +9553,7 @@ S_scan_ident(pTHX_ char *s, char *dest, STRLEN destlen, I32 ck_uni) state such that the next thing to process is the opening { and */ s = SvPVX(PL_linestr) + bracket; /* let the parser handle it */ CopLINE_set(PL_curcop, orig_copline); + PL_parser->herelines = herelines; *dest = '\0'; } }