Skip to content

Commit 03ebc77

Browse files
committed
toke.c: factor out static yyl_leftparen()
1 parent 941302e commit 03ebc77

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

toke.c

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6359,6 +6359,18 @@ yyl_tilde(pTHX_ char *s)
63596359
BCop(bof ? OP_NCOMPLEMENT : OP_COMPLEMENT);
63606360
}
63616361

6362+
static int
6363+
yyl_leftparen(pTHX_ char *s)
6364+
{
6365+
if (PL_last_lop == PL_oldoldbufptr || PL_last_uni == PL_oldoldbufptr)
6366+
PL_oldbufptr = PL_oldoldbufptr; /* allow print(STDOUT 123) */
6367+
else
6368+
PL_expect = XTERM;
6369+
s = skipspace(s);
6370+
PL_lex_allbrackets++;
6371+
TOKEN('(');
6372+
}
6373+
63626374
/*
63636375
yylex
63646376
@@ -7153,14 +7165,8 @@ Perl_yylex(pTHX)
71537165
return yyl_colon(aTHX_ s + 1);
71547166

71557167
case '(':
7156-
s++;
7157-
if (PL_last_lop == PL_oldoldbufptr || PL_last_uni == PL_oldoldbufptr)
7158-
PL_oldbufptr = PL_oldoldbufptr; /* allow print(STDOUT 123) */
7159-
else
7160-
PL_expect = XTERM;
7161-
s = skipspace(s);
7162-
PL_lex_allbrackets++;
7163-
TOKEN('(');
7168+
return yyl_leftparen(aTHX_ s + 1);
7169+
71647170
case ';':
71657171
if (!PL_lex_allbrackets && PL_lex_fakeeof >= LEX_FAKEEOF_NONEXPR)
71667172
TOKEN(0);

0 commit comments

Comments
 (0)