prism 0.27.0 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +45 -1
  3. data/config.yml +68 -44
  4. data/docs/configuration.md +1 -0
  5. data/ext/prism/api_node.c +854 -847
  6. data/ext/prism/extconf.rb +27 -23
  7. data/ext/prism/extension.c +5 -3
  8. data/ext/prism/extension.h +1 -1
  9. data/include/prism/ast.h +70 -48
  10. data/include/prism/diagnostic.h +23 -6
  11. data/include/prism/options.h +2 -2
  12. data/include/prism/parser.h +10 -0
  13. data/include/prism/static_literals.h +8 -6
  14. data/include/prism/version.h +2 -2
  15. data/lib/prism/desugar_compiler.rb +4 -4
  16. data/lib/prism/dot_visitor.rb +54 -38
  17. data/lib/prism/dsl.rb +24 -24
  18. data/lib/prism/ffi.rb +4 -4
  19. data/lib/prism/inspect_visitor.rb +2156 -0
  20. data/lib/prism/lex_compat.rb +1 -1
  21. data/lib/prism/mutation_compiler.rb +2 -2
  22. data/lib/prism/node.rb +737 -1863
  23. data/lib/prism/node_ext.rb +176 -5
  24. data/lib/prism/parse_result/comments.rb +1 -1
  25. data/lib/prism/parse_result/newlines.rb +1 -1
  26. data/lib/prism/parse_result.rb +78 -0
  27. data/lib/prism/pattern.rb +12 -6
  28. data/lib/prism/polyfill/byteindex.rb +13 -0
  29. data/lib/prism/polyfill/unpack1.rb +14 -0
  30. data/lib/prism/reflection.rb +20 -20
  31. data/lib/prism/serialize.rb +32 -15
  32. data/lib/prism/translation/parser/compiler.rb +156 -26
  33. data/lib/prism/translation/parser.rb +7 -7
  34. data/lib/prism/translation/ripper.rb +29 -25
  35. data/lib/prism/translation/ruby_parser.rb +13 -13
  36. data/lib/prism.rb +2 -1
  37. data/prism.gemspec +37 -38
  38. data/rbi/prism/compiler.rbi +3 -5
  39. data/rbi/prism/inspect_visitor.rbi +12 -0
  40. data/rbi/prism/node.rbi +405 -370
  41. data/rbi/prism/node_ext.rbi +5 -0
  42. data/rbi/prism/parse_result.rbi +23 -0
  43. data/rbi/prism/translation/ripper.rbi +1 -11
  44. data/sig/prism/dsl.rbs +12 -12
  45. data/sig/prism/inspect_visitor.rbs +22 -0
  46. data/sig/prism/lex_compat.rbs +10 -0
  47. data/sig/prism/node.rbs +108 -91
  48. data/sig/prism/node_ext.rbs +4 -0
  49. data/sig/prism/parse_result.rbs +12 -0
  50. data/src/diagnostic.c +66 -33
  51. data/src/node.c +89 -64
  52. data/src/options.c +2 -2
  53. data/src/prettyprint.c +109 -66
  54. data/src/prism.c +862 -317
  55. data/src/serialize.c +21 -18
  56. data/src/static_literals.c +120 -34
  57. data/src/token_type.c +6 -6
  58. metadata +8 -9
  59. data/lib/prism/node_inspector.rb +0 -68
  60. data/lib/prism/polyfill/string.rb +0 -12
  61. data/rbi/prism/desugar_compiler.rbi +0 -5
  62. data/rbi/prism/mutation_compiler.rbi +0 -5
  63. data/rbi/prism/translation/parser/compiler.rbi +0 -13
  64. data/rbi/prism/translation/ripper/ripper_compiler.rbi +0 -5
  65. data/rbi/prism/translation/ruby_parser.rbi +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c27362d3d2d174aeaeab0db8eaf69b47d618f4c2948c9c8a55e96cb927c1ddd6
4
- data.tar.gz: f66f7d1e74c9e35c5ce45e8e34240f90cfc659bc5641048f81f3835ae52fd584
3
+ metadata.gz: 4ac8167684c0f975fdba449e77206d97756f6c39f22ce871f79a79a61260503f
4
+ data.tar.gz: 6a2dd5c0a47df7c8c575ad2e5b344c789d548e93cfe82e5fa29974d46a52bb3c
5
5
  SHA512:
