#define DD_AM_LEXING DD_AM_LEXING_CHECK
#endif
-static OP *previous_op = NULL;
-
/* thing that decides whether we're dealing with a declarator */
int dd_is_declarator(pTHX_ char* name) {
/* requires SvIOK as well as TRUE since flags not being an int is useless */
if (!is_declarator_flag_ref
- || !SvIOK(*is_declarator_flag_ref)
+ || !SvIOK(*is_declarator_flag_ref)
|| !SvTRUE(*is_declarator_flag_ref))
return -1;
}
int dd_toke_scan_str(pTHX_ int offset) {
+ STRLEN remaining = sv_len(PL_linestr) - offset;
+ SV* line_copy = newSVsv(PL_linestr);
char* base_s = SvPVX(PL_linestr) + offset;
char* s = scan_str(base_s, FALSE, FALSE);
+ if (s != base_s && sv_len(PL_lex_stuff) > remaining) {
+ int ret = (s - SvPVX(PL_linestr)) + remaining;
+ sv_catsv(line_copy, PL_linestr);
+ dd_set_linestr(aTHX_ SvPV_nolen(line_copy));
+ SvREFCNT_dec(line_copy);
+ return ret;
+ }
return s - base_s;
}
PERL_UNUSED_VAR(user_data);
+ if (DD_HAVE_PARSER && PL_expect == XOPERATOR) {
+ return o;
+ }
+
/* if this is set, we just grabbed a delimited string or something,
not a bareword, so NO TOUCHY */
default:
break;
}
+
dd_linestr_callback(aTHX_ "const", name);
return o;