prism 0.18.0 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -1
  3. data/README.md +2 -1
  4. data/config.yml +188 -55
  5. data/docs/building.md +9 -2
  6. data/docs/configuration.md +10 -9
  7. data/docs/encoding.md +24 -56
  8. data/docs/local_variable_depth.md +229 -0
  9. data/docs/ruby_api.md +2 -0
  10. data/docs/serialization.md +18 -13
  11. data/ext/prism/api_node.c +337 -195
  12. data/ext/prism/extconf.rb +13 -7
  13. data/ext/prism/extension.c +96 -32
  14. data/ext/prism/extension.h +1 -1
  15. data/include/prism/ast.h +340 -137
  16. data/include/prism/defines.h +17 -0
  17. data/include/prism/diagnostic.h +11 -5
  18. data/include/prism/encoding.h +248 -0
  19. data/include/prism/options.h +2 -2
  20. data/include/prism/parser.h +62 -42
  21. data/include/prism/regexp.h +2 -2
  22. data/include/prism/util/pm_buffer.h +9 -1
  23. data/include/prism/util/pm_memchr.h +2 -2
  24. data/include/prism/util/pm_strpbrk.h +3 -3
  25. data/include/prism/version.h +2 -2
  26. data/include/prism.h +13 -15
  27. data/lib/prism/compiler.rb +12 -0
  28. data/lib/prism/debug.rb +9 -4
  29. data/lib/prism/desugar_compiler.rb +3 -3
  30. data/lib/prism/dispatcher.rb +56 -0
  31. data/lib/prism/dot_visitor.rb +476 -198
  32. data/lib/prism/dsl.rb +66 -46
  33. data/lib/prism/ffi.rb +16 -3
  34. data/lib/prism/lex_compat.rb +19 -9
  35. data/lib/prism/mutation_compiler.rb +20 -0
  36. data/lib/prism/node.rb +1173 -450
  37. data/lib/prism/node_ext.rb +41 -16
  38. data/lib/prism/parse_result.rb +12 -15
  39. data/lib/prism/ripper_compat.rb +49 -34
  40. data/lib/prism/serialize.rb +242 -212
  41. data/lib/prism/visitor.rb +12 -0
  42. data/lib/prism.rb +20 -4
  43. data/prism.gemspec +4 -10
  44. data/rbi/prism.rbi +605 -230
  45. data/rbi/prism_static.rbi +3 -0
  46. data/sig/prism.rbs +379 -124
  47. data/sig/prism_static.rbs +1 -0
  48. data/src/diagnostic.c +228 -222
  49. data/src/encoding.c +5137 -0
  50. data/src/node.c +66 -0
  51. data/src/options.c +21 -2
  52. data/src/prettyprint.c +806 -406
  53. data/src/prism.c +1092 -700
  54. data/src/regexp.c +3 -3
  55. data/src/serialize.c +227 -157
  56. data/src/util/pm_buffer.c +10 -1
  57. data/src/util/pm_memchr.c +1 -1
  58. data/src/util/pm_strpbrk.c +4 -4
  59. metadata +5 -11
  60. data/include/prism/enc/pm_encoding.h +0 -227
  61. data/src/enc/pm_big5.c +0 -116
  62. data/src/enc/pm_cp51932.c +0 -57
  63. data/src/enc/pm_euc_jp.c +0 -69
  64. data/src/enc/pm_gbk.c +0 -65
  65. data/src/enc/pm_shift_jis.c +0 -57
  66. data/src/enc/pm_tables.c +0 -2073
  67. data/src/enc/pm_unicode.c +0 -2369
  68. data/src/enc/pm_windows_31j.c +0 -57
data/rbi/prism.rbi CHANGED
@@ -165,14 +165,14 @@ end
165
165
  # return foo, bar, baz
166
166
  # ^^^^^^^^^^^^^
167
167
  class Prism::ArgumentsNode < Prism::Node
168
- sig { returns(T::Array[Prism::Node]) }
169
- def arguments; end
170
-
171
168
  sig { returns(Integer) }
172
169
  def flags; end
173
170
 
174
- sig { params(arguments: T::Array[Prism::Node], flags: Integer, location: Prism::Location).void }
175
- def initialize(arguments, flags, location); end
171
+ sig { returns(T::Array[Prism::Node]) }
172
+ def arguments; end
173
+
174
+ sig { params(flags: Integer, arguments: T::Array[Prism::Node], location: Prism::Location).void }
175
+ def initialize(flags, arguments, location); end
176
176
 
177
177
  sig { params(visitor: Prism::Visitor).void }
178
178
  def accept(visitor); end
@@ -190,7 +190,7 @@ class Prism::ArgumentsNode < Prism::Node
190
190
  def deconstruct_keys(keys); end
191
191
 
192
192
  sig { returns(T::Boolean) }
193
- def keyword_splat?; end
193
+ def contains_keyword_splat?; end
194
194
 
195
195
  sig { params(inspector: Prism::NodeInspector).returns(String) }
196
196
  def inspect(inspector); end
@@ -202,6 +202,9 @@ end
202
202
  # [1, 2, 3]
203
203
  # ^^^^^^^^^
204
204
  class Prism::ArrayNode < Prism::Node
205
+ sig { returns(Integer) }
206
+ def flags; end
207
+
205
208
  sig { returns(T::Array[Prism::Node]) }
206
209
  def elements; end
207
210
 
@@ -211,8 +214,8 @@ class Prism::ArrayNode < Prism::Node
211
214
  sig { returns(T.nilable(Prism::Location)) }
212
215
  def closing_loc; end
213
216
 
214
- sig { params(elements: T::Array[Prism::Node], opening_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location), location: Prism::Location).void }
215
- def initialize(elements, opening_loc, closing_loc, location); end
217
+ sig { params(flags: Integer, elements: T::Array[Prism::Node], opening_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location), location: Prism::Location).void }
218
+ def initialize(flags, elements, opening_loc, closing_loc, location); end
216
219
 
217
220
  sig { params(visitor: Prism::Visitor).void }
218
221
  def accept(visitor); end
@@ -229,6 +232,9 @@ class Prism::ArrayNode < Prism::Node
229
232
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
230
233
  def deconstruct_keys(keys); end
231
234
 
235
+ sig { returns(T::Boolean) }
236
+ def contains_splat?; end
237
+
232
238
  sig { returns(T.nilable(String)) }
233
239
  def opening; end
234
240
 
@@ -536,7 +542,10 @@ class Prism::BlockNode < Prism::Node
536
542
  sig { returns(T::Array[Symbol]) }
537
543
  def locals; end
538
544
 
539
- sig { returns(T.nilable(Prism::BlockParametersNode)) }
545
+ sig { returns(Integer) }
546
+ def locals_body_index; end
547
+
548
+ sig { returns(T.nilable(Prism::Node)) }
540
549
  def parameters; end
541
550
 
542
551
  sig { returns(T.nilable(Prism::Node)) }
@@ -548,8 +557,8 @@ class Prism::BlockNode < Prism::Node
548
557
  sig { returns(Prism::Location) }
549
558
  def closing_loc; end
550
559
 
551
- sig { params(locals: T::Array[Symbol], parameters: T.nilable(Prism::BlockParametersNode), body: T.nilable(Prism::Node), opening_loc: Prism::Location, closing_loc: Prism::Location, location: Prism::Location).void }
552
- def initialize(locals, parameters, body, opening_loc, closing_loc, location); end
560
+ sig { params(locals: T::Array[Symbol], locals_body_index: Integer, parameters: T.nilable(Prism::Node), body: T.nilable(Prism::Node), opening_loc: Prism::Location, closing_loc: Prism::Location, location: Prism::Location).void }
561
+ def initialize(locals, locals_body_index, parameters, body, opening_loc, closing_loc, location); end
553
562
 
554
563
  sig { params(visitor: Prism::Visitor).void }
555
564
  def accept(visitor); end
@@ -706,6 +715,9 @@ end
706
715
  # foo.bar &&= value
707
716
  # ^^^^^^^^^^^^^^^^^
708
717
  class Prism::CallAndWriteNode < Prism::Node
718
+ sig { returns(Integer) }
719
+ def flags; end
720
+
709
721
  sig { returns(T.nilable(Prism::Node)) }
710
722
  def receiver; end
711
723
 
@@ -715,9 +727,6 @@ class Prism::CallAndWriteNode < Prism::Node
715
727
  sig { returns(T.nilable(Prism::Location)) }
716
728
  def message_loc; end
717
729
 
718
- sig { returns(Integer) }
719
- def flags; end
720
-
721
730
  sig { returns(Symbol) }
722
731
  def read_name; end
723
732
 
@@ -730,8 +739,8 @@ class Prism::CallAndWriteNode < Prism::Node
730
739
  sig { returns(Prism::Node) }
731
740
  def value; end
732
741
 
733
- sig { params(receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), message_loc: T.nilable(Prism::Location), flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).void }
734
- def initialize(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator_loc, value, location); end
742
+ sig { params(flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), message_loc: T.nilable(Prism::Location), read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).void }
743
+ def initialize(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end
735
744
 
736
745
  sig { params(visitor: Prism::Visitor).void }
737
746
  def accept(visitor); end
@@ -748,18 +757,21 @@ class Prism::CallAndWriteNode < Prism::Node
748
757
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
749
758
  def deconstruct_keys(keys); end
750
759
 
751
- sig { returns(T.nilable(String)) }
752
- def call_operator; end
753
-
754
- sig { returns(T.nilable(String)) }
755
- def message; end
756
-
757
760
  sig { returns(T::Boolean) }
758
761
  def safe_navigation?; end
759
762
 
760
763
  sig { returns(T::Boolean) }
761
764
  def variable_call?; end
762
765
 
766
+ sig { returns(T::Boolean) }
767
+ def attribute_write?; end
768
+
769
+ sig { returns(T.nilable(String)) }
770
+ def call_operator; end
771
+
772
+ sig { returns(T.nilable(String)) }
773
+ def message; end
774
+
763
775
  sig { returns(String) }
764
776
  def operator; end
765
777
 
@@ -787,12 +799,18 @@ end
787
799
  # foo&.bar
788
800
  # ^^^^^^^^
789
801
  class Prism::CallNode < Prism::Node
802
+ sig { returns(Integer) }
803
+ def flags; end
804
+
790
805
  sig { returns(T.nilable(Prism::Node)) }
791
806
  def receiver; end
792
807
 
793
808
  sig { returns(T.nilable(Prism::Location)) }
794
809
  def call_operator_loc; end
795
810
 
811
+ sig { returns(Symbol) }
812
+ def name; end
813
+
796
814
  sig { returns(T.nilable(Prism::Location)) }
797
815
  def message_loc; end
798
816
 
@@ -808,14 +826,8 @@ class Prism::CallNode < Prism::Node
808
826
  sig { returns(T.nilable(Prism::Node)) }
809
827
  def block; end
810
828
 
811
- sig { returns(Integer) }
812
- def flags; end
813
-
814
- sig { returns(Symbol) }
815
- def name; end
816
-
817
- sig { params(receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), message_loc: T.nilable(Prism::Location), opening_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), closing_loc: T.nilable(Prism::Location), block: T.nilable(Prism::Node), flags: Integer, name: Symbol, location: Prism::Location).void }
818
- def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, block, flags, name, location); end
829
+ sig { params(flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), name: Symbol, message_loc: T.nilable(Prism::Location), opening_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), closing_loc: T.nilable(Prism::Location), block: T.nilable(Prism::Node), location: Prism::Location).void }
830
+ def initialize(flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location); end
819
831
 
820
832
  sig { params(visitor: Prism::Visitor).void }
821
833
  def accept(visitor); end
@@ -832,6 +844,15 @@ class Prism::CallNode < Prism::Node
832
844
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
833
845
  def deconstruct_keys(keys); end