6
- metadata.gz: dc64bd0ead37af96b5632498babd6860c9f257c98b0f9dc7aae2c78d6a853b9b95ef6a2f625f61ee1348ef41645e5d4c3f256c30357abca33d7d9387b2a76e2e
7
- data.tar.gz: 34f22069e23dc9adf8c7968e7dcf929b479ef3650c909c4c3ad142e858d89c529bc53b6bd38c40fa7f00340dbafabb86fdf59ab6ba3367b71f64c43201b4e99a
6
+ metadata.gz: dfa7fe63285b85cb45aa0be681916d6891ee5e5adf2162ab5c18423417f7938afc99f00eca8fd6187fbd0b7168af088d932fbda3c1361d1c73953f39329bed70
7
+ data.tar.gz: 79bc51db60600d74a6bfbeae5eba3a8ec505e9809d0f7ff0b05563f1f7a8cd284cc293233397323a443217a4a5271f90b4c40516168ae3a8be0ddc2d7376cef9
data/CHANGELOG.md CHANGED
@@ -6,6 +6,48 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.29.0] - 2024-05-10
10
+
11
+ ### Added
12
+
13
+ - Added `Prism::CallNode#full_message_loc`, which gives the location including the `=` if there is one.
14
+ - A warning for when `# shareable_constant_value` is not used on its own line.
15
+ - An error for invalid implicit local variable writes.
16
+ - Implicit hash patterns in array patterns are disallowed.
17
+ - We now validate that Unicode escape sequences are not surrogates.
18
+
19
+ ### Changed
20
+
21
+ - All fields named `operator` have been renamed to `binary_operator` for `*OperatorWriteNode` nodes. This is to make it easier to provide C++ support. In the Ruby API, the old fields are aliased to the new fields with a deprecation warning.
22
+ - Many updated error messages to more closely match CRuby.
23
+ - We ensure keyword parameters do not end in `!` or `?`.
24
+ - Fixed some escaping in string literals with control sequences and hex escapes.
25
+ - Fix a bug with RBS types when used outside the `ruby/prism` codebase.
26
+
27
+ ## [0.28.0] - 2024-05-03
28
+
29
+ ### Added
30
+
31
+ - Nested hashes will now warn for duplicated keys, as in: `{ foo: 1, **{ foo: 2 } }`.
32
+ - `Prism::ReturnNode` now has a flag on it to indicate if it is redundant.
33
+ - `Prism::Location#slice_lines` and `Prism::Node#slice_lines` are now provided to slice the source code of a node including the content before the node on the same line that it starts on and the content after the node on the same line that it ends on.
34
+ - Symbols with invalid byte sequences now give errors.
35
+ - You can now pass `"3.3.1"` to the `version:` parameter on all `Prism.*` APIs.
36
+ - `Prism::Source#lines`, `Prism::Location#source_lines`, `Prism::Node#source_lines`, and `Prism::Node#script_lines` are now provided, which will all return the source code of the source as an array of strings.
37
+ - `Prism::ASCIISource` is now provided, which is a subclass of `Prism::Source` but specialized to increase performance when the source is entirely ASCII.
38
+ - Prism now provides errors when parsing Ruby 3.4+ syntax for index expressions with keywords or blocks.
39
+ - Prism now provides an error when `**nil` is used after other keyword parameters.
40
+ - Prism now provides errors when safe navigation is used in call target expressions, e.g., `foo&.bar, = 1`.
41
+ - `Prism::Node#tunnel` is now provided, which returns an array of nodes starting at the current node that contain a given line and column.
42
+
43
+ ### Changed
44
+
45
+ - All translation layers now assume an eval context, which means they will not return errors for invalid jumps like `yield`.
46
+ - `Prism::Node#inspect` now uses a queue instead of recursion to avoid stack overflows.
47
+ - Prism now more closely mirrors CRuby interpolation semantics, which means you could potentially have a static literal string that directly interpolates another static literal string.
48
+ - The shipped RBI sorbet types no longer use generics.
49
+ - `Prism::ConstantPathNode#child` and `Prism::ConstantTargetNode#child` are now deprecated, replaced by two new fields on these nodes: `name` and `name_loc`.
50
+
9
51
  ## [0.27.0] - 2024-04-23
