summaryrefslogtreecommitdiff
path: root/parser.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2013-04-09 17:17:16 +0100
committerDavid Mitchell <davem@iabyn.com>2013-04-12 11:29:55 +0100
commit3a54fd60e3d777bf86f4eec331b79a61c23d8393 (patch)
tree09ca42e0a07d6bff9f76154f28fc911503959ffb /parser.h
parentc1789b9f89e17b99d728910cb490561f334c2033 (diff)
downloadperl-3a54fd60e3d777bf86f4eec331b79a61c23d8393.tar.gz
add lex_re_reparsing boolean to yy_parser struct
When re-parsing a pattern for run-time (?{}) code blocks, we end up with the EVAL_RE_REPARSING flag set in PL_in_eval. Currently we clear this flag as soon as scan_str() returns, to ensure that it's not set if we happen to parse further patterns (e.g. within the (?{ ... }) code itself. However, a soon-to-be-applied bugfix requires us to know the reparsing state beyond this point. To solve this, we add a new boolean flag to the parser struct, which is set from PL_in_eval in S_sublex_push() (with the old value being saved). This allows us to have the flag around for the entire pattern string parsing phase, without it affecting nested pattern compilation.
Diffstat (limited to 'parser.h')
-rw-r--r--parser.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/parser.h b/parser.h
index 05735bfe76..e7b887ec3b 100644
--- a/parser.h
+++ b/parser.h
@@ -71,7 +71,7 @@ typedef struct yy_parser {
char multi_open; /* delimiter of said string */
char multi_close; /* delimiter of said string */
bool preambled;
- /*** 8-bit hole ***/
+ bool lex_re_reparsing; /* we're doing G_RE_REPARSING */
I32 lex_allbrackets;/* (), [], {}, ?: bracket count */
SUBLEXINFO sublex_info;
LEXSHARED *lex_shared;