834
846
 
847
+ sig { returns(T::Boolean) }
848
+ def safe_navigation?; end
849
+
850
+ sig { returns(T::Boolean) }
851
+ def variable_call?; end
852
+
853
+ sig { returns(T::Boolean) }
854
+ def attribute_write?; end
855
+
835
856
  sig { returns(T.nilable(String)) }
836
857
  def call_operator; end
837
858
 
@@ -844,12 +865,6 @@ class Prism::CallNode < Prism::Node
844
865
  sig { returns(T.nilable(String)) }
845
866
  def closing; end
846
867
 
847
- sig { returns(T::Boolean) }
848
- def safe_navigation?; end
849
-
850
- sig { returns(T::Boolean) }
851
- def variable_call?; end
852
-
853
868
  sig { params(inspector: Prism::NodeInspector).returns(String) }
854
869
  def inspect(inspector); end
855
870
  end
@@ -859,6 +874,9 @@ end
859
874
  # foo.bar += baz
860
875
  # ^^^^^^^^^^^^^^
861
876
  class Prism::CallOperatorWriteNode < Prism::Node
877
+ sig { returns(Integer) }
878
+ def flags; end
879
+
862
880
  sig { returns(T.nilable(Prism::Node)) }
863
881
  def receiver; end
864
882
 
@@ -868,9 +886,6 @@ class Prism::CallOperatorWriteNode < Prism::Node
868
886
  sig { returns(T.nilable(Prism::Location)) }
869
887
  def message_loc; end
870
888
 
871
- sig { returns(Integer) }
872
- def flags; end
873
-
874
889
  sig { returns(Symbol) }
875
890
  def read_name; end
876
891
 
@@ -886,8 +901,8 @@ class Prism::CallOperatorWriteNode < Prism::Node
886
901
  sig { returns(Prism::Node) }
887
902
  def value; end
888
903
 
889
- sig { params(receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), message_loc: T.nilable(Prism::Location), flags: Integer, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).void }
890
- def initialize(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator, operator_loc, value, location); end
904
+ sig { params(flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), message_loc: T.nilable(Prism::Location), read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).void }
905
+ def initialize(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, location); end
891
906
 
892
907
  sig { params(visitor: Prism::Visitor).void }
893
908
  def accept(visitor); end
@@ -904,18 +919,21 @@ class Prism::CallOperatorWriteNode < Prism::Node
904
919
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
905
920
  def deconstruct_keys(keys); end
906
921
 
907
- sig { returns(T.nilable(String)) }
908
- def call_operator; end
909
-
910
- sig { returns(T.nilable(String)) }
911
- def message; end
912
-
913
922
  sig { returns(T::Boolean) }
914
923
  def safe_navigation?; end
915
924
 
916
925
  sig { returns(T::Boolean) }
917
926
  def variable_call?; end
918
927
 
928
+ sig { returns(T::Boolean) }
929
+ def attribute_write?; end
930
+
931
+ sig { returns(T.nilable(String)) }
932
+ def call_operator; end
933
+
934
+ sig { returns(T.nilable(String)) }
935
+ def message; end
936
+
919
937
  sig { params(inspector: Prism::NodeInspector).returns(String) }
920
938
  def inspect(inspector); end
921
939
  end
@@ -925,6 +943,9 @@ end
925
943
  # foo.bar ||= value
926
944
  # ^^^^^^^^^^^^^^^^^
927
945
  class Prism::CallOrWriteNode < Prism::Node
946
+ sig { returns(Integer) }
947
+ def flags; end
948
+
928
949
  sig { returns(T.nilable(Prism::Node)) }
929
950
  def receiver; end
930
951
 
@@ -934,9 +955,6 @@ class Prism::CallOrWriteNode < Prism::Node
934
955
  sig { returns(T.nilable(Prism::Location)) }
935
956
  def message_loc; end
936
957
 
937
- sig { returns(Integer) }
938
- def flags; end
939
-
940
958
  sig { returns(Symbol) }
941
959
  def read_name; end
942
960
 
@@ -949,8 +967,8 @@ class Prism::CallOrWriteNode < Prism::Node
949
967
  sig { returns(Prism::Node) }
950
968
  def value; end
951
969
 
