prism 0.28.0 → 0.29.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1181,8 +1181,8 @@ module Prism
1181
1181
  bounds(node.location)
1182
1182
  target = on_field(receiver, call_operator, message)
1183
1183
 
1184
- bounds(node.operator_loc)
1185
- operator = on_op("#{node.operator}=")
1184
+ bounds(node.binary_operator_loc)
1185
+ operator = on_op("#{node.binary_operator}=")
1186
1186
  value = visit_write_value(node.value)
1187
1187
 
1188
1188
  bounds(node.location)
@@ -1339,8 +1339,8 @@ module Prism
1339
1339
  bounds(node.name_loc)
1340
1340
  target = on_var_field(on_cvar(node.name.to_s))
1341
1341
 
1342
- bounds(node.operator_loc)
1343
- operator = on_op("#{node.operator}=")
1342
+ bounds(node.binary_operator_loc)
1343
+ operator = on_op("#{node.binary_operator}=")
1344
1344
  value = visit_write_value(node.value)
1345
1345
 
1346
1346
  bounds(node.location)
@@ -1409,8 +1409,8 @@ module Prism
1409
1409
  bounds(node.name_loc)
1410
1410
  target = on_var_field(on_const(node.name.to_s))
1411
1411
 
1412
- bounds(node.operator_loc)
1413
- operator = on_op("#{node.operator}=")
1412
+ bounds(node.binary_operator_loc)
1413
+ operator = on_op("#{node.binary_operator}=")
1414
1414
  value = visit_write_value(node.value)
1415
1415
 
1416
1416
  bounds(node.location)
@@ -1510,8 +1510,8 @@ module Prism
1510
1510
  target = visit_constant_path_write_node_target(node.target)
1511
1511
  value = visit(node.value)
1512
1512
 
1513
- bounds(node.operator_loc)
1514
- operator = on_op("#{node.operator}=")
1513
+ bounds(node.binary_operator_loc)
1514
+ operator = on_op("#{node.binary_operator}=")
1515
1515
  value = visit_write_value(node.value)
1516
1516
 
1517
1517
  bounds(node.location)
@@ -1802,8 +1802,8 @@ module Prism
1802
1802
  bounds(node.name_loc)
1803
1803
  target = on_var_field(on_gvar(node.name.to_s))
1804
1804
 
1805
- bounds(node.operator_loc)
1806
- operator = on_op("#{node.operator}=")
1805
+ bounds(node.binary_operator_loc)
1806
+ operator = on_op("#{node.binary_operator}=")
1807
1807
  value = visit_write_value(node.value)
1808
1808
 
1809
1809
  bounds(node.location)
@@ -1983,8 +1983,8 @@ module Prism
1983
1983
  bounds(node.location)
1984
1984
  target = on_aref_field(receiver, arguments)
1985
1985
 
1986
- bounds(node.operator_loc)
1987
- operator = on_op("#{node.operator}=")
1986
+ bounds(node.binary_operator_loc)
1987
+ operator = on_op("#{node.binary_operator}=")
1988
1988
  value = visit_write_value(node.value)
1989
1989
 
1990
1990
  bounds(node.location)
@@ -2059,8 +2059,8 @@ module Prism
2059
2059
  bounds(node.name_loc)
2060
2060
  target = on_var_field(on_ivar(node.name.to_s))
2061
2061
 
2062
- bounds(node.operator_loc)
2063
- operator = on_op("#{node.operator}=")
2062
+ bounds(node.binary_operator_loc)
2063
+ operator = on_op("#{node.binary_operator}=")
2064
2064
  value = visit_write_value(node.value)
2065
2065
 
2066
2066
  bounds(node.location)
@@ -2337,8 +2337,8 @@ module Prism
2337
2337
  bounds(node.name_loc)
2338
2338
  target = on_var_field(on_ident(node.name_loc.slice))
2339
2339
 
2340
- bounds(node.operator_loc)
2341
- operator = on_op("#{node.operator}=")
2340
+ bounds(node.binary_operator_loc)
2341
+ operator = on_op("#{node.binary_operator}=")
2342
2342
  value = visit_write_value(node.value)
2343
2343
 
2344
2344
  bounds(node.location)
@@ -271,9 +271,9 @@ module Prism
271
271
  # ^^^^^^^^^^^^^^^
272
272
  def visit_call_operator_write_node(node)
273
273
  if op_asgn?(node)
