summaryrefslogtreecommitdiff
path: root/parser.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-08-29 08:41:41 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-08-30 18:18:07 -0700
commita7922135a13574b7c0cd4fa4acc00114f1197ab9 (patch)
tree0854ae3ca747b2e6a3416b534b2cb17569e12304 /parser.h
parent956be2d47c8be1238119303e892c672d5de736ad (diff)
downloadperl-a7922135a13574b7c0cd4fa4acc00114f1197ab9.tar.gz
toke.c:S_scan_heredoc: Put stream-based parser in else block
We currently have the code laid out like this: if (peek) { ... peek inside the parent linestr buffer } else if (eval) { ... grab the heredoc body from linestr ... } else start with an empty string for the heredoc body ... parse the body of the heredoc from the input stream ... The final bit is inside a while loop whose condition is never true after either of the first two branches of the if/else has executed. But the code is very hard to read, and it is difficult to fix bugs, as code cannot be added before the while loop, and the while loop condi- tion cannot change, without affecting heredocs in string eval. So put the final parser inside the else. Future commits will depend on this.
Diffstat (limited to 'parser.h')
0 files changed, 0 insertions, 0 deletions