952
- sig { params(receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), message_loc: T.nilable(Prism::Location), flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).void }
953
- def initialize(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator_loc, value, location); end
970
+ sig { params(flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), message_loc: T.nilable(Prism::Location), read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).void }
971
+ def initialize(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end
954
972
 
955
973
  sig { params(visitor: Prism::Visitor).void }
956
974
  def accept(visitor); end
@@ -967,20 +985,88 @@ class Prism::CallOrWriteNode < Prism::Node
967
985
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
968
986
  def deconstruct_keys(keys); end
969
987
 
988
+ sig { returns(T::Boolean) }
989
+ def safe_navigation?; end
990
+
991
+ sig { returns(T::Boolean) }
992
+ def variable_call?; end
993
+
994
+ sig { returns(T::Boolean) }
995
+ def attribute_write?; end
996
+
970
997
  sig { returns(T.nilable(String)) }
971
998
  def call_operator; end
972
999
 
973
1000
  sig { returns(T.nilable(String)) }
974
1001
  def message; end
975
1002
 
1003
+ sig { returns(String) }
1004
+ def operator; end
1005
+
1006
+ sig { params(inspector: Prism::NodeInspector).returns(String) }
1007
+ def inspect(inspector); end
1008
+ end
1009
+
1010
+ # Represents assigning to a method call.
1011
+ #
1012
+ # foo.bar, = 1
1013
+ # ^^^^^^^
1014
+ #
1015
+ # begin
1016
+ # rescue => foo.bar
1017
+ # ^^^^^^^
1018
+ # end
1019
+ #
1020
+ # for foo.bar in baz do end
1021
+ # ^^^^^^^
1022
+ class Prism::CallTargetNode < Prism::Node
1023
+ sig { returns(Integer) }
1024
+ def flags; end
1025
+
1026
+ sig { returns(Prism::Node) }
1027
+ def receiver; end
1028
+
1029
+ sig { returns(Prism::Location) }
1030
+ def call_operator_loc; end
1031
+
1032
+ sig { returns(Symbol) }
1033
+ def name; end
1034
+
1035
+ sig { returns(Prism::Location) }
1036
+ def message_loc; end
1037
+
1038
+ sig { params(flags: Integer, receiver: Prism::Node, call_operator_loc: Prism::Location, name: Symbol, message_loc: Prism::Location, location: Prism::Location).void }
1039
+ def initialize(flags, receiver, call_operator_loc, name, message_loc, location); end
1040
+
1041
+ sig { params(visitor: Prism::Visitor).void }
1042
+ def accept(visitor); end
1043
+
1044
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
1045
+ def child_nodes; end
1046
+
1047
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
1048
+ def deconstruct; end
1049
+
1050
+ sig { params(params: T.untyped).returns(Prism::CallTargetNode) }
1051
+ def copy(**params); end
1052
+
1053
+ sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
1054
+ def deconstruct_keys(keys); end
1055
+
976
1056
  sig { returns(T::Boolean) }
977
1057
  def safe_navigation?; end
978
1058
 
979
1059
  sig { returns(T::Boolean) }
980
1060
  def variable_call?; end
981
1061
 
1062
+ sig { returns(T::Boolean) }
1063
+ def attribute_write?; end
1064
+
982
1065
  sig { returns(String) }
983
- def operator; end
1066
+ def call_operator; end
1067
+
1068
+ sig { returns(String) }
1069
+ def message; end
984
1070
 
985
1071
  sig { params(inspector: Prism::NodeInspector).returns(String) }
986
1072
  def inspect(inspector); end
@@ -1905,6 +1991,9 @@ class Prism::DefNode < Prism::Node
1905
1991
  sig { returns(T::Array[Symbol]) }
1906
1992
  def locals; end
1907
1993
 
1994
+ sig { returns(Integer) }
1995
+ def locals_body_index; end
1996
+
1908
1997
  sig { returns(Prism::Location) }
1909
1998
  def def_keyword_loc; end
1910
1999
 
@@ -1923,8 +2012,8 @@ class Prism::DefNode < Prism::Node
1923
2012
  sig { returns(T.nilable(Prism::Location)) }
1924
2013
  def end_keyword_loc; end
1925
2014
 
1926
- sig { params(name: Symbol, name_loc: Prism::Location, receiver: T.nilable(Prism::Node), parameters: T.nilable(Prism::ParametersNode), body: T.nilable(Prism::Node), locals: T::Array[Symbol], def_keyword_loc: Prism::Location, operator_loc: T.nilable(Prism::Location), lparen_loc: T.nilable(Prism::Location), rparen_loc: T.nilable(Prism::Location), equal_loc: T.nilable(Prism::Location), end_keyword_loc: T.nilable(Prism::Location), location: Prism::Location).void }
1927
- def initialize(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end
2015
+ sig { params(name: Symbol, name_loc: Prism::Location, receiver: T.nilable(Prism::Node), parameters: T.nilable(Prism::ParametersNode), body: T.nilable(Prism::Node), locals: T::Array[Symbol], locals_body_index: Integer, def_keyword_loc: Prism::Location, operator_loc: T.nilable(Prism::Location), lparen_loc: T.nilable(Prism::Location), rparen_loc: T.nilable(Prism::Location), equal_loc: T.nilable(Prism::Location), end_keyword_loc: T.nilable(Prism::Location), location: Prism::Location).void }
2016
+ def initialize(name, name_loc, receiver, parameters, body, locals, locals_body_index, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end
1928
2017
 
1929
2018
  sig { params(visitor: Prism::Visitor).void }
1930
2019
  def accept(visitor); end
@@ -2266,6 +2355,9 @@ end
2266
2355
  # baz if foo .. bar
2267
2356
  # ^^^^^^^^^^
2268
2357
  class Prism::FlipFlopNode < Prism::Node
2358
+ sig { returns(Integer) }
2359
+ def flags; end
2360
+
2269
2361
  sig { returns(T.nilable(Prism::Node)) }
2270
2362
  def left; end
2271
2363
 
@@ -2275,11 +2367,8 @@ class Prism::FlipFlopNode < Prism::Node
2275
2367
  sig { returns(Prism::Location) }
2276
2368
  def operator_loc; end
2277
2369
 
2278
- sig { returns(Integer) }
2279
- def flags; end
2280
-
2281
- sig { params(left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), operator_loc: Prism::Location, flags: Integer, location: Prism::Location).void }
2282
- def initialize(left, right, operator_loc, flags, location); end
2370
+ sig { params(flags: Integer, left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), operator_loc: Prism::Location, location: Prism::Location).void }
2371
+ def initialize(flags, left, right, operator_loc, location); end
2283
2372
 
2284
2373
  sig { params(visitor: Prism::Visitor).void }
2285
2374
  def accept(visitor); end
@@ -2296,12 +2385,12 @@ class Prism::FlipFlopNode < Prism::Node
2296
2385
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
2297
2386
  def deconstruct_keys(keys); end
2298
2387
 
2299
- sig { returns(String) }
2300
- def operator; end
2301
-
2302
2388
  sig { returns(T::Boolean) }
2303
2389
  def exclude_end?; end
2304
2390
 
2391
+ sig { returns(String) }
2392
+ def operator; end
2393
+
2305
2394
  sig { params(inspector: Prism::NodeInspector).returns(String) }
2306
2395
  def inspect(inspector); end
2307
2396
  end
@@ -2924,6 +3013,42 @@ class Prism::ImplicitNode < Prism::Node
2924
3013
  def inspect(inspector); end
2925
3014
  end
2926
3015
 
3016
+ # Represents using a trailing comma to indicate an implicit rest parameter.
3017
+ #
3018
+ # foo { |bar,| }
3019
+ # ^
3020
+ #
3021
+ # foo in [bar,]
3022
+ # ^
3023
+ #
3024
+ # for foo, in bar do end
3025
+ # ^
3026
+ #
3027
+ # foo, = bar
3028
+ # ^
3029
+ class Prism::ImplicitRestNode < Prism::Node
3030
+ sig { params(location: Prism::Location).void }
3031
+ def initialize(location); end
3032
+
3033
+ sig { params(visitor: Prism::Visitor).void }
3034
+ def accept(visitor); end
3035
+
3036
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
3037
+ def child_nodes; end
3038
+
3039
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
3040
+ def deconstruct; end
3041
+
3042
+ sig { params(params: T.untyped).returns(Prism::ImplicitRestNode) }
3043
+ def copy(**params); end
3044
+
3045
+ sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
3046
+ def deconstruct_keys(keys); end
3047
+
3048
+ sig { params(inspector: Prism::NodeInspector).returns(String) }
3049
+ def inspect(inspector); end
3050
+ end
3051
+
2927
3052
  # Represents the use of the `in` keyword in a case statement.
2928
3053
  #
2929
3054
  # case a; in b then c end
@@ -2974,6 +3099,9 @@ end
2974
3099
  # foo.bar[baz] &&= value
2975
3100
  # ^^^^^^^^^^^^^^^^^^^^^^
2976
3101
  class Prism::IndexAndWriteNode < Prism::Node
3102
+ sig { returns(Integer) }
3103
+ def flags; end
3104
+
2977
3105
  sig { returns(T.nilable(Prism::Node)) }
2978
3106
  def receiver; end
2979
3107
 
@@ -2992,17 +3120,14 @@ class Prism::IndexAndWriteNode < Prism::Node
2992
3120
  sig { returns(T.nilable(Prism::Node)) }
2993
3121
  def block; end
2994
3122
 
2995
- sig { returns(Integer) }
2996
- def flags; end
2997
-
2998
3123
  sig { returns(Prism::Location) }
2999
3124
  def operator_loc; end
3000
3125
 
3001
3126
  sig { returns(Prism::Node) }
3002
3127
  def value; end
3003
3128
 
3004
- sig { params(receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, block: T.nilable(Prism::Node), flags: Integer, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).void }
3005
- def initialize(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator_loc, value, location); end
3129
+ sig { params(flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, block: T.nilable(Prism::Node), operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).void }
3130
+ def initialize(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end
3006
3131
 
3007
3132
  sig { params(visitor: Prism::Visitor).void }
3008
3133
  def accept(visitor); end
@@ -3019,6 +3144,15 @@ class Prism::IndexAndWriteNode < Prism::Node
3019
3144
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
3020
3145
  def deconstruct_keys(keys); end
3021
3146
 
3147
+ sig { returns(T::Boolean) }
3148
+ def safe_navigation?; end
3149
+
3150
+ sig { returns(T::Boolean) }
3151
+ def variable_call?; end
3152
+
3153
+ sig { returns(T::Boolean) }
3154
+ def attribute_write?; end
3155
+
3022
3156
  sig { returns(T.nilable(String)) }
3023
3157
  def call_operator; end
3024
3158
 
@@ -3028,12 +3162,6 @@ class Prism::IndexAndWriteNode < Prism::Node
3028
3162
  sig { returns(String) }
3029
3163
  def closing; end
3030
3164
 
3031
- sig { returns(T::Boolean) }
3032
- def safe_navigation?; end
3033
-
3034
- sig { returns(T::Boolean) }
3035
- def variable_call?; end
3036
-
3037
3165
  sig { returns(String) }
3038
3166
  def operator; end
3039
3167
 
@@ -3046,6 +3174,9 @@ end
3046
3174
  # foo.bar[baz] += value
3047
3175
  # ^^^^^^^^^^^^^^^^^^^^^
3048
3176
  class Prism::IndexOperatorWriteNode < Prism::Node
3177
+ sig { returns(Integer) }
3178
+ def flags; end
3179
+
3049
3180
  sig { returns(T.nilable(Prism::Node)) }
3050
3181
  def receiver; end
3051
3182
 
@@ -3064,9 +3195,6 @@ class Prism::IndexOperatorWriteNode < Prism::Node
3064
3195
  sig { returns(T.nilable(Prism::Node)) }
3065
3196
  def block; end
3066
3197
 
3067
- sig { returns(Integer) }
3068
- def flags; end
3069
-
3070
3198
  sig { returns(Symbol) }
3071
3199
  def operator; end
3072
3200
 
@@ -3076,8 +3204,8 @@ class Prism::IndexOperatorWriteNode < Prism::Node
3076
3204
  sig { returns(Prism::Node) }
3077
3205
  def value; end
3078
3206
 
3079
- sig { params(receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, block: T.nilable(Prism::Node), flags: Integer, operator: Symbol, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).void }
3080
- def initialize(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator, operator_loc, value, location); end
3207
+ sig { params(flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, block: T.nilable(Prism::Node), operator: Symbol, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).void }
3208
+ def initialize(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, location); end
3081
3209
 
3082
3210
  sig { params(visitor: Prism::Visitor).void }
3083
3211
  def accept(visitor); end
@@ -3094,6 +3222,15 @@ class Prism::IndexOperatorWriteNode < Prism::Node
3094
3222
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
3095
3223
  def deconstruct_keys(keys); end
3096
3224
 
3225
+ sig { returns(T::Boolean) }
3226
+ def safe_navigation?; end
3227
+
3228
+ sig { returns(T::Boolean) }
3229
+ def variable_call?; end
3230
+
3231
+ sig { returns(T::Boolean) }
3232
+ def attribute_write?; end
3233
+
3097
3234
  sig { returns(T.nilable(String)) }
3098
3235
  def call_operator; end
3099
3236
 
@@ -3103,12 +3240,6 @@ class Prism::IndexOperatorWriteNode < Prism::Node
3103
3240
  sig { returns(String) }
3104
3241
  def closing; end
3105
3242
 
3106
- sig { returns(T::Boolean) }
3107
- def safe_navigation?; end
3108
-
3109
- sig { returns(T::Boolean) }
3110
- def variable_call?; end
3111
-
3112
3243
  sig { params(inspector: Prism::NodeInspector).returns(String) }
3113
3244
  def inspect(inspector); end
3114
3245
  end
@@ -3118,6 +3249,9 @@ end
3118
3249
  # foo.bar[baz] ||= value
3119
3250
  # ^^^^^^^^^^^^^^^^^^^^^^
3120
3251
  class Prism::IndexOrWriteNode < Prism::Node
3252
+ sig { returns(Integer) }
3253
+ def flags; end
3254
+
3121
3255
  sig { returns(T.nilable(Prism::Node)) }
3122
3256
  def receiver; end
3123
3257
 
@@ -3136,17 +3270,14 @@ class Prism::IndexOrWriteNode < Prism::Node
3136
3270
  sig { returns(T.nilable(Prism::Node)) }
3137
3271
  def block; end
3138
3272
 
3139
- sig { returns(Integer) }
3140
- def flags; end
3141
-
3142
3273
  sig { returns(Prism::Location) }
3143
3274
  def operator_loc; end
3144
3275
 
3145
3276
  sig { returns(Prism::Node) }
3146
3277
  def value; end
3147
3278
 
3148
- sig { params(receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, block: T.nilable(Prism::Node), flags: Integer, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).void }
3149
- def initialize(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator_loc, value, location); end
3279
+ sig { params(flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, block: T.nilable(Prism::Node), operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).void }
3280
+ def initialize(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end
3150
3281
 
3151
3282
  sig { params(visitor: Prism::Visitor).void }
3152
3283
  def accept(visitor); end
@@ -3163,6 +3294,15 @@ class Prism::IndexOrWriteNode < Prism::Node
3163
3294
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
3164
3295
  def deconstruct_keys(keys); end
3165
3296
 
3297
+ sig { returns(T::Boolean) }
3298
+ def safe_navigation?; end
3299
+
3300
+ sig { returns(T::Boolean) }
3301
+ def variable_call?; end
3302
+
3303
+ sig { returns(T::Boolean) }
3304
+ def attribute_write?; end
3305
+
3166
3306
  sig { returns(T.nilable(String)) }
3167
3307
  def call_operator; end
3168
3308
 
@@ -3172,14 +3312,76 @@ class Prism::IndexOrWriteNode < Prism::Node
3172
3312
  sig { returns(String) }
3173
3313
  def closing; end
3174
3314
 
3315
+ sig { returns(String) }
3316
+ def operator; end
3317
+
3318
+ sig { params(inspector: Prism::NodeInspector).returns(String) }
3319
+ def inspect(inspector); end
3320
+ end
3321
+
3322
+ # Represents assigning to an index.
3323
+ #
3324
+ # foo[bar], = 1
3325
+ # ^^^^^^^^
3326
+ #
3327
+ # begin
3328
+ # rescue => foo[bar]
3329
+ # ^^^^^^^^
3330
+ # end
3331
+ #
3332
+ # for foo[bar] in baz do end
3333
+ # ^^^^^^^^
3334
+ class Prism::IndexTargetNode < Prism::Node
3335
+ sig { returns(Integer) }
3336
+ def flags; end
3337
+
3338
+ sig { returns(Prism::Node) }
3339
+ def receiver; end
3340
+
3341
+ sig { returns(Prism::Location) }
3342
+ def opening_loc; end
3343
+
3344
+ sig { returns(T.nilable(Prism::ArgumentsNode)) }
3345
+ def arguments; end
3346
+
3347
+ sig { returns(Prism::Location) }
3348
+ def closing_loc; end
3349
+
3350
+ sig { returns(T.nilable(Prism::Node)) }
3351
+ def block; end
3352
+
3353
+ sig { params(flags: Integer, receiver: Prism::Node, opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, block: T.nilable(Prism::Node), location: Prism::Location).void }
3354
+ def initialize(flags, receiver, opening_loc, arguments, closing_loc, block, location); end
3355
+
3356
+ sig { params(visitor: Prism::Visitor).void }
3357
+ def accept(visitor); end
3358
+
3359
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
3360
+ def child_nodes; end
3361
+
3362
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
3363
+ def deconstruct; end
3364
+
3365
+ sig { params(params: T.untyped).returns(Prism::IndexTargetNode) }
3366
+ def copy(**params); end
3367
+
3368
+ sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
3369
+ def deconstruct_keys(keys); end
3370
+
3175
3371
  sig { returns(T::Boolean) }
3176
3372
  def safe_navigation?; end
3177
3373
 
3178
3374
  sig { returns(T::Boolean) }
3179
3375
  def variable_call?; end
3180
3376
 
3377
+ sig { returns(T::Boolean) }
3378
+ def attribute_write?; end
3379
+
3181
3380
  sig { returns(String) }
3182
- def operator; end
3381
+ def opening; end
3382
+
3383
+ sig { returns(String) }
3384
+ def closing; end
3183
3385
 
3184
3386
  sig { params(inspector: Prism::NodeInspector).returns(String) }
3185
3387
  def inspect(inspector); end
@@ -3443,10 +3645,10 @@ class Prism::IntegerNode < Prism::Node
3443
3645
  def binary?; end
3444
3646
 
3445
3647
  sig { returns(T::Boolean) }
3446
- def octal?; end
3648
+ def decimal?; end
3447
3649
 
3448
3650
  sig { returns(T::Boolean) }
3449
- def decimal?; end
3651
+ def octal?; end
3450
3652
 
3451
3653
  sig { returns(T::Boolean) }
3452
3654
  def hexadecimal?; end
@@ -3462,6 +3664,9 @@ end
3462
3664
  # if /foo #{bar} baz/ then end
3463
3665
  # ^^^^^^^^^^^^^^^^
3464
3666
  class Prism::InterpolatedMatchLastLineNode < Prism::Node
3667
+ sig { returns(Integer) }
3668
+ def flags; end
3669
+
3465
3670
  sig { returns(Prism::Location) }
3466
3671
  def opening_loc; end
3467
3672
 
@@ -3471,11 +3676,8 @@ class Prism::InterpolatedMatchLastLineNode < Prism::Node
3471
3676
  sig { returns(Prism::Location) }
3472
3677
  def closing_loc; end
3473
3678
 
3474
- sig { returns(Integer) }
3475
- def flags; end
3476
-
3477
- sig { params(opening_loc: Prism::Location, parts: T::Array[Prism::Node], closing_loc: Prism::Location, flags: Integer, location: Prism::Location).void }
3478
- def initialize(opening_loc, parts, closing_loc, flags, location); end
3679
+ sig { params(flags: Integer, opening_loc: Prism::Location, parts: T::Array[Prism::Node], closing_loc: Prism::Location, location: Prism::Location).void }
3680
+ def initialize(flags, opening_loc, parts, closing_loc, location); end
3479
3681
 
3480
3682
  sig { params(visitor: Prism::Visitor).void }
3481
3683
  def accept(visitor); end
@@ -3494,12 +3696,6 @@ class Prism::InterpolatedMatchLastLineNode < Prism::Node
3494
3696
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
3495
3697
  def deconstruct_keys(keys); end
3496
3698
 
3497
- sig { returns(String) }
3498
- def opening; end
3499
-
3500
- sig { returns(String) }
3501
- def closing; end
3502
-
3503
3699
  sig { returns(T::Boolean) }
3504
3700
  def ignore_case?; end
3505
3701
 
@@ -3524,6 +3720,21 @@ class Prism::InterpolatedMatchLastLineNode < Prism::Node
3524
3720
  sig { returns(T::Boolean) }
3525
3721
  def utf_8?; end
3526
3722
 
3723
+ sig { returns(T::Boolean) }
3724
+ def forced_utf8_encoding?; end
3725
+
3726
+ sig { returns(T::Boolean) }
3727
+ def forced_binary_encoding?; end
3728
+
3729
+ sig { returns(T::Boolean) }
3730
+ def forced_us_ascii_encoding?; end
3731
+
3732
+ sig { returns(String) }
3733
+ def opening; end
3734
+
3735
+ sig { returns(String) }
3736
+ def closing; end
3737
+
3527
3738
  sig { params(inspector: Prism::NodeInspector).returns(String) }
3528
3739
  def inspect(inspector); end
3529
3740
  end
@@ -3533,6 +3744,9 @@ end
3533
3744
  # /foo #{bar} baz/
3534
3745
  # ^^^^^^^^^^^^^^^^
3535
3746
  class Prism::InterpolatedRegularExpressionNode < Prism::Node
3747
+ sig { returns(Integer) }
3748
+ def flags; end
3749
+
3536
3750
  sig { returns(Prism::Location) }
3537
3751
  def opening_loc; end
3538
3752
 
@@ -3542,11 +3756,8 @@ class Prism::InterpolatedRegularExpressionNode < Prism::Node
3542
3756
  sig { returns(Prism::Location) }
3543
3757
  def closing_loc; end
3544
3758
 
3545
- sig { returns(Integer) }
3546
- def flags; end
3547
-
3548
- sig { params(opening_loc: Prism::Location, parts: T::Array[Prism::Node], closing_loc: Prism::Location, flags: Integer, location: Prism::Location).void }
3549
- def initialize(opening_loc, parts, closing_loc, flags, location); end
3759
+ sig { params(flags: Integer, opening_loc: Prism::Location, parts: T::Array[Prism::Node], closing_loc: Prism::Location, location: Prism::Location).void }
3760
+ def initialize(flags, opening_loc, parts, closing_loc, location); end
3550
3761
 
3551
3762
  sig { params(visitor: Prism::Visitor).void }
3552
3763
  def accept(visitor); end
@@ -3565,12 +3776,6 @@ class Prism::InterpolatedRegularExpressionNode < Prism::Node
3565
3776
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
3566
3777
  def deconstruct_keys(keys); end
3567
3778
 
3568
- sig { returns(String) }
3569
- def opening; end
3570
-
3571
- sig { returns(String) }
3572
- def closing; end
3573
-
3574
3779
  sig { returns(T::Boolean) }
3575
3780
  def ignore_case?; end
3576
3781
 
@@ -3595,6 +3800,21 @@ class Prism::InterpolatedRegularExpressionNode < Prism::Node
3595
3800
  sig { returns(T::Boolean) }
3596
3801
  def utf_8?; end
3597
3802
 
3803
+ sig { returns(T::Boolean) }
3804
+ def forced_utf8_encoding?; end
3805
+
3806
+ sig { returns(T::Boolean) }
3807
+ def forced_binary_encoding?; end
3808
+
3809
+ sig { returns(T::Boolean) }
3810
+ def forced_us_ascii_encoding?; end
3811
+
3812
+ sig { returns(String) }
3813
+ def opening; end
3814
+
3815
+ sig { returns(String) }
3816
+ def closing; end
3817
+
3598
3818
  sig { params(inspector: Prism::NodeInspector).returns(String) }
3599
3819
  def inspect(inspector); end
3600
3820
  end
@@ -3736,11 +3956,14 @@ end
3736
3956
  # foo(a: b)
3737
3957
  # ^^^^
3738
3958
  class Prism::KeywordHashNode < Prism::Node
3959
+ sig { returns(Integer) }
3960
+ def flags; end
3961
+
3739
3962
  sig { returns(T::Array[Prism::Node]) }
3740
3963
  def elements; end
3741
3964
 
3742
- sig { params(elements: T::Array[Prism::Node], location: Prism::Location).void }
3743
- def initialize(elements, location); end
3965
+ sig { params(flags: Integer, elements: T::Array[Prism::Node], location: Prism::Location).void }
3966
+ def initialize(flags, elements, location); end
3744
3967
 
3745
3968
  sig { params(visitor: Prism::Visitor).void }
3746
3969
  def accept(visitor); end
@@ -3757,6 +3980,9 @@ class Prism::KeywordHashNode < Prism::Node
3757
3980
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
3758
3981
  def deconstruct_keys(keys); end
3759
3982
 
3983
+ sig { returns(T::Boolean) }
3984
+ def static_keys?; end
3985
+
3760
3986
  sig { params(inspector: Prism::NodeInspector).returns(String) }
3761
3987
  def inspect(inspector); end
3762
3988
  end
@@ -3809,6 +4035,9 @@ class Prism::LambdaNode < Prism::Node
3809
4035
  sig { returns(T::Array[Symbol]) }
3810
4036
  def locals; end
3811
4037
 
4038
+ sig { returns(Integer) }
4039
+ def locals_body_index; end
4040
+
3812
4041
  sig { returns(Prism::Location) }
3813
4042
  def operator_loc; end
3814
4043
 
@@ -3818,14 +4047,14 @@ class Prism::LambdaNode < Prism::Node
3818
4047
  sig { returns(Prism::Location) }
3819
4048
  def closing_loc; end
3820
4049
 
3821
- sig { returns(T.nilable(Prism::BlockParametersNode)) }
4050
+ sig { returns(T.nilable(Prism::Node)) }
3822
4051
  def parameters; end
3823
4052
 
3824
4053
  sig { returns(T.nilable(Prism::Node)) }
3825
4054
  def body; end
3826
4055
 
3827
- sig { params(locals: T::Array[Symbol], operator_loc: Prism::Location, opening_loc: Prism::Location, closing_loc: Prism::Location, parameters: T.nilable(Prism::BlockParametersNode), body: T.nilable(Prism::Node), location: Prism::Location).void }
3828
- def initialize(locals, operator_loc, opening_loc, closing_loc, parameters, body, location); end
4056
+ sig { params(locals: T::Array[Symbol], locals_body_index: Integer, operator_loc: Prism::Location, opening_loc: Prism::Location, closing_loc: Prism::Location, parameters: T.nilable(Prism::Node), body: T.nilable(Prism::Node), location: Prism::Location).void }
4057
+ def initialize(locals, locals_body_index, operator_loc, opening_loc, closing_loc, parameters, body, location); end
3829
4058
 
3830
4059
  sig { params(visitor: Prism::Visitor).void }
3831
4060
  def accept(visitor); end
@@ -4110,6 +4339,9 @@ end
4110
4339
  # if /foo/i then end
4111
4340
  # ^^^^^^
4112
4341
  class Prism::MatchLastLineNode < Prism::Node
4342
+ sig { returns(Integer) }
4343
+ def flags; end
4344
+
4113
4345
  sig { returns(Prism::Location) }
4114
4346
  def opening_loc; end
4115
4347
 
@@ -4122,11 +4354,8 @@ class Prism::MatchLastLineNode < Prism::Node
4122
4354
  sig { returns(String) }
4123
4355
  def unescaped; end
4124
4356
 
4125
- sig { returns(Integer) }
4126
- def flags; end
4127
-
4128
- sig { params(opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, unescaped: String, flags: Integer, location: Prism::Location).void }
4129
- def initialize(opening_loc, content_loc, closing_loc, unescaped, flags, location); end
4357
+ sig { params(flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, unescaped: String, location: Prism::Location).void }
4358
+ def initialize(flags, opening_loc, content_loc, closing_loc, unescaped, location); end
4130
4359
 
4131
4360
  sig { params(visitor: Prism::Visitor).void }
4132
4361
  def accept(visitor); end
@@ -4143,15 +4372,6 @@ class Prism::MatchLastLineNode < Prism::Node
4143
4372
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
4144
4373
  def deconstruct_keys(keys); end
4145
4374
 
4146
- sig { returns(String) }
4147
- def opening; end
4148
-
4149
- sig { returns(String) }
4150
- def content; end
4151
-
4152
- sig { returns(String) }
4153
- def closing; end
4154
-
4155
4375
  sig { returns(T::Boolean) }
4156
4376
  def ignore_case?; end
4157
4377
 
@@ -4176,6 +4396,24 @@ class Prism::MatchLastLineNode < Prism::Node
4176
4396
  sig { returns(T::Boolean) }
4177
4397
  def utf_8?; end
4178
4398
 
4399
+ sig { returns(T::Boolean) }
4400
+ def forced_utf8_encoding?; end
4401
+
4402
+ sig { returns(T::Boolean) }
4403
+ def forced_binary_encoding?; end
4404
+
4405
+ sig { returns(T::Boolean) }
4406
+ def forced_us_ascii_encoding?; end
4407
+
4408
+ sig { returns(String) }
4409
+ def opening; end
4410
+
4411
+ sig { returns(String) }
4412
+ def content; end
4413
+
4414
+ sig { returns(String) }
4415
+ def closing; end
4416
+
4179
4417
  sig { params(inspector: Prism::NodeInspector).returns(String) }
4180
4418
  def inspect(inspector); end
4181
4419
  end
@@ -4576,6 +4814,37 @@ class Prism::NoKeywordsParameterNode < Prism::Node
4576
4814
  def inspect(inspector); end
4577
4815
  end
4578
4816
 
4817
+ # Represents an implicit set of parameters through the use of numbered
4818
+ # parameters within a block or lambda.
4819
+ #
4820
+ # -> { _1 + _2 }
4821
+ # ^^^^^^^^^^^^^^
4822
+ class Prism::NumberedParametersNode < Prism::Node
4823
+ sig { returns(Integer) }
4824
+ def maximum; end
4825
+
4826
+ sig { params(maximum: Integer, location: Prism::Location).void }
4827
+ def initialize(maximum, location); end
4828
+
4829
+ sig { params(visitor: Prism::Visitor).void }
4830
+ def accept(visitor); end
4831
+
4832
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
4833
+ def child_nodes; end
4834
+
4835
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
4836
+ def deconstruct; end
4837
+
4838
+ sig { params(params: T.untyped).returns(Prism::NumberedParametersNode) }
4839
+ def copy(**params); end
4840
+
4841
+ sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
4842
+ def deconstruct_keys(keys); end
4843
+
4844
+ sig { params(inspector: Prism::NodeInspector).returns(String) }
4845
+ def inspect(inspector); end
4846
+ end
4847
+
4579
4848
  # Represents reading a numbered reference to a capture in the previous match.
4580
4849
  #
4581
4850
  # $1
@@ -4737,7 +5006,7 @@ class Prism::ParametersNode < Prism::Node
4737
5006
  sig { returns(T::Array[Prism::Node]) }
4738
5007
  def optionals; end
4739
5008
 
4740
- sig { returns(T.nilable(Prism::RestParameterNode)) }
5009
+ sig { returns(T.nilable(Prism::Node)) }
4741
5010
  def rest; end
4742
5011
 
4743
5012
  sig { returns(T::Array[Prism::Node]) }
@@ -4752,7 +5021,7 @@ class Prism::ParametersNode < Prism::Node
4752
5021
  sig { returns(T.nilable(Prism::BlockParameterNode)) }
4753
5022
  def block; end
4754
5023
 
4755
- sig { params(requireds: T::Array[Prism::Node], optionals: T::Array[Prism::Node], rest: T.nilable(Prism::RestParameterNode), posts: T::Array[Prism::Node], keywords: T::Array[Prism::Node], keyword_rest: T.nilable(Prism::Node), block: T.nilable(Prism::BlockParameterNode), location: Prism::Location).void }
5024
+ sig { params(requireds: T::Array[Prism::Node], optionals: T::Array[Prism::Node], rest: T.nilable(Prism::Node), posts: T::Array[Prism::Node], keywords: T::Array[Prism::Node], keyword_rest: T.nilable(Prism::Node), block: T.nilable(Prism::BlockParameterNode), location: Prism::Location).void }
4756
5025
  def initialize(requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end
4757
5026
 
4758
5027
  sig { params(visitor: Prism::Visitor).void }
@@ -5038,6 +5307,9 @@ end
5038
5307
  # c if a =~ /left/ ... b =~ /right/
5039
5308
  # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5040
5309
  class Prism::RangeNode < Prism::Node
5310
+ sig { returns(Integer) }
5311
+ def flags; end
5312
+
5041
5313
  sig { returns(T.nilable(Prism::Node)) }
5042
5314
  def left; end
5043
5315
 
@@ -5047,11 +5319,8 @@ class Prism::RangeNode < Prism::Node
5047
5319
  sig { returns(Prism::Location) }
5048
5320
  def operator_loc; end
5049
5321
 
5050
- sig { returns(Integer) }
5051
- def flags; end
5052
-
5053
- sig { params(left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), operator_loc: Prism::Location, flags: Integer, location: Prism::Location).void }
5054
- def initialize(left, right, operator_loc, flags, location); end
5322
+ sig { params(flags: Integer, left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), operator_loc: Prism::Location, location: Prism::Location).void }
5323
+ def initialize(flags, left, right, operator_loc, location); end
5055
5324
 
5056
5325
  sig { params(visitor: Prism::Visitor).void }
5057
5326
  def accept(visitor); end
@@ -5068,12 +5337,12 @@ class Prism::RangeNode < Prism::Node
5068
5337
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
5069
5338
  def deconstruct_keys(keys); end
5070
5339
 
5071
- sig { returns(String) }
5072
- def operator; end
5073
-
5074
5340
  sig { returns(T::Boolean) }
5075
5341
  def exclude_end?; end
5076
5342
 
5343
+ sig { returns(String) }
5344
+ def operator; end
5345
+
5077
5346
  sig { params(inspector: Prism::NodeInspector).returns(String) }
5078
5347
  def inspect(inspector); end
5079
5348
  end
@@ -5140,6 +5409,9 @@ end
5140
5409
  # /foo/i
5141
5410
  # ^^^^^^
5142
5411
  class Prism::RegularExpressionNode < Prism::Node
5412
+ sig { returns(Integer) }
5413
+ def flags; end
5414
+
5143
5415
  sig { returns(Prism::Location) }
5144
5416
  def opening_loc; end
5145
5417
 
@@ -5152,11 +5424,8 @@ class Prism::RegularExpressionNode < Prism::Node
5152
5424
  sig { returns(String) }
5153
5425
  def unescaped; end
5154
5426
 
5155
- sig { returns(Integer) }
5156
- def flags; end
5157
-
5158
- sig { params(opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, unescaped: String, flags: Integer, location: Prism::Location).void }
5159
- def initialize(opening_loc, content_loc, closing_loc, unescaped, flags, location); end
5427
+ sig { params(flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, unescaped: String, location: Prism::Location).void }
5428
+ def initialize(flags, opening_loc, content_loc, closing_loc, unescaped, location); end
5160
5429
 
5161
5430
  sig { params(visitor: Prism::Visitor).void }
5162
5431
  def accept(visitor); end
@@ -5173,15 +5442,6 @@ class Prism::RegularExpressionNode < Prism::Node
5173
5442
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
5174
5443
  def deconstruct_keys(keys); end
5175
5444
 
5176
- sig { returns(String) }
5177
- def opening; end
5178
-
5179
- sig { returns(String) }
5180
- def content; end
5181
-
5182
- sig { returns(String) }
5183
- def closing; end
5184
-
5185
5445
  sig { returns(T::Boolean) }
5186
5446
  def ignore_case?; end
5187
5447
 
@@ -5206,6 +5466,24 @@ class Prism::RegularExpressionNode < Prism::Node
5206
5466
  sig { returns(T::Boolean) }
5207
5467
  def utf_8?; end
5208
5468
 
5469
+ sig { returns(T::Boolean) }
5470
+ def forced_utf8_encoding?; end
5471
+
5472
+ sig { returns(T::Boolean) }
5473
+ def forced_binary_encoding?; end
5474
+
5475
+ sig { returns(T::Boolean) }
5476
+ def forced_us_ascii_encoding?; end
5477
+
5478
+ sig { returns(String) }
5479
+ def opening; end
5480
+
5481
+ sig { returns(String) }
5482
+ def content; end
5483
+
5484
+ sig { returns(String) }
5485
+ def closing; end
5486
+
5209
5487
  sig { params(inspector: Prism::NodeInspector).returns(String) }
5210
5488
  def inspect(inspector); end
5211
5489
  end
@@ -5752,6 +6030,12 @@ class Prism::StringNode < Prism::Node
5752
6030
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
5753
6031
  def deconstruct_keys(keys); end
5754
6032
 
6033
+ sig { returns(T::Boolean) }
6034
+ def forced_utf8_encoding?; end
6035
+
6036
+ sig { returns(T::Boolean) }
6037
+ def forced_binary_encoding?; end
6038
+
5755
6039
  sig { returns(T::Boolean) }
5756
6040
  def frozen?; end
5757
6041
 
@@ -5830,6 +6114,9 @@ end
5830
6114
  # %i[foo]
5831
6115
  # ^^^
5832
6116
  class Prism::SymbolNode < Prism::Node
6117
+ sig { returns(Integer) }
6118
+ def flags; end
6119
+
5833
6120
  sig { returns(T.nilable(Prism::Location)) }
5834
6121
  def opening_loc; end
5835
6122
 
@@ -5842,8 +6129,8 @@ class Prism::SymbolNode < Prism::Node
5842
6129
  sig { returns(String) }
5843
6130
  def unescaped; end
5844
6131
 
5845
- sig { params(opening_loc: T.nilable(Prism::Location), value_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location), unescaped: String, location: Prism::Location).void }
5846
- def initialize(opening_loc, value_loc, closing_loc, unescaped, location); end
6132
+ sig { params(flags: Integer, opening_loc: T.nilable(Prism::Location), value_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location), unescaped: String, location: Prism::Location).void }
6133
+ def initialize(flags, opening_loc, value_loc, closing_loc, unescaped, location); end
5847
6134
 
