summaryrefslogtreecommitdiff
path: root/parser.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-08-27 18:19:12 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-08-27 23:24:02 -0700
commit1f68b13b1aed0e70981ce2117cfd2a05b3d0baa0 (patch)
treebd0a6d27627693e2356bca23a896a677d695f2de /parser.h
parent78a635de15dde640c98d94757206df013d18a651 (diff)
downloadperl-1f68b13b1aed0e70981ce2117cfd2a05b3d0baa0.tar.gz
parser.h: Document copline with more detail
It took me a while to figure this out, so here it is for future readers.
Diffstat (limited to 'parser.h')
-rw-r--r--parser.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/parser.h b/parser.h
index 0e5a8e37a9..16b756f7f0 100644
--- a/parser.h
+++ b/parser.h
@@ -81,7 +81,11 @@ typedef struct yy_parser {
char *linestart; /* beginning of most recently read line */
char *last_uni; /* position of last named-unary op */
char *last_lop; /* position of last list operator */
- line_t copline; /* current line number */
+ /* copline is used to pass a specific line number to newSTATEOP. It
+ is a one-time line number, as newSTATEOP invalidates it (sets it to
+ NOLINE) after using it. The purpose of this is to report line num-
+ bers in multiline constructs using the number of the first line. */
+ line_t copline;
U16 in_my; /* we're compiling a "my"/"our" declaration */
U8 lex_state; /* next token is determined */
U8 error_count; /* how many compile errors so far, max 10 */