274
- s(node, op_asgn_type(node, :op_asgn), visit(node.receiver), visit_write_value(node.value), node.read_name, node.operator)
274
+ s(node, op_asgn_type(node, :op_asgn), visit(node.receiver), visit_write_value(node.value), node.read_name, node.binary_operator)
275
275
  else
276
- s(node, op_asgn_type(node, :op_asgn2), visit(node.receiver), node.write_name, node.operator, visit_write_value(node.value))
276
+ s(node, op_asgn_type(node, :op_asgn2), visit(node.receiver), node.write_name, node.binary_operator, visit_write_value(node.value))
277
277
  end
278
278
  end
279
279
 
@@ -372,7 +372,7 @@ module Prism
372
372
  # @@foo += bar
373
373
  # ^^^^^^^^^^^^
374
374
  def visit_class_variable_operator_write_node(node)
375
- s(node, class_variable_write_type, node.name, s(node, :call, s(node, :cvar, node.name), node.operator, visit_write_value(node.value)))
375
+ s(node, class_variable_write_type, node.name, s(node, :call, s(node, :cvar, node.name), node.binary_operator, visit_write_value(node.value)))
376
376
  end
377
377
 
378
378
  # @@foo &&= bar
@@ -417,7 +417,7 @@ module Prism
417
417
  # Foo += bar
418
418
  # ^^^^^^^^^^^
419
419
  def visit_constant_operator_write_node(node)
420
- s(node, :cdecl, node.name, s(node, :call, s(node, :const, node.name), node.operator, visit_write_value(node.value)))
420
+ s(node, :cdecl, node.name, s(node, :call, s(node, :const, node.name), node.binary_operator, visit_write_value(node.value)))
421
421
  end
422
422
 
423
423
  # Foo &&= bar
@@ -460,7 +460,7 @@ module Prism
460
460
  # Foo::Bar += baz
461
461
  # ^^^^^^^^^^^^^^^
462
462
  def visit_constant_path_operator_write_node(node)
463
- s(node, :op_asgn, visit(node.target), node.operator, visit_write_value(node.value))
463
+ s(node, :op_asgn, visit(node.target), node.binary_operator, visit_write_value(node.value))
464
464
  end
465
465
 
466
466
  # Foo::Bar &&= baz
@@ -627,7 +627,7 @@ module Prism
627
627
  # $foo += bar
628
628
  # ^^^^^^^^^^^
629
629
  def visit_global_variable_operator_write_node(node)
630
- s(node, :gasgn, node.name, s(node, :call, s(node, :gvar, node.name), node.operator, visit(node.value)))
630
+ s(node, :gasgn, node.name, s(node, :call, s(node, :gvar, node.name), node.binary_operator, visit(node.value)))
631
631
  end
632
632
 
633
633
  # $foo &&= bar
@@ -719,7 +719,7 @@ module Prism
719
719
  arglist << visit(node.block) if !node.block.nil?
720
720
  end
721
721
 
722
- s(node, :op_asgn1, visit(node.receiver), arglist, node.operator, visit_write_value(node.value))
722
+ s(node, :op_asgn1, visit(node.receiver), arglist, node.binary_operator, visit_write_value(node.value))
723
723
  end
724
724
 
725
725
  # foo[bar] &&= baz
@@ -775,7 +775,7 @@ module Prism
775
775
  # @foo += bar
776
776
  # ^^^^^^^^^^^
777
777
  def visit_instance_variable_operator_write_node(node)
778
- s(node, :iasgn, node.name, s(node, :call, s(node, :ivar, node.name), node.operator, visit_write_value(node.value)))
778
+ s(node, :iasgn, node.name, s(node, :call, s(node, :ivar, node.name), node.binary_operator, visit_write_value(node.value)))
779
779
  end
780
780
 
781
781
  # @foo &&= bar
@@ -960,7 +960,7 @@ module Prism
960
960
  # foo += bar
961
961
  # ^^^^^^^^^^
962
962
  def visit_local_variable_operator_write_node(node)
963
- s(node, :lasgn, node.name, s(node, :call, s(node, :lvar, node.name), node.operator, visit_write_value(node.value)))
963
+ s(node, :lasgn, node.name, s(node, :call, s(node, :lvar, node.name), node.binary_operator, visit_write_value(node.value)))
964
964
  end
965
965
 
966
966
  # foo &&= bar
data/prism.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "prism"
5
- spec.version = "0.28.0"
5
+ spec.version = "0.29.0"
6
6
  spec.authors = ["Shopify"]
7
7
  spec.email = ["ruby@shopify.com"]
8
8
 
