This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Set PL_expect only once after curly subscripts
[perl5.git] / toke.c
diff --git a/toke.c b/toke.c
index 66e7d33..f78eaeb 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -5449,18 +5449,18 @@ Perl_yylex(pTHX)
                }
            }
            /* FALLTHROUGH */
-       case XATTRBLOCK:
-       case XBLOCK:
-           PL_lex_brackstack[PL_lex_brackets++] = XSTATE;
-           PL_lex_allbrackets++;
-           PL_expect = XSTATE;
-           break;
        case XATTRTERM:
        case XTERMBLOCK:
            PL_lex_brackstack[PL_lex_brackets++] = XOPERATOR;
            PL_lex_allbrackets++;
            PL_expect = XSTATE;
            break;
+       case XATTRBLOCK:
+       case XBLOCK:
+           PL_lex_brackstack[PL_lex_brackets++] = XSTATE;
+           PL_lex_allbrackets++;
+           PL_expect = XSTATE;
+           break;
        case XBLOCKTERM:
            PL_lex_brackstack[PL_lex_brackets++] = XTERM;
            PL_lex_allbrackets++;