10
52
 
11
53
  ### Added
@@ -476,7 +518,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
476
518
 
477
519
  - 🎉 Initial release! 🎉
478
520
 
479
- [unreleased]: https://github.com/ruby/prism/compare/v0.27.0...HEAD
521
+ [unreleased]: https://github.com/ruby/prism/compare/v0.29.0...HEAD
522
+ [0.29.0]: https://github.com/ruby/prism/compare/v0.28.0...v0.29.0
523
+ [0.28.0]: https://github.com/ruby/prism/compare/v0.27.0...v0.28.0
480
524
  [0.27.0]: https://github.com/ruby/prism/compare/v0.26.0...v0.27.0
481
525
  [0.26.0]: https://github.com/ruby/prism/compare/v0.25.0...v0.26.0
482
526
  [0.25.0]: https://github.com/ruby/prism/compare/v0.24.0...v0.25.0
data/config.yml CHANGED
@@ -7,13 +7,16 @@ errors:
7
7
  - ARGUMENT_BARE_HASH
8
8
  - ARGUMENT_BLOCK_FORWARDING
9
9
  - ARGUMENT_BLOCK_MULTI
10
+ - ARGUMENT_CONFLICT_AMPERSAND
11
+ - ARGUMENT_CONFLICT_STAR
12
+ - ARGUMENT_CONFLICT_STAR_STAR
10
13
  - ARGUMENT_FORMAL_CLASS
11
14
  - ARGUMENT_FORMAL_CONSTANT
12
15
  - ARGUMENT_FORMAL_GLOBAL
13
16
  - ARGUMENT_FORMAL_IVAR
14
17
  - ARGUMENT_FORWARDING_UNBOUND
15
18
  - ARGUMENT_IN
16
- - ARGUMENT_NO_FORWARDING_AMP
19
+ - ARGUMENT_NO_FORWARDING_AMPERSAND
17
20
  - ARGUMENT_NO_FORWARDING_ELLIPSES
18
21
  - ARGUMENT_NO_FORWARDING_STAR
19
22
  - ARGUMENT_NO_FORWARDING_STAR_STAR
@@ -95,6 +98,7 @@ errors:
95
98
  - EXPECT_EXPRESSION_AFTER_SPLAT_HASH
96
99
  - EXPECT_EXPRESSION_AFTER_STAR
97
100
  - EXPECT_IDENT_REQ_PARAMETER
101
+ - EXPECT_IN_DELIMITER
98
102
  - EXPECT_LPAREN_REQ_PARAMETER
99
103
  - EXPECT_MESSAGE
100
104
  - EXPECT_RBRACKET
@@ -123,16 +127,18 @@ errors:
123
127
  - HASH_ROCKET
124
128
  - HASH_TERM
125
129
  - HASH_VALUE
130
+ - HEREDOC_IDENTIFIER
126
131
  - HEREDOC_TERM
127
132
  - INCOMPLETE_QUESTION_MARK
128
133
  - INCOMPLETE_VARIABLE_CLASS
129
- - INCOMPLETE_VARIABLE_CLASS_3_3_0
134
+ - INCOMPLETE_VARIABLE_CLASS_3_3
130
135
  - INCOMPLETE_VARIABLE_INSTANCE
131
- - INCOMPLETE_VARIABLE_INSTANCE_3_3_0
136
+ - INCOMPLETE_VARIABLE_INSTANCE_3_3
132
137
  - INSTANCE_VARIABLE_BARE
133
138
  - INVALID_BLOCK_EXIT
134
139
  - INVALID_CHARACTER
135
140
  - INVALID_ENCODING_MAGIC_COMMENT
141
+ - INVALID_ESCAPE_CHARACTER
136
142
  - INVALID_FLOAT_EXPONENT
137
143
  - INVALID_LOCAL_VARIABLE_READ
138
144
  - INVALID_LOCAL_VARIABLE_WRITE
@@ -141,16 +147,19 @@ errors:
141
147
  - INVALID_MULTIBYTE_ESCAPE
142
148
  - INVALID_NUMBER_BINARY
143
149
  - INVALID_NUMBER_DECIMAL
150
+ - INVALID_NUMBER_FRACTION
144
151
  - INVALID_NUMBER_HEXADECIMAL
145
152
  - INVALID_NUMBER_OCTAL