@@ -121,6 +121,7 @@ Gem::Specification.new do |spec|
121
121
  "sig/prism/dot_visitor.rbs",
122
122
  "sig/prism/dsl.rbs",
123
123
  "sig/prism/inspect_visitor.rbs",
124
+ "sig/prism/lex_compat.rbs",
124
125
  "sig/prism/mutation_compiler.rbs",
125
126
  "sig/prism/node_ext.rbs",
126
127
  "sig/prism/node.rbs",
data/rbi/prism/node.rbi CHANGED
@@ -1199,16 +1199,16 @@ class Prism::CallOperatorWriteNode < Prism::Node
1199
1199
  def write_name; end
1200
1200
 
1201
1201
  sig { returns(Symbol) }
1202
- def operator; end
1202
+ def binary_operator; end
1203
1203
 
1204
1204
  sig { returns(Prism::Location) }
1205
- def operator_loc; end
1205
+ def binary_operator_loc; end
1206
1206
 
1207
1207
  sig { returns(Prism::Node) }
1208
1208
  def value; end
1209
1209
 
1210
- sig { params(source: Prism::Source, 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 }
1211
- def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, location); end
1210
+ sig { params(source: Prism::Source, 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, binary_operator: Symbol, binary_operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).void }
1211
+ def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value, location); end
1212
1212
 
1213
1213
  sig { override.params(visitor: Prism::Visitor).returns(T.untyped) }
1214
1214
  def accept(visitor); end
@@ -1225,8 +1225,8 @@ class Prism::CallOperatorWriteNode < Prism::Node
1225
1225
  sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) }
1226
1226
  def comment_targets; end
1227
1227
 
1228
- 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) }
1229
- def copy(flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, message_loc: self.message_loc, read_name: self.read_name, write_name: self.write_name, operator: self.operator, operator_loc: self.operator_loc, value: self.value, location: self.location); end
1228
+ 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, binary_operator: Symbol, binary_operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).returns(Prism::CallOperatorWriteNode) }
1229
+ def copy(flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, message_loc: self.message_loc, read_name: self.read_name, write_name: self.write_name, binary_operator: self.binary_operator, binary_operator_loc: self.binary_operator_loc, value: self.value, location: self.location); end
1230
1230
 
1231
1231
  sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) }
1232
1232
  def deconstruct_keys(keys); end
@@ -1736,16 +1736,16 @@ class Prism::ClassVariableOperatorWriteNode < Prism::Node
1736
1736
  def name_loc; end
1737
1737
 
1738
1738
  sig { returns(Prism::Location) }
1739
- def operator_loc; end
1739
+ def binary_operator_loc; end
1740
1740
 
1741
1741
  sig { returns(Prism::Node) }
1742
1742
  def value; end
1743
1743
 
1744
1744
  sig { returns(Symbol) }
1745
- def operator; end
1745
+ def binary_operator; end
1746
1746
 
1747
- sig { params(source: Prism::Source, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, operator: Symbol, location: Prism::Location).void }
1748
- def initialize(source, name, name_loc, operator_loc, value, operator, location); end
1747
+ sig { params(source: Prism::Source, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, binary_operator: Symbol, location: Prism::Location).void }
1748
+ def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end
1749
1749
 
1750
1750
  sig { override.params(visitor: Prism::Visitor).returns(T.untyped) }
1751
1751
  def accept(visitor); end
@@ -1762,8 +1762,8 @@ class Prism::ClassVariableOperatorWriteNode < Prism::Node
1762
1762
  sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) }
1763
1763
  def comment_targets; end
1764
1764
 
1765
- sig { params(name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, operator: Symbol, location: Prism::Location).returns(Prism::ClassVariableOperatorWriteNode) }
1766
- def copy(name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value, operator: self.operator, location: self.location); end
1765
+ sig { params(name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, binary_operator: Symbol, location: Prism::Location).returns(Prism::ClassVariableOperatorWriteNode) }
1766
+ def copy(name: self.name, name_loc: self.name_loc, binary_operator_loc: self.binary_operator_loc, value: self.value, binary_operator: self.binary_operator, location: self.location); end
1767
1767
 
1768
1768
  sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) }
1769
1769
  def deconstruct_keys(keys); end
@@ -2036,16 +2036,16 @@ class Prism::ConstantOperatorWriteNode < Prism::Node
2036
2036
  def name_loc; end
2037
2037
 
2038
2038
  sig { returns(Prism::Location) }
2039
- def operator_loc; end
2039
+ def binary_operator_loc; end
2040
2040
 
