diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-09-06 23:45:36 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-09-07 18:34:36 -0700 |
commit | 801d32ac4fd337a99a83ad6098cda0f368bb8b03 (patch) | |
tree | db6cfbfcef96e47af34ae10c8c49b4e1f0ceaf93 /toke.c | |
parent | 2f92fb87980640b1a91069ce05dd7a0048838833 (diff) | |
download | perl-801d32ac4fd337a99a83ad6098cda0f368bb8b03.tar.gz |
toke.c: In sublex_push use multi_close to detect here-doc
It is a lot simpler this way. scan_heredoc already sets PL_multi_close
to '<' (the only code that does it). That value does not appear to
be used anywhere. Now it is.
Furthermore, this removes assumptions that the next commit will
likely violate.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -2594,13 +2594,9 @@ S_sublex_push(pTHX) { dVAR; LEXSHARED *shared; - const bool is_heredoc = - CopLINE(PL_curcop) == (line_t)PL_multi_start - 1; + const bool is_heredoc = PL_multi_close == '<'; ENTER; - assert(CopLINE(PL_curcop) == (line_t)PL_multi_start - || CopLINE(PL_curcop) == (line_t)PL_multi_start - 1); - PL_lex_state = PL_sublex_info.super_state; SAVEBOOL(PL_lex_dojoin); SAVEI32(PL_lex_brackets); |