prism 0.28.0 → 0.29.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -1
- data/config.yml +29 -17
- data/ext/prism/api_node.c +40 -40
- data/ext/prism/extconf.rb +27 -23
- data/ext/prism/extension.h +1 -1
- data/include/prism/ast.h +32 -32
- data/include/prism/diagnostic.h +11 -1
- data/include/prism/version.h +2 -2
- data/lib/prism/desugar_compiler.rb +4 -4
- data/lib/prism/dot_visitor.rb +32 -32
- data/lib/prism/dsl.rb +16 -16
- data/lib/prism/ffi.rb +1 -1
- data/lib/prism/inspect_visitor.rb +16 -16
- data/lib/prism/node.rb +148 -148
- data/lib/prism/node_ext.rb +156 -14
- data/lib/prism/parse_result/comments.rb +1 -1
- data/lib/prism/parse_result/newlines.rb +1 -1
- data/lib/prism/reflection.rb +8 -8
- data/lib/prism/serialize.rb +12 -2
- data/lib/prism/translation/parser/compiler.rb +154 -24
- data/lib/prism/translation/parser.rb +1 -1
- data/lib/prism/translation/ripper.rb +16 -16
- data/lib/prism/translation/ruby_parser.rb +9 -9
- data/prism.gemspec +2 -1
- data/rbi/prism/node.rbi +51 -51
- data/rbi/prism/node_ext.rbi +5 -0
- data/rbi/prism/parse_result.rbi +1 -1
- data/sig/prism/dsl.rbs +9 -9
- data/sig/prism/lex_compat.rbs +10 -0
- data/sig/prism/node.rbs +44 -44
- data/sig/prism/node_ext.rbs +4 -0
- data/src/diagnostic.c +30 -11
- data/src/node.c +48 -48
- data/src/prettyprint.c +48 -48
- data/src/prism.c +256 -133
- data/src/serialize.c +16 -16
- data/src/token_type.c +2 -2
- metadata +3 -2
data/include/prism/diagnostic.h
CHANGED
@@ -36,13 +36,16 @@ typedef enum {
|
|
36
36
|
PM_ERR_ARGUMENT_BARE_HASH,
|
37
37
|
PM_ERR_ARGUMENT_BLOCK_FORWARDING,
|
38
38
|
PM_ERR_ARGUMENT_BLOCK_MULTI,
|
39
|
+
PM_ERR_ARGUMENT_CONFLICT_AMPERSAND,
|
40
|
+
PM_ERR_ARGUMENT_CONFLICT_STAR,
|
41
|
+
PM_ERR_ARGUMENT_CONFLICT_STAR_STAR,
|
39
42
|
PM_ERR_ARGUMENT_FORMAL_CLASS,
|
40
43
|
PM_ERR_ARGUMENT_FORMAL_CONSTANT,
|
41
44
|
PM_ERR_ARGUMENT_FORMAL_GLOBAL,
|
42
45
|
PM_ERR_ARGUMENT_FORMAL_IVAR,
|
43
46
|
PM_ERR_ARGUMENT_FORWARDING_UNBOUND,
|
44
47
|
PM_ERR_ARGUMENT_IN,
|
45
|
-
|
48
|
+
PM_ERR_ARGUMENT_NO_FORWARDING_AMPERSAND,
|
46
49
|
PM_ERR_ARGUMENT_NO_FORWARDING_ELLIPSES,
|
47
50
|
PM_ERR_ARGUMENT_NO_FORWARDING_STAR,
|
48
51
|
PM_ERR_ARGUMENT_NO_FORWARDING_STAR_STAR,
|
@@ -124,6 +127,7 @@ typedef enum {
|
|
124
127
|
PM_ERR_EXPECT_EXPRESSION_AFTER_SPLAT_HASH,
|
125
128
|
PM_ERR_EXPECT_EXPRESSION_AFTER_STAR,
|
126
129
|
PM_ERR_EXPECT_IDENT_REQ_PARAMETER,
|
130
|
+
PM_ERR_EXPECT_IN_DELIMITER,
|
127
131
|
PM_ERR_EXPECT_LPAREN_REQ_PARAMETER,
|
128
132
|
PM_ERR_EXPECT_MESSAGE,
|
129
133
|
PM_ERR_EXPECT_RBRACKET,
|
@@ -163,6 +167,7 @@ typedef enum {
|
|
163
167
|
PM_ERR_INVALID_BLOCK_EXIT,
|
164
168
|
PM_ERR_INVALID_CHARACTER,
|
165
169
|
PM_ERR_INVALID_ENCODING_MAGIC_COMMENT,
|
170
|
+
PM_ERR_INVALID_ESCAPE_CHARACTER,
|
166
171
|
PM_ERR_INVALID_FLOAT_EXPONENT,
|
167
172
|
PM_ERR_INVALID_LOCAL_VARIABLE_READ,
|
168
173
|
PM_ERR_INVALID_LOCAL_VARIABLE_WRITE,
|
@@ -171,6 +176,7 @@ typedef enum {
|
|
171
176
|
PM_ERR_INVALID_MULTIBYTE_ESCAPE,
|
172
177
|
PM_ERR_INVALID_NUMBER_BINARY,
|
173
178
|
PM_ERR_INVALID_NUMBER_DECIMAL,
|
179
|
+
PM_ERR_INVALID_NUMBER_FRACTION,
|
174
180
|
PM_ERR_INVALID_NUMBER_HEXADECIMAL,
|
175
181
|
PM_ERR_INVALID_NUMBER_OCTAL,
|
176
182
|
PM_ERR_INVALID_NUMBER_UNDERSCORE_INNER,
|
@@ -216,6 +222,7 @@ typedef enum {
|
|
216
222
|
PM_ERR_PARAMETER_ASSOC_SPLAT_MULTI,
|
217
223
|
PM_ERR_PARAMETER_BLOCK_MULTI,
|
218
224
|
PM_ERR_PARAMETER_CIRCULAR,
|
225
|
+
PM_ERR_PARAMETER_FORWARDING_AFTER_REST,
|
219
226
|
PM_ERR_PARAMETER_METHOD_NAME,
|
220
227
|
PM_ERR_PARAMETER_NAME_DUPLICATED,
|
221
228
|
PM_ERR_PARAMETER_NO_DEFAULT,
|
@@ -238,8 +245,10 @@ typedef enum {
|
|
238
245
|
PM_ERR_PATTERN_EXPRESSION_AFTER_PIPE,
|
239
246
|
PM_ERR_PATTERN_EXPRESSION_AFTER_RANGE,
|
240
247
|
PM_ERR_PATTERN_EXPRESSION_AFTER_REST,
|
248
|
+
PM_ERR_PATTERN_HASH_IMPLICIT,
|
241
249
|
PM_ERR_PATTERN_HASH_KEY,
|
242
250
|
PM_ERR_PATTERN_HASH_KEY_DUPLICATE,
|
251
|
+
PM_ERR_PATTERN_HASH_KEY_INTERPOLATED,
|
243
252
|
PM_ERR_PATTERN_HASH_KEY_LABEL,
|
244
253
|
PM_ERR_PATTERN_HASH_KEY_LOCALS,
|
245
254
|
PM_ERR_PATTERN_IDENT_AFTER_HROCKET,
|
@@ -316,6 +325,7 @@ typedef enum {
|
|
316
325
|
PM_WARN_KEYWORD_EOL,
|
317
326
|
PM_WARN_LITERAL_IN_CONDITION_DEFAULT,
|
318
327
|
PM_WARN_LITERAL_IN_CONDITION_VERBOSE,
|
328
|
+
PM_WARN_SHAREABLE_CONSTANT_VALUE_LINE,
|
319
329
|
PM_WARN_SHEBANG_CARRIAGE_RETURN,
|
320
330
|
PM_WARN_UNEXPECTED_CARRIAGE_RETURN,
|
321
331
|
PM_WARN_UNREACHABLE_STATEMENT,
|
data/include/prism/version.h
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
/**
|
15
15
|
* The minor version of the Prism library as an int.
|
16
16
|
*/
|
17
|
-
#define PRISM_VERSION_MINOR
|
17
|
+
#define PRISM_VERSION_MINOR 29
|
18
18
|
|
19
19
|
/**
|
20
20
|
* The patch version of the Prism library as an int.
|
@@ -24,6 +24,6 @@
|
|
24
24
|
/**
|
25
25
|
* The version of the Prism library as a constant string.
|
26
26
|
*/
|
27
|
-
#define PRISM_VERSION "0.
|
27
|
+
#define PRISM_VERSION "0.29.0"
|
28
28
|
|
29
29
|
#endif
|
@@ -73,7 +73,7 @@ module Prism
|
|
73
73
|
|
74
74
|
# Desugar `x += y` to `x = x + y`
|
75
75
|
def compile
|
76
|
-
|
76
|
+
binary_operator_loc = node.binary_operator_loc.chop
|
77
77
|
|
78
78
|
write_class.new(
|
79
79
|
source,
|
@@ -84,15 +84,15 @@ module Prism
|
|
84
84
|
0,
|
85
85
|
read_class.new(source, *arguments, node.name_loc),
|
86
86
|
nil,
|
87
|
-
|
88
|
-
|
87
|
+
binary_operator_loc.slice.to_sym,
|
88
|
+
binary_operator_loc,
|
89
89
|
nil,
|
90
90
|
ArgumentsNode.new(source, 0, [node.value], node.value.location),
|
91
91
|
nil,
|
92
92
|
nil,
|
93
93
|
node.location
|
94
94
|
),
|
95
|
-
node.
|
95
|
+
node.binary_operator_loc.copy(start_offset: node.binary_operator_loc.end_offset - 1, length: 1),
|
96
96
|
node.location
|
97
97
|
)
|
98
98
|
end
|
data/lib/prism/dot_visitor.rb
CHANGED
@@ -765,11 +765,11 @@ module Prism
|
|
765
765
|
# write_name
|
766
766
|
table.field("write_name", node.write_name.inspect)
|
767
767
|
|
768
|
-
#
|
769
|
-
table.field("
|
768
|
+
# binary_operator
|
769
|
+
table.field("binary_operator", node.binary_operator.inspect)
|
770
770
|
|
771
|
-
#
|
772
|
-
table.field("
|
771
|
+
# binary_operator_loc
|
772
|
+
table.field("binary_operator_loc", location_inspect(node.binary_operator_loc))
|
773
773
|
|
774
774
|
# value
|
775
775
|
table.field("value", port: true)
|
@@ -1060,15 +1060,15 @@ module Prism
|
|
1060
1060
|
# name_loc
|
1061
1061
|
table.field("name_loc", location_inspect(node.name_loc))
|
1062
1062
|
|
1063
|
-
#
|
1064
|
-
table.field("
|
1063
|
+
# binary_operator_loc
|
1064
|
+
table.field("binary_operator_loc", location_inspect(node.binary_operator_loc))
|
1065
1065
|
|
1066
1066
|
# value
|
1067
1067
|
table.field("value", port: true)
|
1068
1068
|
digraph.edge("#{id}:value -> #{node_id(node.value)};")
|
1069
1069
|
|
1070
|
-
#
|
1071
|
-
table.field("
|
1070
|
+
# binary_operator
|
1071
|
+
table.field("binary_operator", node.binary_operator.inspect)
|
1072
1072
|
|
1073
1073
|
digraph.nodes << <<~DOT
|
1074
1074
|
#{id} [
|
@@ -1205,15 +1205,15 @@ module Prism
|
|
1205
1205
|
# name_loc
|
1206
1206
|
table.field("name_loc", location_inspect(node.name_loc))
|
1207
1207
|
|
1208
|
-
#
|
1209
|
-
table.field("
|
1208
|
+
# binary_operator_loc
|
1209
|
+
table.field("binary_operator_loc", location_inspect(node.binary_operator_loc))
|
1210
1210
|
|
1211
1211
|
# value
|
1212
1212
|
table.field("value", port: true)
|
1213
1213
|
digraph.edge("#{id}:value -> #{node_id(node.value)};")
|
1214
1214
|
|
1215
|
-
#
|
1216
|
-
table.field("
|
1215
|
+
# binary_operator
|
1216
|
+
table.field("binary_operator", node.binary_operator.inspect)
|
1217
1217
|
|
1218
1218
|
digraph.nodes << <<~DOT
|
1219
1219
|
#{id} [
|
@@ -1314,15 +1314,15 @@ module Prism
|
|
1314
1314
|
table.field("target", port: true)
|
1315
1315
|
digraph.edge("#{id}:target -> #{node_id(node.target)};")
|
1316
1316
|
|
1317
|
-
#
|
1318
|
-
table.field("
|
1317
|
+
# binary_operator_loc
|
1318
|
+
table.field("binary_operator_loc", location_inspect(node.binary_operator_loc))
|
1319
1319
|
|
1320
1320
|
# value
|
1321
1321
|
table.field("value", port: true)
|
1322
1322
|
digraph.edge("#{id}:value -> #{node_id(node.value)};")
|
1323
1323
|
|
1324
|
-
#
|
1325
|
-
table.field("
|
1324
|
+
# binary_operator
|
1325
|
+
table.field("binary_operator", node.binary_operator.inspect)
|
1326
1326
|
|
1327
1327
|
digraph.nodes << <<~DOT
|
1328
1328
|
#{id} [
|
@@ -1916,15 +1916,15 @@ module Prism
|
|
1916
1916
|
# name_loc
|
1917
1917
|
table.field("name_loc", location_inspect(node.name_loc))
|
1918
1918
|
|
1919
|
-
#
|
1920
|
-
table.field("
|
1919
|
+
# binary_operator_loc
|
1920
|
+
table.field("binary_operator_loc", location_inspect(node.binary_operator_loc))
|
1921
1921
|
|
1922
1922
|
# value
|
1923
1923
|
table.field("value", port: true)
|
1924
1924
|
digraph.edge("#{id}:value -> #{node_id(node.value)};")
|
1925
1925
|
|
1926
|
-
#
|
1927
|
-
table.field("
|
1926
|
+
# binary_operator
|
1927
|
+
table.field("binary_operator", node.binary_operator.inspect)
|
1928
1928
|
|
1929
1929
|
digraph.nodes << <<~DOT
|
1930
1930
|
#{id} [
|
@@ -2322,11 +2322,11 @@ module Prism
|
|
2322
2322
|
digraph.edge("#{id}:block -> #{node_id(block)};")
|
2323
2323
|
end
|
2324
2324
|
|
2325
|
-
#
|
2326
|
-
table.field("
|
2325
|
+
# binary_operator
|
2326
|
+
table.field("binary_operator", node.binary_operator.inspect)
|
2327
2327
|
|
2328
|
-
#
|
2329
|
-
table.field("
|
2328
|
+
# binary_operator_loc
|
2329
|
+
table.field("binary_operator_loc", location_inspect(node.binary_operator_loc))
|
2330
2330
|
|
2331
2331
|
# value
|
2332
2332
|
table.field("value", port: true)
|
@@ -2471,15 +2471,15 @@ module Prism
|
|
2471
2471
|
# name_loc
|
2472
2472
|
table.field("name_loc", location_inspect(node.name_loc))
|
2473
2473
|
|
2474
|
-
#
|
2475
|
-
table.field("
|
2474
|
+
# binary_operator_loc
|
2475
|
+
table.field("binary_operator_loc", location_inspect(node.binary_operator_loc))
|
2476
2476
|
|
2477
2477
|
# value
|
2478
2478
|
table.field("value", port: true)
|
2479
2479
|
digraph.edge("#{id}:value -> #{node_id(node.value)};")
|
2480
2480
|
|
2481
|
-
#
|
2482
|
-
table.field("
|
2481
|
+
# binary_operator
|
2482
|
+
table.field("binary_operator", node.binary_operator.inspect)
|
2483
2483
|
|
2484
2484
|
digraph.nodes << <<~DOT
|
2485
2485
|
#{id} [
|
@@ -2928,8 +2928,8 @@ module Prism
|
|
2928
2928
|
# name_loc
|
2929
2929
|
table.field("name_loc", location_inspect(node.name_loc))
|
2930
2930
|
|
2931
|
-
#
|
2932
|
-
table.field("
|
2931
|
+
# binary_operator_loc
|
2932
|
+
table.field("binary_operator_loc", location_inspect(node.binary_operator_loc))
|
2933
2933
|
|
2934
2934
|
# value
|
2935
2935
|
table.field("value", port: true)
|
@@ -2938,8 +2938,8 @@ module Prism
|
|
2938
2938
|
# name
|
2939
2939
|
table.field("name", node.name.inspect)
|
2940
2940
|
|
2941
|
-
#
|
2942
|
-
table.field("
|
2941
|
+
# binary_operator
|
2942
|
+
table.field("binary_operator", node.binary_operator.inspect)
|
2943
2943
|
|
2944
2944
|
# depth
|
2945
2945
|
table.field("depth", node.depth.inspect)
|
data/lib/prism/dsl.rb
CHANGED
@@ -143,8 +143,8 @@ module Prism
|
|
143
143
|
end
|
144
144
|
|
145
145
|
# Create a new CallOperatorWriteNode node
|
146
|
-
def CallOperatorWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name,
|
147
|
-
CallOperatorWriteNode.new(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name,
|
146
|
+
def CallOperatorWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value, source = nil, location = Location())
|
147
|
+
CallOperatorWriteNode.new(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value, location)
|
148
148
|
end
|
149
149
|
|
150
150
|
# Create a new CallOrWriteNode node
|
@@ -183,8 +183,8 @@ module Prism
|
|
183
183
|
end
|
184
184
|
|
185
185
|
# Create a new ClassVariableOperatorWriteNode node
|
186
|
-
def ClassVariableOperatorWriteNode(name, name_loc,
|
187
|
-
ClassVariableOperatorWriteNode.new(source, name, name_loc,
|
186
|
+
def ClassVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = nil, location = Location())
|
187
|
+
ClassVariableOperatorWriteNode.new(source, name, name_loc, binary_operator_loc, value, binary_operator, location)
|
188
188
|
end
|
189
189
|
|
190
190
|
# Create a new ClassVariableOrWriteNode node
|
@@ -213,8 +213,8 @@ module Prism
|
|
213
213
|
end
|
214
214
|
|
215
215
|
# Create a new ConstantOperatorWriteNode node
|
216
|
-
def ConstantOperatorWriteNode(name, name_loc,
|
217
|
-
ConstantOperatorWriteNode.new(source, name, name_loc,
|
216
|
+
def ConstantOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = nil, location = Location())
|
217
|
+
ConstantOperatorWriteNode.new(source, name, name_loc, binary_operator_loc, value, binary_operator, location)
|
218
218
|
end
|
219
219
|
|
220
220
|
# Create a new ConstantOrWriteNode node
|
@@ -233,8 +233,8 @@ module Prism
|
|
233
233
|
end
|
234
234
|
|
235
235
|
# Create a new ConstantPathOperatorWriteNode node
|
236
|
-
def ConstantPathOperatorWriteNode(target,
|
237
|
-
ConstantPathOperatorWriteNode.new(source, target,
|
236
|
+
def ConstantPathOperatorWriteNode(target, binary_operator_loc, value, binary_operator, source = nil, location = Location())
|
237
|
+
ConstantPathOperatorWriteNode.new(source, target, binary_operator_loc, value, binary_operator, location)
|
238
238
|
end
|
239
239
|
|
240
240
|
# Create a new ConstantPathOrWriteNode node
|
@@ -343,8 +343,8 @@ module Prism
|
|
343
343
|
end
|
344
344
|
|
345
345
|
# Create a new GlobalVariableOperatorWriteNode node
|
346
|
-
def GlobalVariableOperatorWriteNode(name, name_loc,
|
347
|
-
GlobalVariableOperatorWriteNode.new(source, name, name_loc,
|
346
|
+
def GlobalVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = nil, location = Location())
|
347
|
+
GlobalVariableOperatorWriteNode.new(source, name, name_loc, binary_operator_loc, value, binary_operator, location)
|
348
348
|
end
|
349
349
|
|
350
350
|
# Create a new GlobalVariableOrWriteNode node
|
@@ -408,8 +408,8 @@ module Prism
|
|
408
408
|
end
|
409
409
|
|
410
410
|
# Create a new IndexOperatorWriteNode node
|
411
|
-
def IndexOperatorWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block,
|
412
|
-
IndexOperatorWriteNode.new(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block,
|
411
|
+
def IndexOperatorWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value, source = nil, location = Location())
|
412
|
+
IndexOperatorWriteNode.new(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value, location)
|
413
413
|
end
|
414
414
|
|
415
415
|
# Create a new IndexOrWriteNode node
|
@@ -428,8 +428,8 @@ module Prism
|
|
428
428
|
end
|
429
429
|
|
430
430
|
# Create a new InstanceVariableOperatorWriteNode node
|
431
|
-
def InstanceVariableOperatorWriteNode(name, name_loc,
|
432
|
-
InstanceVariableOperatorWriteNode.new(source, name, name_loc,
|
431
|
+
def InstanceVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = nil, location = Location())
|
432
|
+
InstanceVariableOperatorWriteNode.new(source, name, name_loc, binary_operator_loc, value, binary_operator, location)
|
433
433
|
end
|
434
434
|
|
435
435
|
# Create a new InstanceVariableOrWriteNode node
|
@@ -508,8 +508,8 @@ module Prism
|
|
508
508
|
end
|
509
509
|
|
510
510
|
# Create a new LocalVariableOperatorWriteNode node
|
511
|
-
def LocalVariableOperatorWriteNode(name_loc,
|
512
|
-
LocalVariableOperatorWriteNode.new(source, name_loc,
|
511
|
+
def LocalVariableOperatorWriteNode(name_loc, binary_operator_loc, value, name, binary_operator, depth, source = nil, location = Location())
|
512
|
+
LocalVariableOperatorWriteNode.new(source, name_loc, binary_operator_loc, value, name, binary_operator, depth, location)
|
513
513
|
end
|
514
514
|
|
515
515
|
# Create a new LocalVariableOrWriteNode node
|
data/lib/prism/ffi.rb
CHANGED
@@ -408,7 +408,7 @@ module Prism
|
|
408
408
|
values << dump_options_command_line(options)
|
409
409
|
|
410
410
|
template << "C"
|
411
|
-
values << { nil => 0, "3.3.0" => 1, "3.4.0" => 0, "latest" => 0 }.fetch(options[:version])
|
411
|
+
values << { nil => 0, "3.3.0" => 1, "3.3.1" => 1, "3.4.0" => 0, "latest" => 0 }.fetch(options[:version])
|
412
412
|
|
413
413
|
template << "L"
|
414
414
|
if (scopes = options[:scopes])
|
@@ -396,8 +396,8 @@ module Prism
|
|
396
396
|
commands << ["├── message_loc: #{inspect_location(node.message_loc)}\n", indent]
|
397
397
|
commands << ["├── read_name: #{node.read_name.inspect}\n", indent]
|
398
398
|
commands << ["├── write_name: #{node.write_name.inspect}\n", indent]
|
399
|
-
commands << ["├──
|
400
|
-
commands << ["├──
|
399
|
+
commands << ["├── binary_operator: #{node.binary_operator.inspect}\n", indent]
|
400
|
+
commands << ["├── binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent]
|
401
401
|
commands << ["└── value:\n", indent]
|
402
402
|
commands << [node.value, "#{indent} "]
|
403
403
|
end
|
@@ -539,10 +539,10 @@ module Prism
|
|
539
539
|
commands << [inspect_node("ClassVariableOperatorWriteNode", node), indent]
|
540
540
|
commands << ["├── name: #{node.name.inspect}\n", indent]
|
541
541
|
commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
|
542
|
-
commands << ["├──
|
542
|
+
commands << ["├── binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent]
|
543
543
|
commands << ["├── value:\n", indent]
|
544
544
|
commands << [node.value, "#{indent}│ "]
|
545
|
-
commands << ["└──
|
545
|
+
commands << ["└── binary_operator: #{node.binary_operator.inspect}\n", indent]
|
546
546
|
end
|
547
547
|
|
548
548
|
# Inspect a ClassVariableOrWriteNode node.
|
@@ -592,10 +592,10 @@ module Prism
|
|
592
592
|
commands << [inspect_node("ConstantOperatorWriteNode", node), indent]
|
593
593
|
commands << ["├── name: #{node.name.inspect}\n", indent]
|
594
594
|
commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
|
595
|
-
commands << ["├──
|
595
|
+
commands << ["├── binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent]
|
596
596
|
commands << ["├── value:\n", indent]
|
597
597
|
commands << [node.value, "#{indent}│ "]
|
598
|
-
commands << ["└──
|
598
|
+
commands << ["└── binary_operator: #{node.binary_operator.inspect}\n", indent]
|
599
599
|
end
|
600
600
|
|
601
601
|
# Inspect a ConstantOrWriteNode node.
|
@@ -641,10 +641,10 @@ module Prism
|
|
641
641
|
commands << [inspect_node("ConstantPathOperatorWriteNode", node), indent]
|
642
642
|
commands << ["├── target:\n", indent]
|
643
643
|
commands << [node.target, "#{indent}│ "]
|
644
|
-
commands << ["├──
|
644
|
+
commands << ["├── binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent]
|
645
645
|
commands << ["├── value:\n", indent]
|
646
646
|
commands << [node.value, "#{indent}│ "]
|
647
|
-
commands << ["└──
|
647
|
+
commands << ["└── binary_operator: #{node.binary_operator.inspect}\n", indent]
|
648
648
|
end
|
649
649
|
|
650
650
|
# Inspect a ConstantPathOrWriteNode node.
|
@@ -908,10 +908,10 @@ module Prism
|
|
908
908
|
commands << [inspect_node("GlobalVariableOperatorWriteNode", node), indent]
|
909
909
|
commands << ["├── name: #{node.name.inspect}\n", indent]
|
910
910
|
commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
|
911
|
-
commands << ["├──
|
911
|
+
commands << ["├── binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent]
|
912
912
|
commands << ["├── value:\n", indent]
|
913
913
|
commands << [node.value, "#{indent}│ "]
|
914
|
-
commands << ["└──
|
914
|
+
commands << ["└── binary_operator: #{node.binary_operator.inspect}\n", indent]
|
915
915
|
end
|
916
916
|
|
917
917
|
# Inspect a GlobalVariableOrWriteNode node.
|
@@ -1103,8 +1103,8 @@ module Prism
|
|
1103
1103
|
commands << ["├── block:\n", indent]
|
1104
1104
|
commands << [block, "#{indent}│ "]
|
1105
1105
|
end
|
1106
|
-
commands << ["├──
|
1107
|
-
commands << ["├──
|
1106
|
+
commands << ["├── binary_operator: #{node.binary_operator.inspect}\n", indent]
|
1107
|
+
commands << ["├── binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent]
|
1108
1108
|
commands << ["└── value:\n", indent]
|
1109
1109
|
commands << [node.value, "#{indent} "]
|
1110
1110
|
end
|
@@ -1178,10 +1178,10 @@ module Prism
|
|
1178
1178
|
commands << [inspect_node("InstanceVariableOperatorWriteNode", node), indent]
|
1179
1179
|
commands << ["├── name: #{node.name.inspect}\n", indent]
|
1180
1180
|
commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
|
1181
|
-
commands << ["├──
|
1181
|
+
commands << ["├── binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent]
|
1182
1182
|
commands << ["├── value:\n", indent]
|
1183
1183
|
commands << [node.value, "#{indent}│ "]
|
1184
|
-
commands << ["└──
|
1184
|
+
commands << ["└── binary_operator: #{node.binary_operator.inspect}\n", indent]
|
1185
1185
|
end
|
1186
1186
|
|
1187
1187
|
# Inspect a InstanceVariableOrWriteNode node.
|
@@ -1381,11 +1381,11 @@ module Prism
|
|
1381
1381
|
def visit_local_variable_operator_write_node(node)
|
1382
1382
|
commands << [inspect_node("LocalVariableOperatorWriteNode", node), indent]
|
1383
1383
|
commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
|
1384
|
-
commands << ["├──
|
1384
|
+
commands << ["├── binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent]
|
1385
1385
|
commands << ["├── value:\n", indent]
|
1386
1386
|
commands << [node.value, "#{indent}│ "]
|
1387
1387
|
commands << ["├── name: #{node.name.inspect}\n", indent]
|
1388
|
-
commands << ["├──
|
1388
|
+
commands << ["├── binary_operator: #{node.binary_operator.inspect}\n", indent]
|
1389
1389
|
commands << ["└── depth: #{node.depth.inspect}\n", indent]
|
1390
1390
|
end
|
1391
1391
|
|