5848
6135
  sig { params(visitor: Prism::Visitor).void }
5849
6136
  def accept(visitor); end
@@ -5860,6 +6147,15 @@ class Prism::SymbolNode < Prism::Node
5860
6147
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
5861
6148
  def deconstruct_keys(keys); end
5862
6149
 
6150
+ sig { returns(T::Boolean) }
6151
+ def forced_utf8_encoding?; end
6152
+
6153
+ sig { returns(T::Boolean) }
6154
+ def forced_binary_encoding?; end
6155
+
6156
+ sig { returns(T::Boolean) }
6157
+ def forced_us_ascii_encoding?; end
6158
+
5863
6159
  sig { returns(T.nilable(String)) }
5864
6160
  def opening; end
5865
6161
 
@@ -6003,6 +6299,9 @@ end
6003
6299
  # until foo do bar end
6004
6300
  # ^^^^^^^^^^^^^^^^^^^^
6005
6301
  class Prism::UntilNode < Prism::Node
6302
+ sig { returns(Integer) }
6303
+ def flags; end
6304
+
6006
6305
  sig { returns(Prism::Location) }
6007
6306
  def keyword_loc; end
6008
6307
 
@@ -6015,11 +6314,8 @@ class Prism::UntilNode < Prism::Node
6015
6314
  sig { returns(T.nilable(Prism::StatementsNode)) }