2041
2041
  sig { returns(Prism::Node) }
2042
2042
  def value; end
2043
2043
 
2044
2044
  sig { returns(Symbol) }
2045
- def operator; end
2045
+ def binary_operator; end
2046
2046
 
2047
- sig { params(source: Prism::Source, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, operator: Symbol, location: Prism::Location).void }
2048
- def initialize(source, name, name_loc, operator_loc, value, operator, location); end
2047
+ sig { params(source: Prism::Source, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, binary_operator: Symbol, location: Prism::Location).void }
2048
+ def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end
2049
2049
 
2050
2050
  sig { override.params(visitor: Prism::Visitor).returns(T.untyped) }
2051
2051
  def accept(visitor); end
@@ -2062,8 +2062,8 @@ class Prism::ConstantOperatorWriteNode < Prism::Node
2062
2062
  sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) }
2063
2063
  def comment_targets; end
2064
2064
 
2065
- sig { params(name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, operator: Symbol, location: Prism::Location).returns(Prism::ConstantOperatorWriteNode) }
2066
- def copy(name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value, operator: self.operator, location: self.location); end
2065
+ sig { params(name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, binary_operator: Symbol, location: Prism::Location).returns(Prism::ConstantOperatorWriteNode) }
2066
+ def copy(name: self.name, name_loc: self.name_loc, binary_operator_loc: self.binary_operator_loc, value: self.value, binary_operator: self.binary_operator, location: self.location); end
2067
2067
 
2068
2068
  sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) }
2069
2069
  def deconstruct_keys(keys); end
@@ -2246,16 +2246,16 @@ class Prism::ConstantPathOperatorWriteNode < Prism::Node
2246
2246
  def target; end
2247
2247
 
2248
2248
  sig { returns(Prism::Location) }
2249
- def operator_loc; end
2249
+ def binary_operator_loc; end
2250
2250
 
2251
2251
  sig { returns(Prism::Node) }
2252
2252
  def value; end
2253
2253
 
2254
2254
  sig { returns(Symbol) }
2255
- def operator; end
2255
+ def binary_operator; end
2256
2256
 
2257
- sig { params(source: Prism::Source, target: Prism::ConstantPathNode, operator_loc: Prism::Location, value: Prism::Node, operator: Symbol, location: Prism::Location).void }
2258
- def initialize(source, target, operator_loc, value, operator, location); end
2257
+ sig { params(source: Prism::Source, target: Prism::ConstantPathNode, binary_operator_loc: Prism::Location, value: Prism::Node, binary_operator: Symbol, location: Prism::Location).void }
2258
+ def initialize(source, target, binary_operator_loc, value, binary_operator, location); end
2259
2259
 
2260
2260
  sig { override.params(visitor: Prism::Visitor).returns(T.untyped) }
2261
2261
  def accept(visitor); end
@@ -2272,8 +2272,8 @@ class Prism::ConstantPathOperatorWriteNode < Prism::Node
2272
2272
  sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) }
2273
2273
  def comment_targets; end
2274
2274
 
2275
- sig { params(target: Prism::ConstantPathNode, operator_loc: Prism::Location, value: Prism::Node, operator: Symbol, location: Prism::Location).returns(Prism::ConstantPathOperatorWriteNode) }
2276
- def copy(target: self.target, operator_loc: self.operator_loc, value: self.value, operator: self.operator, location: self.location); end
2275
+ sig { params(target: Prism::ConstantPathNode, binary_operator_loc: Prism::Location, value: Prism::Node, binary_operator: Symbol, location: Prism::Location).returns(Prism::ConstantPathOperatorWriteNode) }
2276
+ def copy(target: self.target, binary_operator_loc: self.binary_operator_loc, value: self.value, binary_operator: self.binary_operator, location: self.location); end
2277
2277
 
2278
2278
  sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) }
2279
2279
  def deconstruct_keys(keys); end
@@ -3424,16 +3424,16 @@ class Prism::GlobalVariableOperatorWriteNode < Prism::Node
3424
3424
  def name_loc; end
3425
3425
 
3426
3426
  sig { returns(Prism::Location) }
3427
- def operator_loc; end
3427
+ def binary_operator_loc; end
3428
3428
 
3429
3429
  sig { returns(Prism::Node) }
3430
3430
  def value; end
3431
3431
 
3432
3432
  sig { returns(Symbol) }
3433
- def operator; end
3433
+ def binary_operator; end
3434
3434
 