146
- - INVALID_NUMBER_UNDERSCORE
153
+ - INVALID_NUMBER_UNDERSCORE_INNER
154
+ - INVALID_NUMBER_UNDERSCORE_TRAILING
147
155
  - INVALID_PERCENT
148
156
  - INVALID_PRINTABLE_CHARACTER
149
157
  - INVALID_RETRY_AFTER_ELSE
150
158
  - INVALID_RETRY_AFTER_ENSURE
151
159
  - INVALID_RETRY_WITHOUT_RESCUE
160
+ - INVALID_SYMBOL
152
161
  - INVALID_VARIABLE_GLOBAL
153
- - INVALID_VARIABLE_GLOBAL_3_3_0
162
+ - INVALID_VARIABLE_GLOBAL_3_3
154
163
  - INVALID_YIELD
155
164
  - IT_NOT_ALLOWED_NUMBERED
156
165
  - IT_NOT_ALLOWED_ORDINARY
@@ -184,6 +193,7 @@ errors:
184
193
  - PARAMETER_ASSOC_SPLAT_MULTI
185
194
  - PARAMETER_BLOCK_MULTI
186
195
  - PARAMETER_CIRCULAR
196
+ - PARAMETER_FORWARDING_AFTER_REST
187
197
  - PARAMETER_METHOD_NAME
188
198
  - PARAMETER_NAME_DUPLICATED
189
199
  - PARAMETER_NO_DEFAULT
@@ -194,6 +204,7 @@ errors:
194
204
  - PARAMETER_STAR
195
205
  - PARAMETER_UNEXPECTED_FWD
196
206
  - PARAMETER_WILD_LOOSE_COMMA
207
+ - PARAMETER_UNEXPECTED_NO_KW
197
208
  - PATTERN_CAPTURE_DUPLICATE
198
209
  - PATTERN_EXPRESSION_AFTER_BRACKET
199
210
  - PATTERN_EXPRESSION_AFTER_COMMA
@@ -205,8 +216,10 @@ errors:
205
216
  - PATTERN_EXPRESSION_AFTER_PIPE
206
217
  - PATTERN_EXPRESSION_AFTER_RANGE
207
218
  - PATTERN_EXPRESSION_AFTER_REST
219
+ - PATTERN_HASH_IMPLICIT
208
220
  - PATTERN_HASH_KEY
209
221
  - PATTERN_HASH_KEY_DUPLICATE
222
+ - PATTERN_HASH_KEY_INTERPOLATED
210
223
  - PATTERN_HASH_KEY_LABEL
211
224
  - PATTERN_HASH_KEY_LOCALS
212
225
  - PATTERN_IDENT_AFTER_HROCKET
@@ -247,6 +260,9 @@ errors:
247
260
  - UNARY_RECEIVER
248
261
  - UNDEF_ARGUMENT
249
262
  - UNEXPECTED_BLOCK_ARGUMENT
263
+ - UNEXPECTED_INDEX_BLOCK
264
+ - UNEXPECTED_INDEX_KEYWORDS
265
+ - UNEXPECTED_SAFE_NAVIGATION
250
266
  - UNEXPECTED_TOKEN_CLOSE_CONTEXT
251
267
  - UNEXPECTED_TOKEN_IGNORE
252
268
  - UNTIL_TERM
@@ -266,7 +282,7 @@ warnings:
266
282
  - COMPARISON_AFTER_COMPARISON
267
283
  - DOT_DOT_DOT_EOL
268
284
  - EQUAL_IN_CONDITIONAL
269
- - EQUAL_IN_CONDITIONAL_3_3_0
285
+ - EQUAL_IN_CONDITIONAL_3_3
270
286
  - END_IN_METHOD
271
287
  - DUPLICATED_HASH_KEY
272
288
  - DUPLICATED_WHEN_CLAUSE
@@ -279,6 +295,7 @@ warnings:
279
295
  - KEYWORD_EOL
280
296
  - LITERAL_IN_CONDITION_DEFAULT
281
297
  - LITERAL_IN_CONDITION_VERBOSE
298
+ - SHAREABLE_CONSTANT_VALUE_LINE
282
299
  - SHEBANG_CARRIAGE_RETURN
283
300
  - UNEXPECTED_CARRIAGE_RETURN