6016
6315
  def statements; end
6017
6316
 
6018
- sig { returns(Integer) }
6019
- def flags; end
6020
-
6021
- sig { params(keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, statements: T.nilable(Prism::StatementsNode), flags: Integer, location: Prism::Location).void }
6022
- def initialize(keyword_loc, closing_loc, predicate, statements, flags, location); end
6317
+ sig { params(flags: Integer, keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, statements: T.nilable(Prism::StatementsNode), location: Prism::Location).void }
6318
+ def initialize(flags, keyword_loc, closing_loc, predicate, statements, location); end
6023
6319
 
6024
6320
  sig { params(visitor: Prism::Visitor).void }
6025
6321
  def accept(visitor); end
@@ -6038,15 +6334,15 @@ class Prism::UntilNode < Prism::Node
6038
6334
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
6039
6335
  def deconstruct_keys(keys); end
6040
6336
 
6337
+ sig { returns(T::Boolean) }
6338
+ def begin_modifier?; end
6339
+
6041
6340
  sig { returns(String) }
6042
6341
  def keyword; end
6043
6342
 
6044
6343
  sig { returns(T.nilable(String)) }
6045
6344
  def closing; end
6046
6345
 
6047
- sig { returns(T::Boolean) }
6048
- def begin_modifier?; end
6049
-
6050
6346
  sig { params(inspector: Prism::NodeInspector).returns(String) }
6051
6347
  def inspect(inspector); end
6052
6348
  end
@@ -6100,6 +6396,9 @@ end
6100
6396
  # while foo do bar end
6101
6397
  # ^^^^^^^^^^^^^^^^^^^^
6102
6398
  class Prism::WhileNode < Prism::Node
6399
+ sig { returns(Integer) }
6400
+ def flags; end
6401
+
6103
6402
  sig { returns(Prism::Location) }
6104
6403
  def keyword_loc; end
6105
6404
 
@@ -6112,11 +6411,8 @@ class Prism::WhileNode < Prism::Node
6112
6411
  sig { returns(T.nilable(Prism::StatementsNode)) }
6113
6412
  def statements; end
6114
6413
 
