#define scan_subst(a) S_scan_subst(aTHX_ a)
#define scan_trans(a) S_scan_trans(aTHX_ a)
#define scan_word(a,b,c,d,e) S_scan_word(aTHX_ a,b,c,d,e)
-#define skipspace_flags(a,b) S_skipspace_flags(aTHX_ a,b)
+#define skipspace(a) S_skipspace(aTHX_ a)
#define sublex_done() S_sublex_done(aTHX)
#define sublex_push() S_sublex_push(aTHX)
#define sublex_start() S_sublex_start(aTHX)
#define PERL_ARGS_ASSERT_SCAN_WORD \
assert(s); assert(dest); assert(slp)
-STATIC char* S_skipspace_flags(pTHX_ char *s, U32 flags)
+STATIC char* S_skipspace(pTHX_ char *s)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_SKIPSPACE_FLAGS \
+#define PERL_ARGS_ASSERT_SKIPSPACE \
assert(s)
STATIC I32 S_sublex_done(pTHX)
=cut
*/
-#define LEX_NO_INCLINE 0x40000000
#define LEX_NO_NEXT_CHUNK 0x80000000
void
Perl_lex_read_space(pTHX_ U32 flags)
{
char *s, *bufend;
- const bool can_incline = !(flags & LEX_NO_INCLINE);
bool need_incline = 0;
- if (flags & ~(LEX_KEEP_PREVIOUS|LEX_NO_NEXT_CHUNK|LEX_NO_INCLINE))
+ if (flags & ~(LEX_KEEP_PREVIOUS|LEX_NO_NEXT_CHUNK))
Perl_croak(aTHX_ "Lexing code internal error (%s)", "lex_read_space");
#ifdef PERL_MAD
if (PL_skipwhite) {
} while (!(c == '\n' || (c == 0 && s == bufend)));
} else if (c == '\n') {
s++;
- if (can_incline) {
- PL_parser->linestart = s;
- if (s == bufend)
- need_incline = 1;
- else
- incline(s);
- }
+ PL_parser->linestart = s;
+ if (s == bufend)
+ need_incline = 1;
+ else
+ incline(s);
} else if (isSPACE(c)) {
s++;
} else if (c == 0 && s == bufend) {
if (flags & LEX_NO_NEXT_CHUNK)
break;
PL_parser->bufptr = s;
- if (can_incline) COPLINE_INC_WITH_HERELINES;
+ COPLINE_INC_WITH_HERELINES;
got_more = lex_next_chunk(flags);
- if (can_incline) CopLINE_dec(PL_curcop);
+ CopLINE_dec(PL_curcop);
s = PL_parser->bufptr;
bufend = PL_parser->bufend;
if (!got_more)
break;
- if (can_incline && need_incline && PL_parser->rsfp) {
+ if (need_incline && PL_parser->rsfp) {
incline(s);
need_incline = 0;
}
CopLINE_set(PL_curcop, line_num);
}
-#define skipspace(s) skipspace_flags(s, 0)
-
#ifdef PERL_MAD
/* skip space before PL_thistoken */
*/
STATIC char *
-S_skipspace_flags(pTHX_ char *s, U32 flags)
+S_skipspace(pTHX_ char *s)
{
#ifdef PERL_MAD
char *start = s;
#endif /* PERL_MAD */
- PERL_ARGS_ASSERT_SKIPSPACE_FLAGS;
+ PERL_ARGS_ASSERT_SKIPSPACE;
#ifdef PERL_MAD
if (PL_skipwhite) {
sv_free(PL_skipwhite);
} else {
STRLEN bufptr_pos = PL_bufptr - SvPVX(PL_linestr);
PL_bufptr = s;
- lex_read_space(flags | LEX_KEEP_PREVIOUS |
+ lex_read_space(LEX_KEEP_PREVIOUS |
(PL_sublex_info.sub_inwhat || PL_lex_state == LEX_FORMLINE ?
LEX_NO_NEXT_CHUNK : 0));
s = PL_bufptr;
/* Is this a word before a => operator? */
if (*d == '=' && d[1] == '>') {
- fat_arrow:
CLINE;
pl_yylval.opval
= (OP*)newSVOP(OP_CONST, 0,
}
}
- if (tmp && tmp != KEY___DATA__ && tmp != KEY___END__
- && (!anydelim || *s != '#')) {
- /* no override, and not s### either; skipspace is safe here
- * check for => on following line */
- STRLEN bufoff = PL_bufptr - SvPVX(PL_linestr);
- STRLEN soff = s - SvPVX(PL_linestr);
- s = skipspace_flags(s, LEX_NO_INCLINE);
- if (*s == '=' && s[1] == '>') goto fat_arrow;
- PL_bufptr = SvPVX(PL_linestr) + bufoff;
- s = SvPVX(PL_linestr) + soff;
- }
-
reserved_word:
switch (tmp) {