284
301
  - UNREACHABLE_STATEMENT
@@ -617,6 +634,8 @@ tokens:
617
634
  flags:
618
635
  - name: ArgumentsNodeFlags
619
636
  values:
637
+ - name: CONTAINS_KEYWORDS
638
+ comment: "if arguments contain keywords"
620
639
  - name: CONTAINS_KEYWORD_SPLAT
621
640
  comment: "if arguments contain keyword splat"
622
641
  comment: Flags for arguments nodes.
@@ -706,6 +725,11 @@ flags:
706
725
  - name: FORCED_US_ASCII_ENCODING
707
726
  comment: "internal bytes forced the encoding to US-ASCII"
708
727
  comment: Flags for regular expression and match last line nodes.
728
+ - name: ReturnNodeFlags
729
+ values:
730
+ - name: REDUNDANT
731
+ comment: "a return statement that is redundant because it is the last statement in a method"
732
+ comment: Flags for return nodes.
709
733
  - name: ShareableConstantNodeFlags
710
734
  values:
711
735
  - name: LITERAL
@@ -1189,9 +1213,9 @@ nodes:
1189
1213
  type: constant
1190
1214
  - name: write_name
1191
1215
  type: constant
1192
- - name: operator
1216
+ - name: binary_operator
1193
1217
  type: constant
1194
- - name: operator_loc
1218
+ - name: binary_operator_loc
1195
1219
  type: location
1196
1220
  - name: value
1197
1221
  type: node
@@ -1347,11 +1371,11 @@ nodes:
1347
1371
  type: constant
1348
1372
  - name: name_loc
1349
1373
  type: location
1350
- - name: operator_loc
1374
+ - name: binary_operator_loc
1351
1375
  type: location
1352
1376
  - name: value
1353
1377
  type: node
1354
- - name: operator
1378
+ - name: binary_operator
1355
1379
  type: constant
1356
1380
  comment: |
1357
1381
  Represents assigning to a class variable using an operator that isn't `=`.
@@ -1457,11 +1481,11 @@ nodes:
1457
1481
  type: constant
1458
1482
  - name: name_loc
1459
1483
  type: location
1460
- - name: operator_loc
1484
+ - name: binary_operator_loc
1461
1485
  type: location
1462
1486
  - name: value
1463
1487
  type: node
1464
- - name: operator
1488
+ - name: binary_operator
1465
1489
  type: constant
1466
1490
  comment: |
1467
1491
  Represents assigning to a constant using an operator that isn't `=`.
@@ -1512,23 +1536,9 @@ nodes:
1512
1536
 
1513
1537
  a.b::C
1514
1538
  ^^^
1515
- - name: child
1516
- type: node
1517
- kind:
1518
- - ConstantReadNode
1519
- - MissingNode
1520
- comment: |
1521
- The right-hand node of the path. Always a `ConstantReadNode` in a
1522
- valid Ruby syntax tree.
1523
-
1524
- ::Foo
1525
- ^^^
1526
-
1527
- self::Test
1528
- ^^^^
1529
-
1530
- a.b::C
1531
- ^
1539
+ - name: name
1540
+ type: constant?
1541
+ comment: The name of the constant being accessed. This could be `nil` in the event of a syntax error.
1532
1542
  - name: delimiter_loc
1533
1543
  type: location
1534
1544
  comment: |
@@ -1539,6 +1549,16 @@ nodes:
1539
1549
 
1540
1550
  One::Two
1541
1551
  ^^
1552
+ - name: name_loc
1553
+ type: location
1554
+ comment: |
1555
+ The location of the name of the constant.
1556
+
1557
+ ::Foo
1558
+ ^^^
1559
+
1560
+ One::Two
1561
+ ^^^
1542
1562
  comment: |
1543
1563
  Represents accessing a constant through a path of `::` operators.
1544
1564
 
@@ -1549,11 +1569,11 @@ nodes:
1549
1569
  - name: target
1550
1570
  type: node
1551
1571
  kind: ConstantPathNode
1552
- - name: operator_loc
1572
+ - name: binary_operator_loc
1553
1573
  type: location
1554
1574
  - name: value
1555
1575
  type: node
1556
- - name: operator
1576
+ - name: binary_operator
1557
1577
  type: constant
1558
1578
  comment: |
1559
1579
  Represents assigning to a constant path using an operator that isn't `=`.