6115
- sig { returns(Integer) }
6116
- def flags; end
6117
-
6118
- sig { params(keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, statements: T.nilable(Prism::StatementsNode), flags: Integer, location: Prism::Location).void }
6119
- def initialize(keyword_loc, closing_loc, predicate, statements, flags, location); end
6414
+ sig { params(flags: Integer, keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, statements: T.nilable(Prism::StatementsNode), location: Prism::Location).void }
6415
+ def initialize(flags, keyword_loc, closing_loc, predicate, statements, location); end
6120
6416
 
6121
6417
  sig { params(visitor: Prism::Visitor).void }
6122
6418
  def accept(visitor); end
@@ -6135,15 +6431,15 @@ class Prism::WhileNode < Prism::Node
6135
6431
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
6136
6432
  def deconstruct_keys(keys); end
6137
6433
 
6434
+ sig { returns(T::Boolean) }
6435
+ def begin_modifier?; end
6436
+
6138
6437
  sig { returns(String) }
6139
6438
  def keyword; end
6140
6439
 
6141
6440
  sig { returns(T.nilable(String)) }
6142
6441
  def closing; end
6143
6442
 
6144
- sig { returns(T::Boolean) }
6145
- def begin_modifier?; end
6146
-
6147
6443
  sig { params(inspector: Prism::NodeInspector).returns(String) }
6148
6444
  def inspect(inspector); end
6149
6445
  end
@@ -6153,6 +6449,9 @@ end
6153
6449
  # `foo`
6154
6450
  # ^^^^^
6155
6451
  class Prism::XStringNode < Prism::Node
6452
+ sig { returns(Integer) }
6453
+ def flags; end
6454
+
6156
6455
  sig { returns(Prism::Location) }
6157
6456
  def opening_loc; end
6158
6457
 
@@ -6165,8 +6464,8 @@ class Prism::XStringNode < Prism::Node
6165
6464
  sig { returns(String) }
6166
6465
  def unescaped; end
6167
6466
 
6168
- sig { params(opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, unescaped: String, location: Prism::Location).void }
6169
- def initialize(opening_loc, content_loc, closing_loc, unescaped, location); end
6467
+ sig { params(flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, unescaped: String, location: Prism::Location).void }
6468
+ def initialize(flags, opening_loc, content_loc, closing_loc, unescaped, location); end
6170
6469
 
6171
6470
  sig { params(visitor: Prism::Visitor).void }
6172
6471
  def accept(visitor); end
@@ -6183,6 +6482,12 @@ class Prism::XStringNode < Prism::Node
6183
6482
  sig { params(keys: T::Array[Symbol]).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) }
6184
6483
  def deconstruct_keys(keys); end
6185
6484
 
6485
+ sig { returns(T::Boolean) }
6486
+ def forced_utf8_encoding?; end
6487
+
6488
+ sig { returns(T::Boolean) }
6489
+ def forced_binary_encoding?; end
6490
+
6186
6491
  sig { returns(String) }
6187
6492
  def opening; end
6188
6493
 
@@ -6248,7 +6553,13 @@ end
6248
6553
  # Flags for arguments nodes.
6249
6554
  module Prism::ArgumentsNodeFlags
6250
6555
  # if arguments contain keyword splat
6251
- KEYWORD_SPLAT = T.let(1 << 0, Integer)
6556
+ CONTAINS_KEYWORD_SPLAT = T.let(1 << 0, Integer)
6557
+ end
6558
+
6559
+ # Flags for array nodes.
6560
+ module Prism::ArrayNodeFlags
6561
+ # if array contains splat nodes
6562
+ CONTAINS_SPLAT = T.let(1 << 0, Integer)
6252
6563
  end
6253
6564
 
6254
6565
  # Flags for call nodes.
@@ -6257,20 +6568,36 @@ module Prism::CallNodeFlags
6257
6568
  SAFE_NAVIGATION = T.let(1 << 0, Integer)
6258
6569
  # a call that could have been a local variable
6259
6570
  VARIABLE_CALL = T.let(1 << 1, Integer)
6571
+ # a call that is an attribute write, so the value being written should be returned
6572
+ ATTRIBUTE_WRITE = T.let(1 << 2, Integer)
6573
+ end
6574
+
6575
+ # Flags for nodes that have unescaped content.
6576
+ module Prism::EncodingFlags
6577
+ # internal bytes forced the encoding to UTF-8
6578
+ FORCED_UTF8_ENCODING = T.let(1 << 0, Integer)
6579
+ # internal bytes forced the encoding to binary
6580
+ FORCED_BINARY_ENCODING = T.let(1 << 1, Integer)
6260
6581
  end
6261
6582
 
6262
6583
  # Flags for integer nodes that correspond to the base of the integer.
6263
6584
  module Prism::IntegerBaseFlags
6264
6585
  # 0b prefix
6265
6586
  BINARY = T.let(1 << 0, Integer)
6266
- # 0o or 0 prefix
6267
- OCTAL = T.let(1 << 1, Integer)
6268
6587
  # 0d or no prefix
6269
- DECIMAL = T.let(1 << 2, Integer)
6588
+ DECIMAL = T.let(1 << 1, Integer)
6589
+ # 0o or 0 prefix
6590
+ OCTAL = T.let(1 << 2, Integer)
6270
6591
  # 0x prefix
6271
6592
  HEXADECIMAL = T.let(1 << 3, Integer)
6272
6593
  end
6273
6594
 
6595
+ # Flags for keyword hash nodes.
6596
+ module Prism::KeywordHashNodeFlags
6597
+ # a keyword hash which only has `AssocNode` elements all with static literal keys, which means the elements can be treated as keyword arguments
6598
+ STATIC_KEYS = T.let(1 << 0, Integer)
6599
+ end
6600
+
6274
6601
  # Flags for while and until loop nodes.
6275
6602
  module Prism::LoopFlags
6276
6603
  # a loop after a begin statement, so the body is executed first before the condition
@@ -6301,12 +6628,32 @@ module Prism::RegularExpressionFlags
6301
6628
  WINDOWS_31J = T.let(1 << 6, Integer)
6302
6629
  # u - forces the UTF-8 encoding
6303
6630
  UTF_8 = T.let(1 << 7, Integer)
6631
+ # internal bytes forced the encoding to UTF-8
6632
+ FORCED_UTF8_ENCODING = T.let(1 << 8, Integer)
6633
+ # internal bytes forced the encoding to binary
6634
+ FORCED_BINARY_ENCODING = T.let(1 << 9, Integer)
6635
+ # internal bytes forced the encoding to US-ASCII
6636
+ FORCED_US_ASCII_ENCODING = T.let(1 << 10, Integer)
6304
6637
  end
6305
6638
 
6306
6639
  # Flags for string nodes.
6307
6640
  module Prism::StringFlags
6641
+ # internal bytes forced the encoding to UTF-8
6642
+ FORCED_UTF8_ENCODING = T.let(1 << 0, Integer)
6643
+ # internal bytes forced the encoding to binary
6644
+ FORCED_BINARY_ENCODING = T.let(1 << 1, Integer)
6308
6645
  # frozen by virtue of a `frozen_string_literal` comment
6309
- FROZEN = T.let(1 << 0, Integer)
6646
+ FROZEN = T.let(1 << 2, Integer)
6647
+ end
6648
+
6649
+ # Flags for symbol nodes.
6650
+ module Prism::SymbolFlags
6651
+ # internal bytes forced the encoding to UTF-8
6652
+ FORCED_UTF8_ENCODING = T.let(1 << 0, Integer)
6653
+ # internal bytes forced the encoding to binary
6654
+ FORCED_BINARY_ENCODING = T.let(1 << 1, Integer)
6655
+ # internal bytes forced the encoding to US-ASCII
6656
+ FORCED_US_ASCII_ENCODING = T.let(1 << 2, Integer)
6310
6657
  end
6311
6658
 
6312
6659
 
@@ -6395,6 +6742,10 @@ class Prism::Visitor < Prism::BasicVisitor
6395
6742
  sig { params(node: Prism::CallOrWriteNode).void }
6396
6743
  def visit_call_or_write_node(node); end
6397
6744
 
6745
+ # Visit a CallTargetNode node
6746
+ sig { params(node: Prism::CallTargetNode).void }
6747
+ def visit_call_target_node(node); end
6748
+
6398
6749
  # Visit a CapturePatternNode node
6399
6750
  sig { params(node: Prism::CapturePatternNode).void }
6400
6751
  def visit_capture_pattern_node(node); end
@@ -6583,6 +6934,10 @@ class Prism::Visitor < Prism::BasicVisitor
6583
6934
  sig { params(node: Prism::ImplicitNode).void }
6584
6935
  def visit_implicit_node(node); end
6585
6936
 
6937
+ # Visit a ImplicitRestNode node
6938
+ sig { params(node: Prism::ImplicitRestNode).void }
6939
+ def visit_implicit_rest_node(node); end
6940
+
6586
6941
  # Visit a InNode node
6587
6942
  sig { params(node: Prism::InNode).void }
6588
6943
  def visit_in_node(node); end
@@ -6599,6 +6954,10 @@ class Prism::Visitor < Prism::BasicVisitor
6599
6954
  sig { params(node: Prism::IndexOrWriteNode).void }
6600
6955
  def visit_index_or_write_node(node); end
6601
6956
 
6957
+ # Visit a IndexTargetNode node
6958
+ sig { params(node: Prism::IndexTargetNode).void }
6959
+ def visit_index_target_node(node); end
6960
+
6602
6961
  # Visit a InstanceVariableAndWriteNode node
6603
6962
  sig { params(node: Prism::InstanceVariableAndWriteNode).void }
6604
6963
  def visit_instance_variable_and_write_node(node); end
@@ -6727,6 +7086,10 @@ class Prism::Visitor < Prism::BasicVisitor
6727
7086
  sig { params(node: Prism::NoKeywordsParameterNode).void }
6728
7087
  def visit_no_keywords_parameter_node(node); end
6729
7088
 
7089
+ # Visit a NumberedParametersNode node
7090
+ sig { params(node: Prism::NumberedParametersNode).void }
7091
+ def visit_numbered_parameters_node(node); end
7092
+
6730
7093
  # Visit a NumberedReferenceReadNode node
6731
7094
  sig { params(node: Prism::NumberedReferenceReadNode).void }
6732
7095
  def visit_numbered_reference_read_node(node); end
@@ -6908,11 +7271,11 @@ module Prism::DSL
6908
7271
  sig { params(left: Prism::Node, right: Prism::Node, operator_loc: Prism::Location, location: Prism::Location).returns(Prism::AndNode) }
6909
7272
  def AndNode(left, right, operator_loc, location); end
6910
7273
  # Create a new ArgumentsNode node
6911
- sig { params(arguments: T::Array[Prism::Node], flags: Integer, location: Prism::Location).returns(Prism::ArgumentsNode) }
6912
- def ArgumentsNode(arguments, flags, location); end
7274
+ sig { params(flags: Integer, arguments: T::Array[Prism::Node], location: Prism::Location).returns(Prism::ArgumentsNode) }
7275
+ def ArgumentsNode(flags, arguments, location); end
6913
7276
  # Create a new ArrayNode node
6914
- sig { params(elements: T::Array[Prism::Node], opening_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location), location: Prism::Location).returns(Prism::ArrayNode) }
6915
- def ArrayNode(elements, opening_loc, closing_loc, location); end
7277
+ sig { params(flags: Integer, elements: T::Array[Prism::Node], opening_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location), location: Prism::Location).returns(Prism::ArrayNode) }
7278
+ def ArrayNode(flags, elements, opening_loc, closing_loc, location); end
6916
7279
  # Create a new ArrayPatternNode node
6917
7280
  sig { params(constant: T.nilable(Prism::Node), requireds: T::Array[Prism::Node], rest: T.nilable(Prism::Node), posts: T::Array[Prism::Node], opening_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location), location: Prism::Location).returns(Prism::ArrayPatternNode) }
