@@ -384,7 +384,13 @@ class AstExprIndexName : public AstExpr
384
384
LUAU_RTTI (AstExprIndexName)
385
385
386
386
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
+ );
388
394
389
395
void visit (AstVisitor* visitor) override ;
390
396
@@ -413,11 +419,22 @@ class AstExprFunction : public AstExpr
413
419
public:
414
420
LUAU_RTTI (AstExprFunction)
415
421
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
+ );
421
438
422
439
void visit (AstVisitor* visitor) override ;
423
440
@@ -603,8 +620,14 @@ class AstStatIf : public AstStat
603
620
public:
604
621
LUAU_RTTI (AstStatIf)
605
622
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
+ );
608
631
609
632
void visit (AstVisitor* visitor) override ;
610
633
@@ -698,8 +721,12 @@ class AstStatLocal : public AstStat
698
721
public:
699
722
LUAU_RTTI (AstStatLocal)
700
723
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
+ );
703
730
704
731
void visit (AstVisitor* visitor) override ;
705
732
@@ -714,8 +741,16 @@ class AstStatFor : public AstStat
714
741
public:
715
742
LUAU_RTTI (AstStatFor)
716
743
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
+ );
719
754
720
755
void visit (AstVisitor* visitor) override ;
721
756
@@ -734,8 +769,16 @@ class AstStatForIn : public AstStat
734
769
public:
735
770
LUAU_RTTI (AstStatForIn)
736
771
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
+ );
739
782
740
783
void visit (AstVisitor* visitor) override ;
741
784
@@ -808,8 +851,15 @@ class AstStatTypeAlias : public AstStat
808
851
public:
809
852
LUAU_RTTI (AstStatTypeAlias)
810
853
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
+ );
813
863
814
864
void visit (AstVisitor* visitor) override ;
815
865
@@ -821,6 +871,20 @@ class AstStatTypeAlias : public AstStat
821
871
bool exported;
822
872
};
823
873
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
+
824
888
class AstStatDeclareGlobal : public AstStat
825
889
{
826
890
public:
@@ -840,13 +904,32 @@ class AstStatDeclareFunction : public AstStat
840
904
public:
841
905
LUAU_RTTI (AstStatDeclareFunction)
842
906
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
+ );
850
933
851
934
852
935
void visit (AstVisitor* visitor) override ;
@@ -896,8 +979,13 @@ class AstStatDeclareClass : public AstStat
896
979
public:
897
980
LUAU_RTTI (AstStatDeclareClass)
898
981
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
+ );
901
989
902
990
void visit (AstVisitor* visitor) override ;
903
991
@@ -934,8 +1022,15 @@ class AstTypeReference : public AstType
934
1022
public:
935
1023
LUAU_RTTI (AstTypeReference)
936
1024
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
+ );
939
1034
940
1035
void visit (AstVisitor* visitor) override ;
941
1036
@@ -974,12 +1069,24 @@ class AstTypeFunction : public AstType
974
1069
public:
975
1070
LUAU_RTTI (AstTypeFunction)
976
1071
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
+ );
983
1090
984
1091
void visit (AstVisitor* visitor) override ;
985
1092
@@ -1413,4 +1520,4 @@ struct hash<Luau::AstName>
1413
1520
}
1414
1521
};
1415
1522
1416
- } // namespace std
1523
+ } // namespace std
0 commit comments