@@ -1578,13 +1598,12 @@ nodes:
1578
1598
  fields:
1579
1599
  - name: parent
1580
1600
  type: node?
1581
- - name: child
1582
- type: node
1583
- kind:
1584
- - ConstantReadNode
1585
- - MissingNode
1601
+ - name: name
1602
+ type: constant?
1586
1603
  - name: delimiter_loc
1587
1604
  type: location
1605
+ - name: name_loc
1606
+ type: location
1588
1607
  comment: |
1589
1608
  Represents writing to a constant path in a context that doesn't have an explicit value.
1590
1609
 
@@ -1921,11 +1940,11 @@ nodes:
1921
1940
  type: constant
1922
1941
  - name: name_loc
1923
1942
  type: location
1924
- - name: operator_loc
1943
+ - name: binary_operator_loc
1925
1944
  type: location
1926
1945
  - name: value
1927
1946
  type: node
1928
- - name: operator
1947
+ - name: binary_operator
1929
1948
  type: constant
1930
1949
  comment: |
1931
1950
  Represents assigning to a global variable using an operator that isn't `=`.
@@ -2257,9 +2276,9 @@ nodes:
2257
2276
  type: location
2258
2277
  - name: block
2259
2278
  type: node?
2260
- - name: operator
2279
+ - name: binary_operator
2261
2280
  type: constant
2262
- - name: operator_loc
2281
+ - name: binary_operator_loc
2263
2282
  type: location
2264
2283
  - name: value
2265
2284
  type: node
@@ -2345,11 +2364,11 @@ nodes:
2345
2364
  type: constant
2346
2365
  - name: name_loc
2347
2366
  type: location
2348
- - name: operator_loc
2367
+ - name: binary_operator_loc
2349
2368
  type: location
2350
2369
  - name: value
2351
2370
  type: node
2352
- - name: operator
2371
+ - name: binary_operator
2353
2372
  type: constant
2354
2373
  comment: |
2355
2374
  Represents assigning to an instance variable using an operator that isn't `=`.
@@ -2625,13 +2644,13 @@ nodes:
2625
2644
  fields:
2626
2645
  - name: name_loc
2627
2646
  type: location
2628
- - name: operator_loc
2647
+ - name: binary_operator_loc
2629
2648
  type: location
2630
2649
  - name: value
2631
2650
  type: node
2632
2651
  - name: name
2633
2652
  type: constant
2634
- - name: operator
2653
+ - name: binary_operator
2635
2654
  type: constant
2636
2655
  - name: depth
2637
2656
  type: uint32
@@ -3066,6 +3085,8 @@ nodes:
3066
3085
  # On parsing error of `f(**kwargs, ...)` or `f(**nil, ...)`, the keyword_rest value is moved here:
3067
3086
  - KeywordRestParameterNode
3068
3087
  - NoKeywordsParameterNode
3088
+ # On parsing error of `f(..., ...)`, the first forwarding parameter is moved here:
3089
+ - ForwardingParameterNode
3069
3090
  - name: keywords
3070
3091
  type: node[]
3071
3092
  kind:
@@ -3330,6 +3351,9 @@ nodes:
3330
3351
  ^^^^^
3331
3352
  - name: ReturnNode
3332
3353
  fields:
3354
+ - name: flags
3355
+ type: flags
3356
+ kind: ReturnNodeFlags
3333
3357
  - name: keyword_loc
3334
3358
  type: location
3335
3359
  - name: arguments
@@ -14,6 +14,7 @@ A lot of code in prism's repository is templated from a single configuration fil
14
14
  * `lib/prism/dispatcher.rb` - for defining the dispatch visitors for the nodes in Ruby
15
15
  * `lib/prism/dot_visitor.rb` - for defining the dot visitor for the nodes in Ruby
16
16
  * `lib/prism/dsl.rb` - for defining the DSL for the nodes in Ruby
17
+ * `lib/prism/inspect_visitor.rb` - for defining the `#inspect` methods on nodes in Ruby
17
18
  * `lib/prism/mutation_compiler.rb` - for defining the mutation compiler for the nodes in Ruby
18
19
  * `lib/prism/node.rb` - for defining the nodes in Ruby
19
20
  * `lib/prism/reflection.rb` - for defining the reflection API in Ruby