3435
- sig { params(source: Prism::Source, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, operator: Symbol, location: Prism::Location).void }
3436
- def initialize(source, name, name_loc, operator_loc, value, operator, location); end
3435
+ sig { params(source: Prism::Source, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, binary_operator: Symbol, location: Prism::Location).void }
3436
+ def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end
3437
3437
 
3438
3438
  sig { override.params(visitor: Prism::Visitor).returns(T.untyped) }
3439
3439
  def accept(visitor); end
@@ -3450,8 +3450,8 @@ class Prism::GlobalVariableOperatorWriteNode < Prism::Node
3450
3450
  sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) }
3451
3451
  def comment_targets; end
3452
3452
 
3453
- sig { params(name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, operator: Symbol, location: Prism::Location).returns(Prism::GlobalVariableOperatorWriteNode) }
3454
- def copy(name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value, operator: self.operator, location: self.location); end
3453
+ sig { params(name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, binary_operator: Symbol, location: Prism::Location).returns(Prism::GlobalVariableOperatorWriteNode) }
3454
+ def copy(name: self.name, name_loc: self.name_loc, binary_operator_loc: self.binary_operator_loc, value: self.value, binary_operator: self.binary_operator, location: self.location); end
3455
3455
 
3456
3456
  sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) }
3457
3457
  def deconstruct_keys(keys); end
@@ -4159,16 +4159,16 @@ class Prism::IndexOperatorWriteNode < Prism::Node
4159
4159
  def block; end
4160
4160
 
4161
4161
  sig { returns(Symbol) }
4162
- def operator; end
4162
+ def binary_operator; end
4163
4163
 
4164
4164
  sig { returns(Prism::Location) }
4165
- def operator_loc; end
4165
+ def binary_operator_loc; end
4166
4166
 
4167
4167
  sig { returns(Prism::Node) }
4168
4168
  def value; end
4169
4169
 
4170
- sig { params(source: Prism::Source, 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 }
4171
- def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, location); end
4170
+ sig { params(source: Prism::Source, 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), binary_operator: Symbol, binary_operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).void }
4171
+ def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value, location); end
4172
4172
 
4173
4173
  sig { override.params(visitor: Prism::Visitor).returns(T.untyped) }
4174
4174
  def accept(visitor); end
@@ -4185,8 +4185,8 @@ class Prism::IndexOperatorWriteNode < Prism::Node
4185
4185
  sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) }
4186
4186
  def comment_targets; end
4187
4187
 
4188
- 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) }
4189
- def copy(flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, opening_loc: self.opening_loc, arguments: self.arguments, closing_loc: self.closing_loc, block: self.block, operator: self.operator, operator_loc: self.operator_loc, value: self.value, location: self.location); end
4188
+ 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), binary_operator: Symbol, binary_operator_loc: Prism::Location, value: Prism::Node, location: Prism::Location).returns(Prism::IndexOperatorWriteNode) }
4189
+ def copy(flags: self.flags, receiver: self.receiver, call_operator_loc: self.call_operator_loc, opening_loc: self.opening_loc, arguments: self.arguments, closing_loc: self.closing_loc, block: self.block, binary_operator: self.binary_operator, binary_operator_loc: self.binary_operator_loc, value: self.value, location: self.location); end
4190
4190
 
4191
4191
  sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) }
4192
4192
  def deconstruct_keys(keys); end
@@ -4461,16 +4461,16 @@ class Prism::InstanceVariableOperatorWriteNode < Prism::Node
4461
4461
  def name_loc; end
4462
4462
 
4463
4463
  sig { returns(Prism::Location) }
4464
- def operator_loc; end
4464
+ def binary_operator_loc; end
4465
4465
 
4466
4466
  sig { returns(Prism::Node) }
4467
4467
  def value; end
4468
4468
 
4469
4469
  sig { returns(Symbol) }
4470
- def operator; end
4470
+ def binary_operator; end
4471
4471
 
4472
- sig { params(source: Prism::Source, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, operator: Symbol, location: Prism::Location).void }
4473
- def initialize(source, name, name_loc, operator_loc, value, operator, location); end
4472
+ sig { params(source: Prism::Source, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, binary_operator: Symbol, location: Prism::Location).void }
4473
+ def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end
4474
4474
 
4475
4475
  sig { override.params(visitor: Prism::Visitor).returns(T.untyped) }
4476
4476
  def accept(visitor); end
@@ -4487,8 +4487,8 @@ class Prism::InstanceVariableOperatorWriteNode < Prism::Node
4487
4487
  sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) }
