@@ -384,7 +384,13 @@ class AstExprIndexName : public AstExpr
384384 LUAU_RTTI (AstExprIndexName)
385385
386386 AstExprIndexName (
387- const Location& location, AstExpr* expr, const AstName& index, const Location& indexLocation, const Position& opPosition, char op);
387+ const Location& location,
388+ AstExpr* expr,
389+ const AstName& index,
390+ const Location& indexLocation,
391+ const Position& opPosition,
392+ char op
393+ );
388394
389395 void visit (AstVisitor* visitor) override ;
390396
@@ -413,11 +419,22 @@ class AstExprFunction : public AstExpr
413419public:
414420 LUAU_RTTI (AstExprFunction)
415421
416- AstExprFunction (const Location& location, const AstArray<AstAttr*>& attributes, const AstArray<AstGenericType>& generics,
417- const AstArray<AstGenericTypePack>& genericPacks, AstLocal* self, const AstArray<AstLocal*>& args, bool vararg,
418- const Location& varargLocation, AstStatBlock* body, size_t functionDepth, const AstName& debugname,
419- const std::optional<AstTypeList>& returnAnnotation = {}, AstTypePack* varargAnnotation = nullptr ,
420- const std::optional<Location>& argLocation = std::nullopt );
422+ AstExprFunction (
423+ const Location& location,
424+ const AstArray<AstAttr*>& attributes,
425+ const AstArray<AstGenericType>& generics,
426+ const AstArray<AstGenericTypePack>& genericPacks,
427+ AstLocal* self,
428+ const AstArray<AstLocal*>& args,
429+ bool vararg,
430+ const Location& varargLocation,
431+ AstStatBlock* body,
432+ size_t functionDepth,
433+ const AstName& debugname,
434+ const std::optional<AstTypeList>& returnAnnotation = {},
435+ AstTypePack* varargAnnotation = nullptr ,
436+ const std::optional<Location>& argLocation = std::nullopt
437+ );
421438
422439 void visit (AstVisitor* visitor) override ;
423440
@@ -603,8 +620,14 @@ class AstStatIf : public AstStat
603620public:
604621 LUAU_RTTI (AstStatIf)
605622
606- AstStatIf (const Location& location, AstExpr* condition, AstStatBlock* thenbody, AstStat* elsebody, const std::optional<Location>& thenLocation,
607- const std::optional<Location>& elseLocation);
623+ AstStatIf (
624+ const Location& location,
625+ AstExpr* condition,
626+ AstStatBlock* thenbody,
627+ AstStat* elsebody,
628+ const std::optional<Location>& thenLocation,
629+ const std::optional<Location>& elseLocation
630+ );
608631
609632 void visit (AstVisitor* visitor) override ;
610633
@@ -698,8 +721,12 @@ class AstStatLocal : public AstStat
698721public:
699722 LUAU_RTTI (AstStatLocal)
700723
701- AstStatLocal (const Location& location, const AstArray<AstLocal*>& vars, const AstArray<AstExpr*>& values,
702- const std::optional<Location>& equalsSignLocation);
724+ AstStatLocal (
725+ const Location& location,
726+ const AstArray<AstLocal*>& vars,
727+ const AstArray<AstExpr*>& values,
728+ const std::optional<Location>& equalsSignLocation
729+ );
703730
704731 void visit (AstVisitor* visitor) override ;
705732
@@ -714,8 +741,16 @@ class AstStatFor : public AstStat
714741public:
715742 LUAU_RTTI (AstStatFor)
716743
717- AstStatFor (const Location& location, AstLocal* var, AstExpr* from, AstExpr* to, AstExpr* step, AstStatBlock* body, bool hasDo,
718- const Location& doLocation);
744+ AstStatFor (
745+ const Location& location,
746+ AstLocal* var,
747+ AstExpr* from,
748+ AstExpr* to,
749+ AstExpr* step,
750+ AstStatBlock* body,
751+ bool hasDo,
752+ const Location& doLocation
753+ );
719754
720755 void visit (AstVisitor* visitor) override ;
721756
@@ -734,8 +769,16 @@ class AstStatForIn : public AstStat
734769public:
735770 LUAU_RTTI (AstStatForIn)
736771
737- AstStatForIn (const Location& location, const AstArray<AstLocal*>& vars, const AstArray<AstExpr*>& values, AstStatBlock* body, bool hasIn,
738- const Location& inLocation, bool hasDo, const Location& doLocation);
772+ AstStatForIn (
773+ const Location& location,
774+ const AstArray<AstLocal*>& vars,
775+ const AstArray<AstExpr*>& values,
776+ AstStatBlock* body,
777+ bool hasIn,
778+ const Location& inLocation,
779+ bool hasDo,
780+ const Location& doLocation
781+ );
739782
740783 void visit (AstVisitor* visitor) override ;
741784
@@ -808,8 +851,15 @@ class AstStatTypeAlias : public AstStat
808851public:
809852 LUAU_RTTI (AstStatTypeAlias)
810853
811- AstStatTypeAlias (const Location& location, const AstName& name, const Location& nameLocation, const AstArray<AstGenericType>& generics,
812- const AstArray<AstGenericTypePack>& genericPacks, AstType* type, bool exported);
854+ AstStatTypeAlias (
855+ const Location& location,
856+ const AstName& name,
857+ const Location& nameLocation,
858+ const AstArray<AstGenericType>& generics,
859+ const AstArray<AstGenericTypePack>& genericPacks,
860+ AstType* type,
861+ bool exported
862+ );
813863
814864 void visit (AstVisitor* visitor) override ;
815865
@@ -821,6 +871,20 @@ class AstStatTypeAlias : public AstStat
821871 bool exported;
822872};
823873
874+ class AstStatTypeFunction : public AstStat
875+ {
876+ public:
877+ LUAU_RTTI (AstStatTypeFunction);
878+
879+ AstStatTypeFunction (const Location& location, const AstName& name, const Location& nameLocation, AstExprFunction* body);
880+
881+ void visit (AstVisitor* visitor) override ;
882+
883+ AstName name;
884+ Location nameLocation;
885+ AstExprFunction* body;
886+ };
887+
824888class AstStatDeclareGlobal : public AstStat
825889{
826890public:
@@ -840,13 +904,32 @@ class AstStatDeclareFunction : public AstStat
840904public:
841905 LUAU_RTTI (AstStatDeclareFunction)
842906
843- AstStatDeclareFunction (const Location& location, const AstName& name, const Location& nameLocation, const AstArray<AstGenericType>& generics,
844- const AstArray<AstGenericTypePack>& genericPacks, const AstTypeList& params, const AstArray<AstArgumentName>& paramNames, bool vararg,
845- const Location& varargLocation, const AstTypeList& retTypes);
846-
847- AstStatDeclareFunction (const Location& location, const AstArray<AstAttr*>& attributes, const AstName& name, const Location& nameLocation,
848- const AstArray<AstGenericType>& generics, const AstArray<AstGenericTypePack>& genericPacks, const AstTypeList& params,
849- const AstArray<AstArgumentName>& paramNames, bool vararg, const Location& varargLocation, const AstTypeList& retTypes);
907+ AstStatDeclareFunction (
908+ const Location& location,
909+ const AstName& name,
910+ const Location& nameLocation,
911+ const AstArray<AstGenericType>& generics,
912+ const AstArray<AstGenericTypePack>& genericPacks,
913+ const AstTypeList& params,
914+ const AstArray<AstArgumentName>& paramNames,
915+ bool vararg,
916+ const Location& varargLocation,
917+ const AstTypeList& retTypes
918+ );
919+
920+ AstStatDeclareFunction (
921+ const Location& location,
922+ const AstArray<AstAttr*>& attributes,
923+ const AstName& name,
924+ const Location& nameLocation,
925+ const AstArray<AstGenericType>& generics,
926+ const AstArray<AstGenericTypePack>& genericPacks,
927+ const AstTypeList& params,
928+ const AstArray<AstArgumentName>& paramNames,
929+ bool vararg,
930+ const Location& varargLocation,
931+ const AstTypeList& retTypes
932+ );
850933
851934
852935 void visit (AstVisitor* visitor) override ;
@@ -896,8 +979,13 @@ class AstStatDeclareClass : public AstStat
896979public:
897980 LUAU_RTTI (AstStatDeclareClass)
898981
899- AstStatDeclareClass (const Location& location, const AstName& name, std::optional<AstName> superName, const AstArray<AstDeclaredClassProp>& props,
900- AstTableIndexer* indexer = nullptr );
982+ AstStatDeclareClass (
983+ const Location& location,
984+ const AstName& name,
985+ std::optional<AstName> superName,
986+ const AstArray<AstDeclaredClassProp>& props,
987+ AstTableIndexer* indexer = nullptr
988+ );
901989
902990 void visit (AstVisitor* visitor) override ;
903991
@@ -934,8 +1022,15 @@ class AstTypeReference : public AstType
9341022public:
9351023 LUAU_RTTI (AstTypeReference)
9361024
937- AstTypeReference (const Location& location, std::optional<AstName> prefix, AstName name, std::optional<Location> prefixLocation,
938- const Location& nameLocation, bool hasParameterList = false , const AstArray<AstTypeOrPack>& parameters = {});
1025+ AstTypeReference (
1026+ const Location& location,
1027+ std::optional<AstName> prefix,
1028+ AstName name,
1029+ std::optional<Location> prefixLocation,
1030+ const Location& nameLocation,
1031+ bool hasParameterList = false ,
1032+ const AstArray<AstTypeOrPack>& parameters = {}
1033+ );
9391034
9401035 void visit (AstVisitor* visitor) override ;
9411036
@@ -974,12 +1069,24 @@ class AstTypeFunction : public AstType
9741069public:
9751070 LUAU_RTTI (AstTypeFunction)
9761071
977- AstTypeFunction (const Location& location, const AstArray<AstGenericType>& generics, const AstArray<AstGenericTypePack>& genericPacks,
978- const AstTypeList& argTypes, const AstArray<std::optional<AstArgumentName>>& argNames, const AstTypeList& returnTypes);
979-
980- AstTypeFunction (const Location& location, const AstArray<AstAttr*>& attributes, const AstArray<AstGenericType>& generics,
981- const AstArray<AstGenericTypePack>& genericPacks, const AstTypeList& argTypes, const AstArray<std::optional<AstArgumentName>>& argNames,
982- const AstTypeList& returnTypes);
1072+ AstTypeFunction (
1073+ const Location& location,
1074+ const AstArray<AstGenericType>& generics,
1075+ const AstArray<AstGenericTypePack>& genericPacks,
1076+ const AstTypeList& argTypes,
1077+ const AstArray<std::optional<AstArgumentName>>& argNames,
1078+ const AstTypeList& returnTypes
1079+ );
1080+
1081+ AstTypeFunction (
1082+ const Location& location,
1083+ const AstArray<AstAttr*>& attributes,
1084+ const AstArray<AstGenericType>& generics,
1085+ const AstArray<AstGenericTypePack>& genericPacks,
1086+ const AstTypeList& argTypes,
1087+ const AstArray<std::optional<AstArgumentName>>& argNames,
1088+ const AstTypeList& returnTypes
1089+ );
9831090
9841091 void visit (AstVisitor* visitor) override ;
9851092
@@ -1413,4 +1520,4 @@ struct hash<Luau::AstName>
14131520 }
14141521};
14151522
1416- } // namespace std
1523+ } // namespace std
0 commit comments