@@ -20,7 +20,6 @@ LUAU_FASTINTVARIABLE(LuauParseErrorLimit, 100)
2020LUAU_FASTFLAGVARIABLE(LuauSolverV2)
2121LUAU_FASTFLAGVARIABLE(LuauDeclareExternType)
2222LUAU_FASTFLAGVARIABLE(LuauParseStringIndexer)
23- LUAU_FASTFLAGVARIABLE(LuauStoreLocalAnnotationColonPositions)
2423LUAU_FASTFLAGVARIABLE(LuauCSTForReturnTypeFunctionTail)
2524LUAU_FASTFLAGVARIABLE(LuauParseAttributeFixUninit)
2625LUAU_DYNAMIC_FASTFLAGVARIABLE(DebugLuauReportReturnTypeVariadicWithTypeSuffix, false )
@@ -691,11 +690,7 @@ AstStat* Parser::parseFor()
691690 allocator.alloc <AstStatForIn>(Location (start, end), copy (vars), copy (values), body, hasIn, inLocation, hasDo, matchDo.location );
692691 if (options.storeCstData )
693692 {
694- if (FFlag::LuauStoreLocalAnnotationColonPositions)
695- cstNodeMap[node] =
696- allocator.alloc <CstStatForIn>(extractAnnotationColonPositions (names), varsCommaPosition, copy (valuesCommaPositions));
697- else
698- cstNodeMap[node] = allocator.alloc <CstStatForIn>(AstArray<Position>{}, varsCommaPosition, copy (valuesCommaPositions));
693+ cstNodeMap[node] = allocator.alloc <CstStatForIn>(extractAnnotationColonPositions (names), varsCommaPosition, copy (valuesCommaPositions));
699694 }
700695 return node;
701696 }
@@ -1019,11 +1014,7 @@ AstStat* Parser::parseLocal(const AstArray<AstAttr*>& attributes)
10191014 AstStatLocal* node = allocator.alloc <AstStatLocal>(Location (start, end), copy (vars), copy (values), equalsSignLocation);
10201015 if (options.storeCstData )
10211016 {
1022- if (FFlag::LuauStoreLocalAnnotationColonPositions)
1023- cstNodeMap[node] =
1024- allocator.alloc <CstStatLocal>(extractAnnotationColonPositions (names), varsCommaPositions, copy (valuesCommaPositions));
1025- else
1026- cstNodeMap[node] = allocator.alloc <CstStatLocal>(AstArray<Position>{}, varsCommaPositions, copy (valuesCommaPositions));
1017+ cstNodeMap[node] = allocator.alloc <CstStatLocal>(extractAnnotationColonPositions (names), varsCommaPositions, copy (valuesCommaPositions));
10271018 }
10281019
10291020 return node;
@@ -1608,17 +1599,11 @@ std::pair<AstExprFunction*, AstLocal*> Parser::parseFunctionBody(
16081599
16091600 if (lexer.current ().type != ' )' )
16101601 {
1611- if (FFlag::LuauStoreLocalAnnotationColonPositions)
1612- {
1613- if (cstNode)
1614- std::tie (vararg, varargLocation, varargAnnotation) =
1615- parseBindingList (args, /* allowDot3= */ true , &cstNode->argsCommaPositions , nullptr , &cstNode->varargAnnotationColonPosition );
1616- else
1617- std::tie (vararg, varargLocation, varargAnnotation) = parseBindingList (args, /* allowDot3= */ true );
1618- }
1619- else
1602+ if (cstNode)
16201603 std::tie (vararg, varargLocation, varargAnnotation) =
1621- parseBindingList (args, /* allowDot3= */ true , cstNode ? &cstNode->argsCommaPositions : nullptr );
1604+ parseBindingList (args, /* allowDot3= */ true , &cstNode->argsCommaPositions , nullptr , &cstNode->varargAnnotationColonPosition );
1605+ else
1606+ std::tie (vararg, varargLocation, varargAnnotation) = parseBindingList (args, /* allowDot3= */ true );
16221607 }
16231608
16241609 std::optional<Location> argLocation;
@@ -1676,8 +1661,7 @@ std::pair<AstExprFunction*, AstLocal*> Parser::parseFunctionBody(
16761661 if (options.storeCstData )
16771662 {
16781663 cstNode->functionKeywordPosition = matchFunction.location .begin ;
1679- if (FFlag::LuauStoreLocalAnnotationColonPositions)
1680- cstNode->argsAnnotationColonPositions = extractAnnotationColonPositions (args);
1664+ cstNode->argsAnnotationColonPositions = extractAnnotationColonPositions (args);
16811665 cstNodeMap[node] = cstNode;
16821666 }
16831667
@@ -1716,15 +1700,14 @@ Parser::Binding Parser::parseBinding()
17161700 Position colonPosition = lexer.current ().location .begin ;
17171701 AstType* annotation = parseOptionalType ();
17181702
1719- if (FFlag::LuauStoreLocalAnnotationColonPositions && options.storeCstData )
1703+ if (options.storeCstData )
17201704 return Binding (*name, annotation, colonPosition);
17211705 else
17221706 return Binding (*name, annotation);
17231707}
17241708
17251709AstArray<Position> Parser::extractAnnotationColonPositions (const TempVector<Binding>& bindings)
17261710{
1727- LUAU_ASSERT (FFlag::LuauStoreLocalAnnotationColonPositions);
17281711 TempVector<Position> annotationColonPositions (scratchPosition);
17291712 for (size_t i = 0 ; i < bindings.size (); ++i)
17301713 annotationColonPositions.push_back (bindings[i].colonPosition );
@@ -1755,7 +1738,7 @@ std::tuple<bool, Location, AstTypePack*> Parser::parseBindingList(
17551738 AstTypePack* tailAnnotation = nullptr ;
17561739 if (lexer.current ().type == ' :' )
17571740 {
1758- if (FFlag::LuauStoreLocalAnnotationColonPositions && varargAnnotationColonPosition)
1741+ if (varargAnnotationColonPosition)
17591742 *varargAnnotationColonPosition = lexer.current ().location .begin ;
17601743
17611744 nextLexeme ();
0 commit comments