4488
4488
  def comment_targets; end
4489
4489
 
4490
- sig { params(name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, operator: Symbol, location: Prism::Location).returns(Prism::InstanceVariableOperatorWriteNode) }
4491
- def copy(name: self.name, name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value, operator: self.operator, location: self.location); end
4490
+ sig { params(name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, binary_operator: Symbol, location: Prism::Location).returns(Prism::InstanceVariableOperatorWriteNode) }
4491
+ def copy(name: self.name, name_loc: self.name_loc, binary_operator_loc: self.binary_operator_loc, value: self.value, binary_operator: self.binary_operator, location: self.location); end
4492
4492
 
4493
4493
  sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) }
4494
4494
  def deconstruct_keys(keys); end
@@ -5380,7 +5380,7 @@ class Prism::LocalVariableOperatorWriteNode < Prism::Node
5380
5380
  def name_loc; end
5381
5381
 
5382
5382
  sig { returns(Prism::Location) }
5383
- def operator_loc; end
5383
+ def binary_operator_loc; end
5384
5384
 
5385
5385
  sig { returns(Prism::Node) }
5386
5386
  def value; end
@@ -5389,13 +5389,13 @@ class Prism::LocalVariableOperatorWriteNode < Prism::Node
5389
5389
  def name; end
5390
5390
 
5391
5391
  sig { returns(Symbol) }
5392
- def operator; end
5392
+ def binary_operator; end
5393
5393
 
5394
5394
  sig { returns(Integer) }
5395
5395
  def depth; end
5396
5396
 
5397
- sig { params(source: Prism::Source, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, name: Symbol, operator: Symbol, depth: Integer, location: Prism::Location).void }
5398
- def initialize(source, name_loc, operator_loc, value, name, operator, depth, location); end
5397
+ sig { params(source: Prism::Source, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, name: Symbol, binary_operator: Symbol, depth: Integer, location: Prism::Location).void }
5398
+ def initialize(source, name_loc, binary_operator_loc, value, name, binary_operator, depth, location); end
5399
5399
 
5400
5400
  sig { override.params(visitor: Prism::Visitor).returns(T.untyped) }
5401
5401
  def accept(visitor); end
@@ -5412,8 +5412,8 @@ class Prism::LocalVariableOperatorWriteNode < Prism::Node
5412
5412
  sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) }
5413
5413
  def comment_targets; end
5414
5414
 
5415
- sig { params(name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, name: Symbol, operator: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableOperatorWriteNode) }
5416
- def copy(name_loc: self.name_loc, operator_loc: self.operator_loc, value: self.value, name: self.name, operator: self.operator, depth: self.depth, location: self.location); end
5415
+ sig { params(name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, name: Symbol, binary_operator: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableOperatorWriteNode) }
5416
+ def copy(name_loc: self.name_loc, binary_operator_loc: self.binary_operator_loc, value: self.value, name: self.name, binary_operator: self.binary_operator, depth: self.depth, location: self.location); end
5417
5417
 
5418
5418
  sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) }
5419
5419
  def deconstruct_keys(keys); end
@@ -6508,7 +6508,7 @@ class Prism::ParametersNode < Prism::Node
6508
6508
  sig { returns(T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode))) }
6509
6509
  def rest; end
6510
6510
 
6511
- sig { returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode)]) }
6511
+ sig { returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)]) }
6512
6512
  def posts; end
6513
6513
 
6514
6514
  sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) }
@@ -6520,7 +6520,7 @@ class Prism::ParametersNode < Prism::Node
6520
6520
  sig { returns(T.nilable(Prism::BlockParameterNode)) }
6521
6521
  def block; end
6522
6522
 
6523
- sig { params(source: Prism::Source, requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], optionals: T::Array[Prism::OptionalParameterNode], rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode)], keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), block: T.nilable(Prism::BlockParameterNode), location: Prism::Location).void }
6523
+ sig { params(source: Prism::Source, requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], optionals: T::Array[Prism::OptionalParameterNode], rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), block: T.nilable(Prism::BlockParameterNode), location: Prism::Location).void }
6524
6524
  def initialize(source, requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end
6525
6525
 
6526
6526
  sig { override.params(visitor: Prism::Visitor).returns(T.untyped) }
@@ -6538,7 +6538,7 @@ class Prism::ParametersNode < Prism::Node
6538
6538
  sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) }
6539
6539
  def comment_targets; end
6540
6540
 
