@@ -19,7 +19,6 @@ LUAU_FASTINTVARIABLE(LuauParseErrorLimit, 100)
1919// See docs/SyntaxChanges.md for an explanation.
2020LUAU_FASTFLAGVARIABLE(LuauSolverV2)
2121LUAU_DYNAMIC_FASTFLAGVARIABLE(DebugLuauReportReturnTypeVariadicWithTypeSuffix, false )
22- LUAU_FASTFLAGVARIABLE(LuauParametrizedAttributeSyntax)
2322LUAU_FASTFLAGVARIABLE(DebugLuauStringSingletonBasedOnQuotes)
2423LUAU_FASTFLAGVARIABLE(LuauAutocompleteAttributes)
2524
@@ -868,60 +867,10 @@ std::optional<AstAttr::Type> Parser::validateAttribute(
868867 return type;
869868}
870869
871- std::optional<AstAttr::Type> Parser::validateAttribute_DEPRECATED (const char * attributeName, const TempVector<AstAttr*>& attributes)
872- {
873- // check if the attribute name is valid
874- std::optional<AstAttr::Type> type;
875-
876- for (int i = 0 ; kAttributeEntries_DEPRECATED [i].name ; ++i)
877- {
878- if (strcmp (attributeName, kAttributeEntries_DEPRECATED [i].name ) == 0 )
879- {
880- type = kAttributeEntries_DEPRECATED [i].type ;
881- break ;
882- }
883- }
884-
885- if (!type)
886- {
887- if (strlen (attributeName) == 1 )
888- report (lexer.current ().location , " Attribute name is missing" );
889- else
890- report (lexer.current ().location , " Invalid attribute '%s'" , attributeName);
891- }
892- else
893- {
894- // check that attribute is not duplicated
895- for (const AstAttr* attr : attributes)
896- {
897- if (attr->type == *type)
898- report (lexer.current ().location , " Cannot duplicate attribute '%s'" , attributeName);
899- }
900- }
901-
902- return type;
903- }
904-
905870// attribute ::= '@' NAME
906871void Parser::parseAttribute (TempVector<AstAttr*>& attributes)
907872{
908873 AstArray<AstExpr*> empty;
909- if (!FFlag::LuauParametrizedAttributeSyntax)
910- {
911- LUAU_ASSERT (lexer.current ().type == Lexeme::Type::Attribute);
912-
913- Location loc = lexer.current ().location ;
914-
915- const char * name = lexer.current ().name ;
916- std::optional<AstAttr::Type> type = validateAttribute_DEPRECATED (name, attributes);
917-
918- nextLexeme ();
919-
920- if (type)
921- attributes.push_back (allocator.alloc <AstAttr>(loc, *type, empty));
922-
923- return ;
924- }
925874
926875 LUAU_ASSERT (lexer.current ().type == Lexeme::Type::Attribute || lexer.current ().type == Lexeme::Type::AttributeOpen);
927876
@@ -1034,7 +983,7 @@ AstArray<AstAttr*> Parser::parseAttributes()
1034983
1035984 TempVector<AstAttr*> attributes (scratchAttr);
1036985
1037- while (lexer.current ().type == Lexeme::Attribute || (FFlag::LuauParametrizedAttributeSyntax && lexer.current ().type == Lexeme::AttributeOpen) )
986+ while (lexer.current ().type == Lexeme::Attribute || lexer.current ().type == Lexeme::AttributeOpen)
1038987 parseAttribute (attributes);
1039988
1040989 return copy (attributes);
@@ -1442,8 +1391,7 @@ AstStat* Parser::parseDeclaration(const Location& start, const AstArray<AstAttr*
14421391 {
14431392 AstArray<AstAttr*> attributes{nullptr , 0 };
14441393
1445- if (lexer.current ().type == Lexeme::Attribute ||
1446- (FFlag::LuauParametrizedAttributeSyntax && lexer.current ().type == Lexeme::AttributeOpen))
1394+ if (lexer.current ().type == Lexeme::Attribute || lexer.current ().type == Lexeme::AttributeOpen)
14471395 {
14481396 attributes = Parser::parseAttributes ();
14491397
@@ -2566,7 +2514,7 @@ AstTypeOrPack Parser::parseSimpleType(bool allowPack, bool inDeclarationContext)
25662514
25672515 AstArray<AstAttr*> attributes{nullptr , 0 };
25682516
2569- if (lexer.current ().type == Lexeme::Attribute || (FFlag::LuauParametrizedAttributeSyntax && lexer.current ().type == Lexeme::AttributeOpen) )
2517+ if (lexer.current ().type == Lexeme::Attribute || lexer.current ().type == Lexeme::AttributeOpen)
25702518 {
25712519 if (!inDeclarationContext)
25722520 {
@@ -3213,7 +3161,7 @@ AstExpr* Parser::parseSimpleExpr()
32133161
32143162 AstArray<AstAttr*> attributes{nullptr , 0 };
32153163
3216- if (lexer.current ().type == Lexeme::Attribute || (FFlag::LuauParametrizedAttributeSyntax && lexer.current ().type == Lexeme::AttributeOpen) )
3164+ if (lexer.current ().type == Lexeme::Attribute || lexer.current ().type == Lexeme::AttributeOpen)
32173165 {
32183166 attributes = parseAttributes ();
32193167
0 commit comments