6918
7281
  def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, location); end
@@ -6935,8 +7298,8 @@ module Prism::DSL
6935
7298
  sig { params(name: Symbol, location: Prism::Location).returns(Prism::BlockLocalVariableNode) }
6936
7299
  def BlockLocalVariableNode(name, location); end
6937
7300
  # Create a new BlockNode node
6938
- sig { params(locals: T::Array[Symbol], parameters: T.nilable(Prism::BlockParametersNode), body: T.nilable(Prism::Node), opening_loc: Prism::Location, closing_loc: Prism::Location, location: Prism::Location).returns(Prism::BlockNode) }
6939
- def BlockNode(locals, parameters, body, opening_loc, closing_loc, location); end
7301
+ sig { params(locals: T::Array[Symbol], locals_body_index: Integer, parameters: T.nilable(Prism::Node), body: T.nilable(Prism::Node), opening_loc: Prism::Location, closing_loc: Prism::Location, location: Prism::Location).returns(Prism::BlockNode) }
7302
+ def BlockNode(locals, locals_body_index, parameters, body, opening_loc, closing_loc, location); end
6940
7303
  # Create a new BlockParameterNode node
6941
7304
  sig { params(name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), operator_loc: Prism::Location, location: Prism::Location).returns(Prism::BlockParameterNode) }
6942
7305
  def BlockParameterNode(name, name_loc, operator_loc, location); end
@@ -6947,17 +7310,20 @@ module Prism::DSL
6947
7310
  sig { params(arguments: T.nilable(Prism::ArgumentsNode), keyword_loc: Prism::Location, location: Prism::Location).returns(Prism::BreakNode) }
6948
7311
  def BreakNode(arguments, keyword_loc, location); end
6949
7312
  # Create a new CallAndWriteNode node
6950
- sig { params(receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), message_loc: T.nilable(Prism::Location), flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).returns(Prism::CallAndWriteNode) }
6951
- def CallAndWriteNode(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator_loc, value, location); end
7313
+ sig { params(flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), message_loc: T.nilable(Prism::Location), read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).returns(Prism::CallAndWriteNode) }
7314
+ def CallAndWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end
6952
7315
  # Create a new CallNode node
6953
- sig { params(receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), message_loc: T.nilable(Prism::Location), opening_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), closing_loc: T.nilable(Prism::Location), block: T.nilable(Prism::Node), flags: Integer, name: Symbol, location: Prism::Location).returns(Prism::CallNode) }
6954
- def CallNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, block, flags, name, location); end
7316
+ sig { params(flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), name: Symbol, message_loc: T.nilable(Prism::Location), opening_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), closing_loc: T.nilable(Prism::Location), block: T.nilable(Prism::Node), location: Prism::Location).returns(Prism::CallNode) }
7317
+ def CallNode(flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location); end
6955
7318
  # Create a new CallOperatorWriteNode node
6956
- sig { params(receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), message_loc: T.nilable(Prism::Location), flags: Integer, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).returns(Prism::CallOperatorWriteNode) }
6957
- def CallOperatorWriteNode(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator, operator_loc, value, location); end
7319
+ sig { params(flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), message_loc: T.nilable(Prism::Location), read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).returns(Prism::CallOperatorWriteNode) }
7320
+ def CallOperatorWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, location); end
6958
7321
  # Create a new CallOrWriteNode node
6959
- sig { params(receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), message_loc: T.nilable(Prism::Location), flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).returns(Prism::CallOrWriteNode) }
6960
- def CallOrWriteNode(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator_loc, value, location); end
7322
+ sig { params(flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), message_loc: T.nilable(Prism::Location), read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).returns(Prism::CallOrWriteNode) }
7323
+ def CallOrWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end
7324
+ # Create a new CallTargetNode node
7325
+ sig { params(flags: Integer, receiver: Prism::Node, call_operator_loc: Prism::Location, name: Symbol, message_loc: Prism::Location, location: Prism::Location).returns(Prism::CallTargetNode) }
7326
+ def CallTargetNode(flags, receiver, call_operator_loc, name, message_loc, location); end
6961
7327
  # Create a new CapturePatternNode node
6962
7328
  sig { params(value: Prism::Node, target: Prism::Node, operator_loc: Prism::Location, location: Prism::Location).returns(Prism::CapturePatternNode) }
6963
7329
  def CapturePatternNode(value, target, operator_loc, location); end
@@ -7025,8 +7391,8 @@ module Prism::DSL
7025
7391
  sig { params(name: Symbol, name_loc: Prism::Location, value: Prism::Node, operator_loc: Prism::Location, location: Prism::Location).returns(Prism::ConstantWriteNode) }
7026
7392
  def ConstantWriteNode(name, name_loc, value, operator_loc, location); end
7027
7393
  # Create a new DefNode node
7028
- sig { params(name: Symbol, name_loc: Prism::Location, receiver: T.nilable(Prism::Node), parameters: T.nilable(Prism::ParametersNode), body: T.nilable(Prism::Node), locals: T::Array[Symbol], def_keyword_loc: Prism::Location, operator_loc: T.nilable(Prism::Location), lparen_loc: T.nilable(Prism::Location), rparen_loc: T.nilable(Prism::Location), equal_loc: T.nilable(Prism::Location), end_keyword_loc: T.nilable(Prism::Location), location: Prism::Location).returns(Prism::DefNode) }
7029
- def DefNode(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end
7394
+ sig { params(name: Symbol, name_loc: Prism::Location, receiver: T.nilable(Prism::Node), parameters: T.nilable(Prism::ParametersNode), body: T.nilable(Prism::Node), locals: T::Array[Symbol], locals_body_index: Integer, def_keyword_loc: Prism::Location, operator_loc: T.nilable(Prism::Location), lparen_loc: T.nilable(Prism::Location), rparen_loc: T.nilable(Prism::Location), equal_loc: T.nilable(Prism::Location), end_keyword_loc: T.nilable(Prism::Location), location: Prism::Location).returns(Prism::DefNode) }
7395
+ def DefNode(name, name_loc, receiver, parameters, body, locals, locals_body_index, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end
7030
7396
  # Create a new DefinedNode node
7031
7397
  sig { params(lparen_loc: T.nilable(Prism::Location), value: Prism::Node, rparen_loc: T.nilable(Prism::Location), keyword_loc: Prism::Location, location: Prism::Location).returns(Prism::DefinedNode) }
7032
7398
  def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, location); end
@@ -7049,8 +7415,8 @@ module Prism::DSL
7049
7415
  sig { params(constant: T.nilable(Prism::Node), left: Prism::Node, requireds: T::Array[Prism::Node], right: Prism::Node, opening_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location), location: Prism::Location).returns(Prism::FindPatternNode) }
7050
7416
  def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, location); end
7051
7417
  # Create a new FlipFlopNode node
7052
- sig { params(left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), operator_loc: Prism::Location, flags: Integer, location: Prism::Location).returns(Prism::FlipFlopNode) }
7053
- def FlipFlopNode(left, right, operator_loc, flags, location); end
7418
+ sig { params(flags: Integer, left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), operator_loc: Prism::Location, location: Prism::Location).returns(Prism::FlipFlopNode) }
7419
+ def FlipFlopNode(flags, left, right, operator_loc, location); end
7054
7420
  # Create a new FloatNode node
7055
7421
  sig { params(location: Prism::Location).returns(Prism::FloatNode) }
7056
7422
  def FloatNode(location); end
@@ -7099,18 +7465,24 @@ module Prism::DSL
7099
7465
  # Create a new ImplicitNode node
7100
7466
  sig { params(value: Prism::Node, location: Prism::Location).returns(Prism::ImplicitNode) }
7101
7467
  def ImplicitNode(value, location); end
7468
+ # Create a new ImplicitRestNode node
7469
+ sig { params(location: Prism::Location).returns(Prism::ImplicitRestNode) }
7470
+ def ImplicitRestNode(location); end
7102
7471
  # Create a new InNode node
7103
7472
  sig { params(pattern: Prism::Node, statements: T.nilable(Prism::StatementsNode), in_loc: Prism::Location, then_loc: T.nilable(Prism::Location), location: Prism::Location).returns(Prism::InNode) }
7104
7473
  def InNode(pattern, statements, in_loc, then_loc, location); end
7105
7474
  # Create a new IndexAndWriteNode node
7106
- sig { params(receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, block: T.nilable(Prism::Node), flags: Integer, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).returns(Prism::IndexAndWriteNode) }
7107
- def IndexAndWriteNode(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator_loc, value, location); end
7475
+ sig { params(flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, block: T.nilable(Prism::Node), operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).returns(Prism::IndexAndWriteNode) }
7476
+ def IndexAndWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end
7108
7477
  # Create a new IndexOperatorWriteNode node
7109
- sig { params(receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, block: T.nilable(Prism::Node), flags: Integer, operator: Symbol, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).returns(Prism::IndexOperatorWriteNode) }
7110
- def IndexOperatorWriteNode(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator, operator_loc, value, location); end
7478
+ sig { params(flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, block: T.nilable(Prism::Node), operator: Symbol, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).returns(Prism::IndexOperatorWriteNode) }
7479
+ def IndexOperatorWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, location); end
7111
7480
  # Create a new IndexOrWriteNode node
7112
- sig { params(receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, block: T.nilable(Prism::Node), flags: Integer, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).returns(Prism::IndexOrWriteNode) }
7113
- def IndexOrWriteNode(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator_loc, value, location); end
7481
+ sig { params(flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, block: T.nilable(Prism::Node), operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).returns(Prism::IndexOrWriteNode) }
7482
+ def IndexOrWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end
7483
+ # Create a new IndexTargetNode node
7484
+ sig { params(flags: Integer, receiver: Prism::Node, opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, block: T.nilable(Prism::Node), location: Prism::Location).returns(Prism::IndexTargetNode) }
7485
+ def IndexTargetNode(flags, receiver, opening_loc, arguments, closing_loc, block, location); end
7114
7486
  # Create a new InstanceVariableAndWriteNode node
7115
7487
  sig { params(name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).returns(Prism::InstanceVariableAndWriteNode) }
7116
7488
  def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, location); end
@@ -7133,11 +7505,11 @@ module Prism::DSL
7133
7505
  sig { params(flags: Integer, location: Prism::Location).returns(Prism::IntegerNode) }
7134
7506
  def IntegerNode(flags, location); end
7135
7507
  # Create a new InterpolatedMatchLastLineNode node
7136
- sig { params(opening_loc: Prism::Location, parts: T::Array[Prism::Node], closing_loc: Prism::Location, flags: Integer, location: Prism::Location).returns(Prism::InterpolatedMatchLastLineNode) }
7137
- def InterpolatedMatchLastLineNode(opening_loc, parts, closing_loc, flags, location); end
7508
+ sig { params(flags: Integer, opening_loc: Prism::Location, parts: T::Array[Prism::Node], closing_loc: Prism::Location, location: Prism::Location).returns(Prism::InterpolatedMatchLastLineNode) }
7509
+ def InterpolatedMatchLastLineNode(flags, opening_loc, parts, closing_loc, location); end
7138
7510
  # Create a new InterpolatedRegularExpressionNode node
7139
- sig { params(opening_loc: Prism::Location, parts: T::Array[Prism::Node], closing_loc: Prism::Location, flags: Integer, location: Prism::Location).returns(Prism::InterpolatedRegularExpressionNode) }
7140
- def InterpolatedRegularExpressionNode(opening_loc, parts, closing_loc, flags, location); end
7511
+ sig { params(flags: Integer, opening_loc: Prism::Location, parts: T::Array[Prism::Node], closing_loc: Prism::Location, location: Prism::Location).returns(Prism::InterpolatedRegularExpressionNode) }
7512
+ def InterpolatedRegularExpressionNode(flags, opening_loc, parts, closing_loc, location); end
7141
7513
  # Create a new InterpolatedStringNode node