6541
- sig { params(requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], optionals: T::Array[Prism::OptionalParameterNode], rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode)], keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), block: T.nilable(Prism::BlockParameterNode), location: Prism::Location).returns(Prism::ParametersNode) }
6541
+ sig { params(requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], optionals: T::Array[Prism::OptionalParameterNode], rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), block: T.nilable(Prism::BlockParameterNode), location: Prism::Location).returns(Prism::ParametersNode) }
6542
6542
  def copy(requireds: self.requireds, optionals: self.optionals, rest: self.rest, posts: self.posts, keywords: self.keywords, keyword_rest: self.keyword_rest, block: self.block, location: self.location); end
6543
6543
 
6544
6544
  sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) }
@@ -100,3 +100,8 @@ class Prism::ParametersNode < Prism::Node
100
100
  sig { returns(T::Array[T.any([Symbol, Symbol], [Symbol])]) }
101
101
  def signature; end
102
102
  end
103
+
104
+ class Prism::CallNode < Prism::Node
105
+ sig { returns(T.nilable(Prism::Location)) }
106
+ def full_message_loc; end
107
+ end
@@ -16,7 +16,7 @@ class Prism::Source
16
16
  sig { returns(Encoding) }
17
17
  def encoding; end
18
18
 
19
- sig { returns(T::Array[Integer]) }
19
+ sig { returns(T::Array[String]) }
20
20
  def lines; end
21
21
 
22
22
  sig { params(byte_offset: Integer, length: Integer).returns(String) }
data/sig/prism/dsl.rbs CHANGED
@@ -67,7 +67,7 @@ module Prism
67
67
  def CallNode: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Symbol name, Location? message_loc, Location? opening_loc, ArgumentsNode? arguments, Location? closing_loc, Prism::node? block, ?Source source, ?Location location) -> CallNode
68
68
 
69
69
  # Create a new CallOperatorWriteNode node
70
- def CallOperatorWriteNode: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Symbol operator, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> CallOperatorWriteNode
70
+ def CallOperatorWriteNode: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Symbol binary_operator, Location binary_operator_loc, Prism::node value, ?Source source, ?Location location) -> CallOperatorWriteNode
71
71
 
72
72
  # Create a new CallOrWriteNode node
73
73
  def CallOrWriteNode: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> CallOrWriteNode
@@ -91,7 +91,7 @@ module Prism
91
91
  def ClassVariableAndWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> ClassVariableAndWriteNode
92
92
 
93
93
  # Create a new ClassVariableOperatorWriteNode node
94
- def ClassVariableOperatorWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, ?Source source, ?Location location) -> ClassVariableOperatorWriteNode
94
+ def ClassVariableOperatorWriteNode: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, ?Source source, ?Location location) -> ClassVariableOperatorWriteNode
95
95
 
96
96
  # Create a new ClassVariableOrWriteNode node
97
97
  def ClassVariableOrWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> ClassVariableOrWriteNode
@@ -109,7 +109,7 @@ module Prism
109
109
  def ConstantAndWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> ConstantAndWriteNode
110
110
 
111
111
  # Create a new ConstantOperatorWriteNode node
112
- def ConstantOperatorWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, ?Source source, ?Location location) -> ConstantOperatorWriteNode
112
+ def ConstantOperatorWriteNode: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, ?Source source, ?Location location) -> ConstantOperatorWriteNode
113
113
 
114
114
  # Create a new ConstantOrWriteNode node
115
115
  def ConstantOrWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> ConstantOrWriteNode
@@ -121,7 +121,7 @@ module Prism
121
121
  def ConstantPathNode: (Prism::node? parent, Symbol? name, Location delimiter_loc, Location name_loc, ?Source source, ?Location location) -> ConstantPathNode
122
122
 
123
123
  # Create a new ConstantPathOperatorWriteNode node
124
- def ConstantPathOperatorWriteNode: (ConstantPathNode target, Location operator_loc, Prism::node value, Symbol operator, ?Source source, ?Location location) -> ConstantPathOperatorWriteNode
124
+ def ConstantPathOperatorWriteNode: (ConstantPathNode target, Location binary_operator_loc, Prism::node value, Symbol binary_operator, ?Source source, ?Location location) -> ConstantPathOperatorWriteNode
125
125
 
126
126
  # Create a new ConstantPathOrWriteNode node
127
127
  def ConstantPathOrWriteNode: (ConstantPathNode target, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> ConstantPathOrWriteNode
@@ -187,7 +187,7 @@ module Prism
187
187
  def GlobalVariableAndWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> GlobalVariableAndWriteNode
188
188
 
189
189
  # Create a new GlobalVariableOperatorWriteNode node
190
- def GlobalVariableOperatorWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, ?Source source, ?Location location) -> GlobalVariableOperatorWriteNode
190
+ def GlobalVariableOperatorWriteNode: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, ?Source source, ?Location location) -> GlobalVariableOperatorWriteNode
191
191
 
192
192
  # Create a new GlobalVariableOrWriteNode node
193
193
  def GlobalVariableOrWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> GlobalVariableOrWriteNode
@@ -226,7 +226,7 @@ module Prism
226
226
  def IndexAndWriteNode: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> IndexAndWriteNode
227
227
 
228
228
  # Create a new IndexOperatorWriteNode node
229
- def IndexOperatorWriteNode: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Symbol operator, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> IndexOperatorWriteNode
229
+ def IndexOperatorWriteNode: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Symbol binary_operator, Location binary_operator_loc, Prism::node value, ?Source source, ?Location location) -> IndexOperatorWriteNode
230
230
 
231
231
  # Create a new IndexOrWriteNode node
232
232
  def IndexOrWriteNode: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> IndexOrWriteNode
@@ -238,7 +238,7 @@ module Prism
238
238
  def InstanceVariableAndWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> InstanceVariableAndWriteNode
239
239
 
240
240
  # Create a new InstanceVariableOperatorWriteNode node
241
- def InstanceVariableOperatorWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, ?Source source, ?Location location) -> InstanceVariableOperatorWriteNode
241
+ def InstanceVariableOperatorWriteNode: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, ?Source source, ?Location location) -> InstanceVariableOperatorWriteNode
242
242
 
243
243
  # Create a new InstanceVariableOrWriteNode node
244
244
  def InstanceVariableOrWriteNode: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, ?Source source, ?Location location) -> InstanceVariableOrWriteNode
@@ -286,7 +286,7 @@ module Prism
286
286
  def LocalVariableAndWriteNode: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, ?Source source, ?Location location) -> LocalVariableAndWriteNode
287
287
 
288
288
  # Create a new LocalVariableOperatorWriteNode node
289
- def LocalVariableOperatorWriteNode: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Symbol operator, Integer depth, ?Source source, ?Location location) -> LocalVariableOperatorWriteNode
289
+ def LocalVariableOperatorWriteNode: (Location name_loc, Location binary_operator_loc, Prism::node value, Symbol name, Symbol binary_operator, Integer depth, ?Source source, ?Location location) -> LocalVariableOperatorWriteNode
290
290
 
291
291
  # Create a new LocalVariableOrWriteNode node
292
292
  def LocalVariableOrWriteNode: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, ?Source source, ?Location location) -> LocalVariableOrWriteNode
@@ -349,7 +349,7 @@ module Prism
349
349
  def OrNode: (Prism::node left, Prism::node right, Location operator_loc, ?Source source, ?Location location) -> OrNode
350
350
 
351
351
  # Create a new ParametersNode node
352
- def ParametersNode: (Array[RequiredParameterNode | MultiTargetNode] requireds, Array[OptionalParameterNode] optionals, RestParameterNode | ImplicitRestNode | nil rest, Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode] posts, Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] keywords, KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil keyword_rest, BlockParameterNode? block, ?Source source, ?Location location) -> ParametersNode
352
+ def ParametersNode: (Array[RequiredParameterNode | MultiTargetNode] requireds, Array[OptionalParameterNode] optionals, RestParameterNode | ImplicitRestNode | nil rest, Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] posts, Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] keywords, KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil keyword_rest, BlockParameterNode? block, ?Source source, ?Location location) -> ParametersNode
353
353
 
354
354
  # Create a new ParenthesesNode node
355
355
  def ParenthesesNode: (Prism::node? body, Location opening_loc, Location closing_loc, ?Source source, ?Location location) -> ParenthesesNode
@@ -0,0 +1,10 @@
1
+ module Prism
2
+ class LexCompat
3
+ class Result < Prism::Result
4
+ attr_reader value: Array[[[Integer, Integer], Symbol, String, untyped]]
5
+
6
+ def initialize: (Array[[[Integer, Integer], Symbol, String, untyped]] value, Array[comment] comments, Array[MagicComment] magic_comments, Location? data_loc, Array[ParseError] errors, Array[ParseWarning] warnings, Source source) -> void
7
+ def deconstruct_keys: (Array[Symbol]? keys) -> Hash[Symbol, untyped]
8
+ end
9
+ end
10
+ end