7142
7514
  sig { params(opening_loc: T.nilable(Prism::Location), parts: T::Array[Prism::Node], closing_loc: T.nilable(Prism::Location), location: Prism::Location).returns(Prism::InterpolatedStringNode) }
7143
7515
  def InterpolatedStringNode(opening_loc, parts, closing_loc, location); end
@@ -7148,14 +7520,14 @@ module Prism::DSL
7148
7520
  sig { params(opening_loc: Prism::Location, parts: T::Array[Prism::Node], closing_loc: Prism::Location, location: Prism::Location).returns(Prism::InterpolatedXStringNode) }
7149
7521
  def InterpolatedXStringNode(opening_loc, parts, closing_loc, location); end
7150
7522
  # Create a new KeywordHashNode node
7151
- sig { params(elements: T::Array[Prism::Node], location: Prism::Location).returns(Prism::KeywordHashNode) }
7152
- def KeywordHashNode(elements, location); end
7523
+ sig { params(flags: Integer, elements: T::Array[Prism::Node], location: Prism::Location).returns(Prism::KeywordHashNode) }
7524
+ def KeywordHashNode(flags, elements, location); end
7153
7525
  # Create a new KeywordRestParameterNode node
7154
7526
  sig { params(name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), operator_loc: Prism::Location, location: Prism::Location).returns(Prism::KeywordRestParameterNode) }
7155
7527
  def KeywordRestParameterNode(name, name_loc, operator_loc, location); end
7156
7528
  # Create a new LambdaNode node
7157
- sig { params(locals: T::Array[Symbol], operator_loc: Prism::Location, opening_loc: Prism::Location, closing_loc: Prism::Location, parameters: T.nilable(Prism::BlockParametersNode), body: T.nilable(Prism::Node), location: Prism::Location).returns(Prism::LambdaNode) }
7158
- def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, location); end
7529
+ sig { params(locals: T::Array[Symbol], locals_body_index: Integer, operator_loc: Prism::Location, opening_loc: Prism::Location, closing_loc: Prism::Location, parameters: T.nilable(Prism::Node), body: T.nilable(Prism::Node), location: Prism::Location).returns(Prism::LambdaNode) }
7530
+ def LambdaNode(locals, locals_body_index, operator_loc, opening_loc, closing_loc, parameters, body, location); end
7159
7531
  # Create a new LocalVariableAndWriteNode node
7160
7532
  sig { params(name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, name: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableAndWriteNode) }
7161
7533
  def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, location); end
@@ -7175,8 +7547,8 @@ module Prism::DSL
7175
7547
  sig { params(name: Symbol, depth: Integer, name_loc: Prism::Location, value: Prism::Node, operator_loc: Prism::Location, location: Prism::Location).returns(Prism::LocalVariableWriteNode) }
7176
7548
  def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, location); end
7177
7549
  # Create a new MatchLastLineNode node
7178
- sig { params(opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, unescaped: String, flags: Integer, location: Prism::Location).returns(Prism::MatchLastLineNode) }
7179
- def MatchLastLineNode(opening_loc, content_loc, closing_loc, unescaped, flags, location); end
7550
+ sig { params(flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, unescaped: String, location: Prism::Location).returns(Prism::MatchLastLineNode) }
7551
+ def MatchLastLineNode(flags, opening_loc, content_loc, closing_loc, unescaped, location); end
7180
7552
  # Create a new MatchPredicateNode node
7181
7553
  sig { params(value: Prism::Node, pattern: Prism::Node, operator_loc: Prism::Location, location: Prism::Location).returns(Prism::MatchPredicateNode) }
7182
7554
  def MatchPredicateNode(value, pattern, operator_loc, location); end
@@ -7207,6 +7579,9 @@ module Prism::DSL
7207
7579
  # Create a new NoKeywordsParameterNode node
7208
7580
  sig { params(operator_loc: Prism::Location, keyword_loc: Prism::Location, location: Prism::Location).returns(Prism::NoKeywordsParameterNode) }
7209
7581
  def NoKeywordsParameterNode(operator_loc, keyword_loc, location); end
7582
+ # Create a new NumberedParametersNode node
7583
+ sig { params(maximum: Integer, location: Prism::Location).returns(Prism::NumberedParametersNode) }
7584
+ def NumberedParametersNode(maximum, location); end
7210
7585
  # Create a new NumberedReferenceReadNode node
7211
7586
  sig { params(number: Integer, location: Prism::Location).returns(Prism::NumberedReferenceReadNode) }
7212
7587
  def NumberedReferenceReadNode(number, location); end
@@ -7220,7 +7595,7 @@ module Prism::DSL
7220
7595
  sig { params(left: Prism::Node, right: Prism::Node, operator_loc: Prism::Location, location: Prism::Location).returns(Prism::OrNode) }
7221
7596
  def OrNode(left, right, operator_loc, location); end
7222
7597
  # Create a new ParametersNode node
7223
- sig { params(requireds: T::Array[Prism::Node], optionals: T::Array[Prism::Node], rest: T.nilable(Prism::RestParameterNode), posts: T::Array[Prism::Node], keywords: T::Array[Prism::Node], keyword_rest: T.nilable(Prism::Node), block: T.nilable(Prism::BlockParameterNode), location: Prism::Location).returns(Prism::ParametersNode) }
7598
+ sig { params(requireds: T::Array[Prism::Node], optionals: T::Array[Prism::Node], rest: T.nilable(Prism::Node), posts: T::Array[Prism::Node], keywords: T::Array[Prism::Node], keyword_rest: T.nilable(Prism::Node), block: T.nilable(Prism::BlockParameterNode), location: Prism::Location).returns(Prism::ParametersNode) }
7224
7599
  def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end
7225
7600
  # Create a new ParenthesesNode node
7226
7601
  sig { params(body: T.nilable(Prism::Node), opening_loc: Prism::Location, closing_loc: Prism::Location, location: Prism::Location).returns(Prism::ParenthesesNode) }
@@ -7241,8 +7616,8 @@ module Prism::DSL
7241
7616
  sig { params(locals: T::Array[Symbol], statements: Prism::StatementsNode, location: Prism::Location).returns(Prism::ProgramNode) }
7242
7617
  def ProgramNode(locals, statements, location); end
7243
7618
  # Create a new RangeNode node
7244
- sig { params(left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), operator_loc: Prism::Location, flags: Integer, location: Prism::Location).returns(Prism::RangeNode) }
7245
- def RangeNode(left, right, operator_loc, flags, location); end
7619
+ sig { params(flags: Integer, left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), operator_loc: Prism::Location, location: Prism::Location).returns(Prism::RangeNode) }
7620
+ def RangeNode(flags, left, right, operator_loc, location); end
7246
7621
  # Create a new RationalNode node
7247
7622
  sig { params(numeric: Prism::Node, location: Prism::Location).returns(Prism::RationalNode) }
7248
7623
  def RationalNode(numeric, location); end
@@ -7250,8 +7625,8 @@ module Prism::DSL
7250
7625
  sig { params(location: Prism::Location).returns(Prism::RedoNode) }
7251
7626
  def RedoNode(location); end
7252
7627
  # Create a new RegularExpressionNode node
7253
- sig { params(opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, unescaped: String, flags: Integer, location: Prism::Location).returns(Prism::RegularExpressionNode) }
7254
- def RegularExpressionNode(opening_loc, content_loc, closing_loc, unescaped, flags, location); end
7628
+ sig { params(flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, unescaped: String, location: Prism::Location).returns(Prism::RegularExpressionNode) }
7629
+ def RegularExpressionNode(flags, opening_loc, content_loc, closing_loc, unescaped, location); end
7255
7630
  # Create a new RequiredKeywordParameterNode node
7256
7631
  sig { params(name: Symbol, name_loc: Prism::Location, location: Prism::Location).returns(Prism::RequiredKeywordParameterNode) }
7257
7632
  def RequiredKeywordParameterNode(name, name_loc, location); end
@@ -7301,8 +7676,8 @@ module Prism::DSL
7301
7676
  sig { params(keyword_loc: Prism::Location, lparen_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), rparen_loc: T.nilable(Prism::Location), block: T.nilable(Prism::Node), location: Prism::Location).returns(Prism::SuperNode) }
7302
7677
  def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end
7303
7678
  # Create a new SymbolNode node
7304
- sig { params(opening_loc: T.nilable(Prism::Location), value_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location), unescaped: String, location: Prism::Location).returns(Prism::SymbolNode) }
7305
- def SymbolNode(opening_loc, value_loc, closing_loc, unescaped, location); end
7679
+ sig { params(flags: Integer, opening_loc: T.nilable(Prism::Location), value_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location), unescaped: String, location: Prism::Location).returns(Prism::SymbolNode) }
7680
+ def SymbolNode(flags, opening_loc, value_loc, closing_loc, unescaped, location); end
7306
7681
  # Create a new TrueNode node
7307
7682
  sig { params(location: Prism::Location).returns(Prism::TrueNode) }
7308
7683
  def TrueNode(location); end
@@ -7313,17 +7688,17 @@ module Prism::DSL
7313
7688
  sig { params(keyword_loc: Prism::Location, predicate: Prism::Node, then_keyword_loc: T.nilable(Prism::Location), statements: T.nilable(Prism::StatementsNode), consequent: T.nilable(Prism::ElseNode), end_keyword_loc: T.nilable(Prism::Location), location: Prism::Location).returns(Prism::UnlessNode) }
7314
7689
  def UnlessNode(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end
7315
7690
  # Create a new UntilNode node
7316
- sig { params(keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, statements: T.nilable(Prism::StatementsNode), flags: Integer, location: Prism::Location).returns(Prism::UntilNode) }
7317
- def UntilNode(keyword_loc, closing_loc, predicate, statements, flags, location); end
7691
+ sig { params(flags: Integer, keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, statements: T.nilable(Prism::StatementsNode), location: Prism::Location).returns(Prism::UntilNode) }
7692
+ def UntilNode(flags, keyword_loc, closing_loc, predicate, statements, location); end
7318
7693
  # Create a new WhenNode node
7319
7694
  sig { params(keyword_loc: Prism::Location, conditions: T::Array[Prism::Node], statements: T.nilable(Prism::StatementsNode), location: Prism::Location).returns(Prism::WhenNode) }
7320
7695
  def WhenNode(keyword_loc, conditions, statements, location); end
7321
7696
  # Create a new WhileNode node
7322
- sig { params(keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, statements: T.nilable(Prism::StatementsNode), flags: Integer, location: Prism::Location).returns(Prism::WhileNode) }
7323
- def WhileNode(keyword_loc, closing_loc, predicate, statements, flags, location); end
7697
+ sig { params(flags: Integer, keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, statements: T.nilable(Prism::StatementsNode), location: Prism::Location).returns(Prism::WhileNode) }
7698
+ def WhileNode(flags, keyword_loc, closing_loc, predicate, statements, location); end
7324
7699
  # Create a new XStringNode node
7325
- sig { params(opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, unescaped: String, location: Prism::Location).returns(Prism::XStringNode) }
7326
- def XStringNode(opening_loc, content_loc, closing_loc, unescaped, location); end
7700
+ sig { params(flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, unescaped: String, location: Prism::Location).returns(Prism::XStringNode) }
7701
+ def XStringNode(flags, opening_loc, content_loc, closing_loc, unescaped, location); end
7327
7702
  # Create a new YieldNode node
7328
7703
  sig { params(keyword_loc: Prism::Location, lparen_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), rparen_loc: T.nilable(Prism::Location), location: Prism::Location).returns(Prism::YieldNode) }
7329
7704
  def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, location); end