prism 1.9.0 → 2.0.0.rc2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +88 -0
- data/CODE_OF_CONDUCT.md +1 -1
- data/LICENSE.md +1 -1
- data/Makefile +41 -12
- data/README.md +35 -97
- data/config.yml +174 -161
- data/docs/build_system.md +2 -2
- data/docs/configuration.md +5 -4
- data/docs/encoding.md +2 -2
- data/docs/fuzzing.md +4 -11
- data/docs/javascript.md +19 -4
- data/docs/mapping.md +1 -1
- data/docs/releasing.md +77 -5
- data/docs/relocation.md +2 -4
- data/docs/serialization.md +22 -24
- data/docs/testing.md +46 -29
- data/ext/prism/api_node.c +1461 -1401
- data/ext/prism/extconf.rb +3 -4
- data/ext/prism/extension.c +796 -422
- data/ext/prism/extension.h +3 -3
- data/include/prism/arena.h +37 -0
- data/include/prism/ast.h +2727 -610
- data/include/prism/buffer.h +52 -0
- data/include/prism/comments.h +55 -0
- data/include/prism/compiler/accel.h +26 -0
- data/include/prism/compiler/align.h +36 -0
- data/include/prism/compiler/assume.h +25 -0
- data/include/prism/compiler/bswap.h +46 -0
- data/include/prism/compiler/endianness.h +34 -0
- data/include/prism/compiler/exported.h +24 -0
- data/include/prism/compiler/fallthrough.h +22 -0
- data/include/prism/compiler/filesystem.h +32 -0
- data/include/prism/compiler/flex_array.h +19 -0
- data/include/prism/compiler/force_inline.h +21 -0
- data/include/prism/compiler/format.h +25 -0
- data/include/prism/compiler/inline.h +17 -0
- data/include/prism/compiler/nodiscard.h +22 -0
- data/include/prism/compiler/nonnull.h +18 -0
- data/include/prism/compiler/unused.h +18 -0
- data/include/prism/constant_pool.h +81 -0
- data/include/prism/diagnostic.h +38 -403
- data/include/prism/errors_format.h +53 -0
- data/include/prism/excludes.h +29 -0
- data/include/prism/integer.h +41 -0
- data/include/prism/internal/allocator.h +68 -0
- data/include/prism/internal/allocator_debug.h +88 -0
- data/include/prism/internal/arena.h +108 -0
- data/include/prism/internal/bit.h +42 -0
- data/include/prism/internal/buffer.h +94 -0
- data/include/prism/internal/char.h +145 -0
- data/include/prism/internal/comments.h +53 -0
- data/include/prism/internal/constant_pool.h +152 -0
- data/include/prism/internal/diagnostic.h +389 -0
- data/include/prism/{encoding.h → internal/encoding.h} +27 -68
- data/include/prism/internal/integer.h +68 -0
- data/include/prism/internal/isinf.h +16 -0
- data/include/prism/internal/line_offset_list.h +34 -0
- data/include/prism/{util/pm_list.h → internal/list.h} +11 -52
- data/include/prism/internal/magic_comments.h +23 -0
- data/include/prism/internal/memchr.h +15 -0
- data/include/prism/internal/node.h +38 -0
- data/include/prism/internal/options.h +232 -0
- data/include/prism/internal/parser.h +1004 -0
- data/include/prism/internal/regexp.h +26 -0
- data/include/prism/internal/serialize.h +39 -0
- data/include/prism/internal/source.h +72 -0
- data/include/prism/{static_literals.h → internal/static_literals.h} +26 -47
- data/include/prism/internal/stringy.h +35 -0
- data/include/prism/{util/pm_strncasecmp.h → internal/strncasecmp.h} +3 -17
- data/include/prism/{util/pm_strpbrk.h → internal/strpbrk.h} +7 -20
- data/include/prism/internal/tokens.h +11 -0
- data/include/prism/internal/xxh3.h +16 -0
- data/include/prism/json.h +32 -0
- data/include/prism/line_offset_list.h +61 -0
- data/include/prism/magic_comments.h +35 -0
- data/include/prism/node.h +18 -53
- data/include/prism/options.h +146 -280
- data/include/prism/parser.h +356 -867
- data/include/prism/prettyprint.h +6 -9
- data/include/prism/serialize.h +115 -0
- data/include/prism/source.h +155 -0
- data/include/prism/stream.h +28 -0
- data/include/prism/string_query.h +74 -0
- data/include/prism/stringy.h +72 -0
- data/include/prism/version.h +12 -3
- data/include/prism.h +43 -320
- data/lib/prism/compiler.rb +319 -305
- data/lib/prism/desugar_compiler.rb +105 -34
- data/lib/prism/dispatcher.rb +646 -473
- data/lib/prism/dot_visitor.rb +592 -511
- data/lib/prism/dsl.rb +391 -25
- data/lib/prism/ffi.rb +258 -90
- data/lib/prism/inspect_visitor.rb +357 -325
- data/lib/prism/lex_compat.rb +254 -212
- data/lib/prism/mutation_compiler.rb +313 -305
- data/lib/prism/node.rb +20966 -6992
- data/lib/prism/node_ext.rb +180 -187
- data/lib/prism/node_find.rb +215 -0
- data/lib/prism/parse_result/errors.rb +7 -1
- data/lib/prism/parse_result/newlines.rb +276 -8
- data/lib/prism/parse_result.rb +468 -139
- data/lib/prism/pattern.rb +65 -20
- data/lib/prism/reflection.rb +23 -12
- data/lib/prism/relocation.rb +149 -87
- data/lib/prism/serialize.rb +3460 -539
- data/lib/prism/string_query.rb +24 -1
- data/lib/prism/translation/parser/builder.rb +10 -2
- data/lib/prism/translation/parser/compiler.rb +44 -52
- data/lib/prism/translation/parser/lexer.rb +41 -92
- data/lib/prism/translation/parser.rb +1 -1
- data/lib/prism/translation/parser_current.rb +1 -1
- data/lib/prism/translation/ripper/lexer.rb +8 -10
- data/lib/prism/translation/ripper/sexp.rb +2 -10
- data/lib/prism/translation/ripper/shim.rb +2 -0
- data/lib/prism/translation/ripper.rb +967 -209
- data/lib/prism/translation/ruby_parser.rb +73 -316
- data/lib/prism/translation.rb +2 -0
- data/lib/prism/visitor.rb +632 -5
- data/lib/prism.rb +79 -9
- data/prism.gemspec +128 -62
- data/rbi/generated/prism/compiler.rbi +489 -0
- data/rbi/generated/prism/desugar_compiler.rbi +306 -0
- data/rbi/generated/prism/dispatcher.rbi +1138 -0
- data/rbi/generated/prism/dot_visitor.rbi +618 -0
- data/rbi/generated/prism/dsl.rbi +751 -0
- data/rbi/generated/prism/inspect_visitor.rbi +503 -0
- data/rbi/generated/prism/lex_compat.rbi +162 -0
- data/rbi/generated/prism/mutation_compiler.rbi +464 -0
- data/rbi/generated/prism/node.rbi +14407 -0
- data/rbi/generated/prism/node_ext.rbi +259 -0
- data/rbi/generated/prism/node_find.rbi +79 -0
- data/rbi/generated/prism/parse_result/errors.rbi +21 -0
- data/rbi/generated/prism/parse_result/newlines.rbi +208 -0
- data/rbi/generated/prism/parse_result.rbi +776 -0
- data/rbi/generated/prism/pattern.rbi +134 -0
- data/rbi/generated/prism/reflection.rbi +89 -0
- data/rbi/generated/prism/relocation.rbi +329 -0
- data/rbi/generated/prism/serialize.rbi +184 -0
- data/rbi/generated/prism/string_query.rbi +43 -0
- data/rbi/generated/prism/translation.rbi +7 -0
- data/rbi/generated/prism/visitor.rbi +650 -0
- data/rbi/generated/prism.rbi +86 -0
- data/rbi/prism/translation/parser_versions.rbi +5 -0
- data/rbi/rubyvm/node_find.rbi +14 -0
- data/sig/generated/prism/compiler.rbs +492 -0
- data/sig/generated/prism/desugar_compiler.rbs +305 -0
- data/sig/generated/prism/dispatcher.rbs +1292 -0
- data/sig/generated/prism/dot_visitor.rbs +635 -0
- data/sig/generated/prism/dsl.rbs +928 -0
- data/sig/generated/prism/inspect_visitor.rbs +509 -0
- data/sig/generated/prism/lex_compat.rbs +166 -0
- data/sig/{prism → generated/prism}/mutation_compiler.rbs +309 -4
- data/sig/generated/prism/node.rbs +20896 -0
- data/sig/generated/prism/node_ext.rbs +290 -0
- data/sig/generated/prism/node_find.rbs +90 -0
- data/sig/generated/prism/parse_result/errors.rbs +22 -0
- data/sig/generated/prism/parse_result/newlines.rbs +223 -0
- data/sig/generated/prism/parse_result.rbs +871 -0
- data/sig/generated/prism/pattern.rbs +156 -0
- data/sig/generated/prism/reflection.rbs +101 -0
- data/sig/generated/prism/relocation.rbs +428 -0
- data/sig/generated/prism/serialize.rbs +198 -0
- data/sig/generated/prism/string_query.rbs +43 -0
- data/sig/generated/prism/translation.rbs +8 -0
- data/sig/generated/prism/visitor.rbs +1111 -0
- data/sig/generated/prism.rbs +84 -0
- data/sig/manifest.yaml +2 -0
- data/src/arena.c +117 -0
- data/src/{util/pm_buffer.c → buffer.c} +53 -21
- data/src/{util/pm_char.c → char.c} +28 -57
- data/src/comments.c +454 -0
- data/src/constant_pool.c +406 -0
- data/src/diagnostic.c +97 -65
- data/src/encoding.c +8 -3
- data/src/errors_format.c +519 -0
- data/src/{util/pm_integer.c → integer.c} +33 -22
- data/src/json.c +5733 -0
- data/src/line_offset_list.c +100 -0
- data/src/list.c +24 -0
- data/src/{util/pm_memchr.c → memchr.c} +8 -6
- data/src/node.c +3504 -7674
- data/src/options.c +162 -49
- data/src/parser.c +367 -0
- data/src/prettyprint.c +421 -354
- data/src/prism.c +8402 -7161
- data/src/regexp.c +961 -45
- data/src/serialize.c +460 -424
- data/src/source.c +518 -0
- data/src/static_literals.c +111 -43
- data/src/string_query.c +180 -0
- data/src/stringy.c +91 -0
- data/src/{util/pm_strncasecmp.c → strncasecmp.c} +5 -4
- data/src/strpbrk.c +447 -0
- data/src/{token_type.c → tokens.c} +39 -18
- data/src/xxh3.c +292 -0
- metadata +128 -63
- data/ext/prism/api_pack.c +0 -276
- data/include/prism/defines.h +0 -260
- data/include/prism/pack.h +0 -163
- data/include/prism/regexp.h +0 -43
- data/include/prism/util/pm_buffer.h +0 -236
- data/include/prism/util/pm_char.h +0 -204
- data/include/prism/util/pm_constant_pool.h +0 -218
- data/include/prism/util/pm_integer.h +0 -130
- data/include/prism/util/pm_memchr.h +0 -29
- data/include/prism/util/pm_newline_list.h +0 -113
- data/include/prism/util/pm_string.h +0 -200
- data/lib/prism/pack.rb +0 -230
- data/lib/prism/parse_result/comments.rb +0 -188
- data/rbi/prism/compiler.rbi +0 -12
- data/rbi/prism/dsl.rbi +0 -524
- data/rbi/prism/inspect_visitor.rbi +0 -12
- data/rbi/prism/node.rbi +0 -8750
- data/rbi/prism/node_ext.rbi +0 -107
- data/rbi/prism/parse_result.rbi +0 -404
- data/rbi/prism/reflection.rbi +0 -58
- data/rbi/prism/string_query.rbi +0 -12
- data/rbi/prism/visitor.rbi +0 -473
- data/rbi/prism.rbi +0 -63
- data/sig/prism/compiler.rbs +0 -9
- data/sig/prism/dispatcher.rbs +0 -19
- data/sig/prism/dot_visitor.rbs +0 -6
- data/sig/prism/dsl.rbs +0 -351
- data/sig/prism/inspect_visitor.rbs +0 -22
- data/sig/prism/lex_compat.rbs +0 -10
- data/sig/prism/node.rbs +0 -4042
- data/sig/prism/node_ext.rbs +0 -149
- data/sig/prism/pack.rbs +0 -43
- data/sig/prism/parse_result/comments.rbs +0 -38
- data/sig/prism/parse_result.rbs +0 -197
- data/sig/prism/pattern.rbs +0 -13
- data/sig/prism/reflection.rbs +0 -50
- data/sig/prism/relocation.rbs +0 -185
- data/sig/prism/serialize.rbs +0 -8
- data/sig/prism/string_query.rbs +0 -11
- data/sig/prism/visitor.rbs +0 -169
- data/sig/prism.rbs +0 -272
- data/src/pack.c +0 -509
- data/src/util/pm_constant_pool.c +0 -342
- data/src/util/pm_list.c +0 -49
- data/src/util/pm_newline_list.c +0 -125
- data/src/util/pm_string.c +0 -381
- data/src/util/pm_strpbrk.c +0 -206
|
@@ -9,6 +9,9 @@ if you are looking to modify the template
|
|
|
9
9
|
++
|
|
10
10
|
=end
|
|
11
11
|
|
|
12
|
+
#--
|
|
13
|
+
# rbs_inline: enabled
|
|
14
|
+
|
|
12
15
|
module Prism
|
|
13
16
|
# This visitor is responsible for composing the strings that get returned by
|
|
14
17
|
# the various #inspect methods defined on each of the nodes.
|
|
@@ -18,8 +21,9 @@ module Prism
|
|
|
18
21
|
# when we hit an element in that list. In this case, we have a special
|
|
19
22
|
# command that replaces the subsequent indent with the given value.
|
|
20
23
|
class Replace # :nodoc:
|
|
21
|
-
attr_reader :value
|
|
24
|
+
attr_reader :value #: String
|
|
22
25
|
|
|
26
|
+
#: (String value) -> void
|
|
23
27
|
def initialize(value)
|
|
24
28
|
@value = value
|
|
25
29
|
end
|
|
@@ -28,19 +32,25 @@ module Prism
|
|
|
28
32
|
private_constant :Replace
|
|
29
33
|
|
|
30
34
|
# The current prefix string.
|
|
31
|
-
|
|
35
|
+
# :stopdoc:
|
|
36
|
+
attr_reader :indent #: String
|
|
37
|
+
# :startdoc:
|
|
32
38
|
|
|
33
39
|
# The list of commands that we need to execute in order to compose the
|
|
34
40
|
# final string.
|
|
35
|
-
|
|
41
|
+
#: stopdoc:
|
|
42
|
+
attr_reader :commands #: Array[[String | node | Replace, String]]
|
|
43
|
+
# :startdoc:
|
|
36
44
|
|
|
37
|
-
|
|
38
|
-
def initialize(indent = +"")
|
|
45
|
+
#: (?String indent) -> void
|
|
46
|
+
def initialize(indent = +"") # :nodoc:
|
|
39
47
|
@indent = indent
|
|
40
48
|
@commands = []
|
|
41
49
|
end
|
|
42
50
|
|
|
43
51
|
# Compose an inspect string for the given node.
|
|
52
|
+
#
|
|
53
|
+
#: (node node) -> String
|
|
44
54
|
def self.compose(node)
|
|
45
55
|
visitor = new
|
|
46
56
|
node.accept(visitor)
|
|
@@ -48,7 +58,9 @@ module Prism
|
|
|
48
58
|
end
|
|
49
59
|
|
|
50
60
|
# Compose the final string.
|
|
51
|
-
|
|
61
|
+
#
|
|
62
|
+
#: () -> String
|
|
63
|
+
def compose # :nodoc:
|
|
52
64
|
buffer = +""
|
|
53
65
|
replace = nil
|
|
54
66
|
|
|
@@ -76,8 +88,8 @@ module Prism
|
|
|
76
88
|
buffer
|
|
77
89
|
end
|
|
78
90
|
|
|
79
|
-
|
|
80
|
-
def visit_alias_global_variable_node(node)
|
|
91
|
+
#: (AliasGlobalVariableNode node) -> void
|
|
92
|
+
def visit_alias_global_variable_node(node) # :nodoc:
|
|
81
93
|
commands << [inspect_node("AliasGlobalVariableNode", node), indent]
|
|
82
94
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
83
95
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -88,8 +100,8 @@ module Prism
|
|
|
88
100
|
commands << ["└── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
|
|
89
101
|
end
|
|
90
102
|
|
|
91
|
-
|
|
92
|
-
def visit_alias_method_node(node)
|
|
103
|
+
#: (AliasMethodNode node) -> void
|
|
104
|
+
def visit_alias_method_node(node) # :nodoc:
|
|
93
105
|
commands << [inspect_node("AliasMethodNode", node), indent]
|
|
94
106
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
95
107
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -100,8 +112,8 @@ module Prism
|
|
|
100
112
|
commands << ["└── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
|
|
101
113
|
end
|
|
102
114
|
|
|
103
|
-
|
|
104
|
-
def visit_alternation_pattern_node(node)
|
|
115
|
+
#: (AlternationPatternNode node) -> void
|
|
116
|
+
def visit_alternation_pattern_node(node) # :nodoc:
|
|
105
117
|
commands << [inspect_node("AlternationPatternNode", node), indent]
|
|
106
118
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
107
119
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -112,8 +124,8 @@ module Prism
|
|
|
112
124
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
113
125
|
end
|
|
114
126
|
|
|
115
|
-
|
|
116
|
-
def visit_and_node(node)
|
|
127
|
+
#: (AndNode node) -> void
|
|
128
|
+
def visit_and_node(node) # :nodoc:
|
|
117
129
|
commands << [inspect_node("AndNode", node), indent]
|
|
118
130
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
119
131
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -124,8 +136,8 @@ module Prism
|
|
|
124
136
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
125
137
|
end
|
|
126
138
|
|
|
127
|
-
|
|
128
|
-
def visit_arguments_node(node)
|
|
139
|
+
#: (ArgumentsNode node) -> void
|
|
140
|
+
def visit_arguments_node(node) # :nodoc:
|
|
129
141
|
commands << [inspect_node("ArgumentsNode", node), indent]
|
|
130
142
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("contains_forwarding" if node.contains_forwarding?), ("contains_keywords" if node.contains_keywords?), ("contains_keyword_splat" if node.contains_keyword_splat?), ("contains_splat" if node.contains_splat?), ("contains_multiple_splats" if node.contains_multiple_splats?)].compact
|
|
131
143
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -140,8 +152,8 @@ module Prism
|
|
|
140
152
|
end
|
|
141
153
|
end
|
|
142
154
|
|
|
143
|
-
|
|
144
|
-
def visit_array_node(node)
|
|
155
|
+
#: (ArrayNode node) -> void
|
|
156
|
+
def visit_array_node(node) # :nodoc:
|
|
145
157
|
commands << [inspect_node("ArrayNode", node), indent]
|
|
146
158
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("contains_splat" if node.contains_splat?)].compact
|
|
147
159
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -158,8 +170,8 @@ module Prism
|
|
|
158
170
|
commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
|
|
159
171
|
end
|
|
160
172
|
|
|
161
|
-
|
|
162
|
-
def visit_array_pattern_node(node)
|
|
173
|
+
#: (ArrayPatternNode node) -> void
|
|
174
|
+
def visit_array_pattern_node(node) # :nodoc:
|
|
163
175
|
commands << [inspect_node("ArrayPatternNode", node), indent]
|
|
164
176
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
165
177
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -197,8 +209,8 @@ module Prism
|
|
|
197
209
|
commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
|
|
198
210
|
end
|
|
199
211
|
|
|
200
|
-
|
|
201
|
-
def visit_assoc_node(node)
|
|
212
|
+
#: (AssocNode node) -> void
|
|
213
|
+
def visit_assoc_node(node) # :nodoc:
|
|
202
214
|
commands << [inspect_node("AssocNode", node), indent]
|
|
203
215
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
204
216
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -209,8 +221,8 @@ module Prism
|
|
|
209
221
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
210
222
|
end
|
|
211
223
|
|
|
212
|
-
|
|
213
|
-
def visit_assoc_splat_node(node)
|
|
224
|
+
#: (AssocSplatNode node) -> void
|
|
225
|
+
def visit_assoc_splat_node(node) # :nodoc:
|
|
214
226
|
commands << [inspect_node("AssocSplatNode", node), indent]
|
|
215
227
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
216
228
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -223,16 +235,16 @@ module Prism
|
|
|
223
235
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
224
236
|
end
|
|
225
237
|
|
|
226
|
-
|
|
227
|
-
def visit_back_reference_read_node(node)
|
|
238
|
+
#: (BackReferenceReadNode node) -> void
|
|
239
|
+
def visit_back_reference_read_node(node) # :nodoc:
|
|
228
240
|
commands << [inspect_node("BackReferenceReadNode", node), indent]
|
|
229
241
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
230
242
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
231
243
|
commands << ["└── name: #{node.name.inspect}\n", indent]
|
|
232
244
|
end
|
|
233
245
|
|
|
234
|
-
|
|
235
|
-
def visit_begin_node(node)
|
|
246
|
+
#: (BeginNode node) -> void
|
|
247
|
+
def visit_begin_node(node) # :nodoc:
|
|
236
248
|
commands << [inspect_node("BeginNode", node), indent]
|
|
237
249
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
238
250
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -264,8 +276,8 @@ module Prism
|
|
|
264
276
|
commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
|
|
265
277
|
end
|
|
266
278
|
|
|
267
|
-
|
|
268
|
-
def visit_block_argument_node(node)
|
|
279
|
+
#: (BlockArgumentNode node) -> void
|
|
280
|
+
def visit_block_argument_node(node) # :nodoc:
|
|
269
281
|
commands << [inspect_node("BlockArgumentNode", node), indent]
|
|
270
282
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
271
283
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -278,16 +290,16 @@ module Prism
|
|
|
278
290
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
279
291
|
end
|
|
280
292
|
|
|
281
|
-
|
|
282
|
-
def visit_block_local_variable_node(node)
|
|
293
|
+
#: (BlockLocalVariableNode node) -> void
|
|
294
|
+
def visit_block_local_variable_node(node) # :nodoc:
|
|
283
295
|
commands << [inspect_node("BlockLocalVariableNode", node), indent]
|
|
284
296
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact
|
|
285
297
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
286
298
|
commands << ["└── name: #{node.name.inspect}\n", indent]
|
|
287
299
|
end
|
|
288
300
|
|
|
289
|
-
|
|
290
|
-
def visit_block_node(node)
|
|
301
|
+
#: (BlockNode node) -> void
|
|
302
|
+
def visit_block_node(node) # :nodoc:
|
|
291
303
|
commands << [inspect_node("BlockNode", node), indent]
|
|
292
304
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
293
305
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -308,8 +320,8 @@ module Prism
|
|
|
308
320
|
commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
|
|
309
321
|
end
|
|
310
322
|
|
|
311
|
-
|
|
312
|
-
def visit_block_parameter_node(node)
|
|
323
|
+
#: (BlockParameterNode node) -> void
|
|
324
|
+
def visit_block_parameter_node(node) # :nodoc:
|
|
313
325
|
commands << [inspect_node("BlockParameterNode", node), indent]
|
|
314
326
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact
|
|
315
327
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -322,8 +334,8 @@ module Prism
|
|
|
322
334
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
323
335
|
end
|
|
324
336
|
|
|
325
|
-
|
|
326
|
-
def visit_block_parameters_node(node)
|
|
337
|
+
#: (BlockParametersNode node) -> void
|
|
338
|
+
def visit_block_parameters_node(node) # :nodoc:
|
|
327
339
|
commands << [inspect_node("BlockParametersNode", node), indent]
|
|
328
340
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
329
341
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -346,8 +358,8 @@ module Prism
|
|
|
346
358
|
commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
|
|
347
359
|
end
|
|
348
360
|
|
|
349
|
-
|
|
350
|
-
def visit_break_node(node)
|
|
361
|
+
#: (BreakNode node) -> void
|
|
362
|
+
def visit_break_node(node) # :nodoc:
|
|
351
363
|
commands << [inspect_node("BreakNode", node), indent]
|
|
352
364
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
353
365
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -360,8 +372,8 @@ module Prism
|
|
|
360
372
|
commands << ["└── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
|
|
361
373
|
end
|
|
362
374
|
|
|
363
|
-
|
|
364
|
-
def visit_call_and_write_node(node)
|
|
375
|
+
#: (CallAndWriteNode node) -> void
|
|
376
|
+
def visit_call_and_write_node(node) # :nodoc:
|
|
365
377
|
commands << [inspect_node("CallAndWriteNode", node), indent]
|
|
366
378
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
|
|
367
379
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -380,8 +392,8 @@ module Prism
|
|
|
380
392
|
commands << [node.value, "#{indent} "]
|
|
381
393
|
end
|
|
382
394
|
|
|
383
|
-
|
|
384
|
-
def visit_call_node(node)
|
|
395
|
+
#: (CallNode node) -> void
|
|
396
|
+
def visit_call_node(node) # :nodoc:
|
|
385
397
|
commands << [inspect_node("CallNode", node), indent]
|
|
386
398
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
|
|
387
399
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -411,8 +423,8 @@ module Prism
|
|
|
411
423
|
end
|
|
412
424
|
end
|
|
413
425
|
|
|
414
|
-
|
|
415
|
-
def visit_call_operator_write_node(node)
|
|
426
|
+
#: (CallOperatorWriteNode node) -> void
|
|
427
|
+
def visit_call_operator_write_node(node) # :nodoc:
|
|
416
428
|
commands << [inspect_node("CallOperatorWriteNode", node), indent]
|
|
417
429
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
|
|
418
430
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -432,8 +444,8 @@ module Prism
|
|
|
432
444
|
commands << [node.value, "#{indent} "]
|
|
433
445
|
end
|
|
434
446
|
|
|
435
|
-
|
|
436
|
-
def visit_call_or_write_node(node)
|
|
447
|
+
#: (CallOrWriteNode node) -> void
|
|
448
|
+
def visit_call_or_write_node(node) # :nodoc:
|
|
437
449
|
commands << [inspect_node("CallOrWriteNode", node), indent]
|
|
438
450
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
|
|
439
451
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -452,8 +464,8 @@ module Prism
|
|
|
452
464
|
commands << [node.value, "#{indent} "]
|
|
453
465
|
end
|
|
454
466
|
|
|
455
|
-
|
|
456
|
-
def visit_call_target_node(node)
|
|
467
|
+
#: (CallTargetNode node) -> void
|
|
468
|
+
def visit_call_target_node(node) # :nodoc:
|
|
457
469
|
commands << [inspect_node("CallTargetNode", node), indent]
|
|
458
470
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
|
|
459
471
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -464,8 +476,8 @@ module Prism
|
|
|
464
476
|
commands << ["└── message_loc: #{inspect_location(node.message_loc)}\n", indent]
|
|
465
477
|
end
|
|
466
478
|
|
|
467
|
-
|
|
468
|
-
def visit_capture_pattern_node(node)
|
|
479
|
+
#: (CapturePatternNode node) -> void
|
|
480
|
+
def visit_capture_pattern_node(node) # :nodoc:
|
|
469
481
|
commands << [inspect_node("CapturePatternNode", node), indent]
|
|
470
482
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
471
483
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -476,8 +488,8 @@ module Prism
|
|
|
476
488
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
477
489
|
end
|
|
478
490
|
|
|
479
|
-
|
|
480
|
-
def visit_case_match_node(node)
|
|
491
|
+
#: (CaseMatchNode node) -> void
|
|
492
|
+
def visit_case_match_node(node) # :nodoc:
|
|
481
493
|
commands << [inspect_node("CaseMatchNode", node), indent]
|
|
482
494
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
483
495
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -506,8 +518,8 @@ module Prism
|
|
|
506
518
|
commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
|
|
507
519
|
end
|
|
508
520
|
|
|
509
|
-
|
|
510
|
-
def visit_case_node(node)
|
|
521
|
+
#: (CaseNode node) -> void
|
|
522
|
+
def visit_case_node(node) # :nodoc:
|
|
511
523
|
commands << [inspect_node("CaseNode", node), indent]
|
|
512
524
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
513
525
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -536,8 +548,8 @@ module Prism
|
|
|
536
548
|
commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
|
|
537
549
|
end
|
|
538
550
|
|
|
539
|
-
|
|
540
|
-
def visit_class_node(node)
|
|
551
|
+
#: (ClassNode node) -> void
|
|
552
|
+
def visit_class_node(node) # :nodoc:
|
|
541
553
|
commands << [inspect_node("ClassNode", node), indent]
|
|
542
554
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
543
555
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -562,8 +574,8 @@ module Prism
|
|
|
562
574
|
commands << ["└── name: #{node.name.inspect}\n", indent]
|
|
563
575
|
end
|
|
564
576
|
|
|
565
|
-
|
|
566
|
-
def visit_class_variable_and_write_node(node)
|
|
577
|
+
#: (ClassVariableAndWriteNode node) -> void
|
|
578
|
+
def visit_class_variable_and_write_node(node) # :nodoc:
|
|
567
579
|
commands << [inspect_node("ClassVariableAndWriteNode", node), indent]
|
|
568
580
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
569
581
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -574,8 +586,8 @@ module Prism
|
|
|
574
586
|
commands << [node.value, "#{indent} "]
|
|
575
587
|
end
|
|
576
588
|
|
|
577
|
-
|
|
578
|
-
def visit_class_variable_operator_write_node(node)
|
|
589
|
+
#: (ClassVariableOperatorWriteNode node) -> void
|
|
590
|
+
def visit_class_variable_operator_write_node(node) # :nodoc:
|
|
579
591
|
commands << [inspect_node("ClassVariableOperatorWriteNode", node), indent]
|
|
580
592
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
581
593
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -587,8 +599,8 @@ module Prism
|
|
|
587
599
|
commands << ["└── binary_operator: #{node.binary_operator.inspect}\n", indent]
|
|
588
600
|
end
|
|
589
601
|
|
|
590
|
-
|
|
591
|
-
def visit_class_variable_or_write_node(node)
|
|
602
|
+
#: (ClassVariableOrWriteNode node) -> void
|
|
603
|
+
def visit_class_variable_or_write_node(node) # :nodoc:
|
|
592
604
|
commands << [inspect_node("ClassVariableOrWriteNode", node), indent]
|
|
593
605
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
594
606
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -599,24 +611,24 @@ module Prism
|
|
|
599
611
|
commands << [node.value, "#{indent} "]
|
|
600
612
|
end
|
|
601
613
|
|
|
602
|
-
|
|
603
|
-
def visit_class_variable_read_node(node)
|
|
614
|
+
#: (ClassVariableReadNode node) -> void
|
|
615
|
+
def visit_class_variable_read_node(node) # :nodoc:
|
|
604
616
|
commands << [inspect_node("ClassVariableReadNode", node), indent]
|
|
605
617
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
606
618
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
607
619
|
commands << ["└── name: #{node.name.inspect}\n", indent]
|
|
608
620
|
end
|
|
609
621
|
|
|
610
|
-
|
|
611
|
-
def visit_class_variable_target_node(node)
|
|
622
|
+
#: (ClassVariableTargetNode node) -> void
|
|
623
|
+
def visit_class_variable_target_node(node) # :nodoc:
|
|
612
624
|
commands << [inspect_node("ClassVariableTargetNode", node), indent]
|
|
613
625
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
614
626
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
615
627
|
commands << ["└── name: #{node.name.inspect}\n", indent]
|
|
616
628
|
end
|
|
617
629
|
|
|
618
|
-
|
|
619
|
-
def visit_class_variable_write_node(node)
|
|
630
|
+
#: (ClassVariableWriteNode node) -> void
|
|
631
|
+
def visit_class_variable_write_node(node) # :nodoc:
|
|
620
632
|
commands << [inspect_node("ClassVariableWriteNode", node), indent]
|
|
621
633
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
622
634
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -627,8 +639,8 @@ module Prism
|
|
|
627
639
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
628
640
|
end
|
|
629
641
|
|
|
630
|
-
|
|
631
|
-
def visit_constant_and_write_node(node)
|
|
642
|
+
#: (ConstantAndWriteNode node) -> void
|
|
643
|
+
def visit_constant_and_write_node(node) # :nodoc:
|
|
632
644
|
commands << [inspect_node("ConstantAndWriteNode", node), indent]
|
|
633
645
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
634
646
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -639,8 +651,8 @@ module Prism
|
|
|
639
651
|
commands << [node.value, "#{indent} "]
|
|
640
652
|
end
|
|
641
653
|
|
|
642
|
-
|
|
643
|
-
def visit_constant_operator_write_node(node)
|
|
654
|
+
#: (ConstantOperatorWriteNode node) -> void
|
|
655
|
+
def visit_constant_operator_write_node(node) # :nodoc:
|
|
644
656
|
commands << [inspect_node("ConstantOperatorWriteNode", node), indent]
|
|
645
657
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
646
658
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -652,8 +664,8 @@ module Prism
|
|
|
652
664
|
commands << ["└── binary_operator: #{node.binary_operator.inspect}\n", indent]
|
|
653
665
|
end
|
|
654
666
|
|
|
655
|
-
|
|
656
|
-
def visit_constant_or_write_node(node)
|
|
667
|
+
#: (ConstantOrWriteNode node) -> void
|
|
668
|
+
def visit_constant_or_write_node(node) # :nodoc:
|
|
657
669
|
commands << [inspect_node("ConstantOrWriteNode", node), indent]
|
|
658
670
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
659
671
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -664,8 +676,8 @@ module Prism
|
|
|
664
676
|
commands << [node.value, "#{indent} "]
|
|
665
677
|
end
|
|
666
678
|
|
|
667
|
-
|
|
668
|
-
def visit_constant_path_and_write_node(node)
|
|
679
|
+
#: (ConstantPathAndWriteNode node) -> void
|
|
680
|
+
def visit_constant_path_and_write_node(node) # :nodoc:
|
|
669
681
|
commands << [inspect_node("ConstantPathAndWriteNode", node), indent]
|
|
670
682
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
671
683
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -676,8 +688,8 @@ module Prism
|
|
|
676
688
|
commands << [node.value, "#{indent} "]
|
|
677
689
|
end
|
|
678
690
|
|
|
679
|
-
|
|
680
|
-
def visit_constant_path_node(node)
|
|
691
|
+
#: (ConstantPathNode node) -> void
|
|
692
|
+
def visit_constant_path_node(node) # :nodoc:
|
|
681
693
|
commands << [inspect_node("ConstantPathNode", node), indent]
|
|
682
694
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
683
695
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -696,8 +708,8 @@ module Prism
|
|
|
696
708
|
commands << ["└── name_loc: #{inspect_location(node.name_loc)}\n", indent]
|
|
697
709
|
end
|
|
698
710
|
|
|
699
|
-
|
|
700
|
-
def visit_constant_path_operator_write_node(node)
|
|
711
|
+
#: (ConstantPathOperatorWriteNode node) -> void
|
|
712
|
+
def visit_constant_path_operator_write_node(node) # :nodoc:
|
|
701
713
|
commands << [inspect_node("ConstantPathOperatorWriteNode", node), indent]
|
|
702
714
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
703
715
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -709,8 +721,8 @@ module Prism
|
|
|
709
721
|
commands << ["└── binary_operator: #{node.binary_operator.inspect}\n", indent]
|
|
710
722
|
end
|
|
711
723
|
|
|
712
|
-
|
|
713
|
-
def visit_constant_path_or_write_node(node)
|
|
724
|
+
#: (ConstantPathOrWriteNode node) -> void
|
|
725
|
+
def visit_constant_path_or_write_node(node) # :nodoc:
|
|
714
726
|
commands << [inspect_node("ConstantPathOrWriteNode", node), indent]
|
|
715
727
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
716
728
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -721,8 +733,8 @@ module Prism
|
|
|
721
733
|
commands << [node.value, "#{indent} "]
|
|
722
734
|
end
|
|
723
735
|
|
|
724
|
-
|
|
725
|
-
def visit_constant_path_target_node(node)
|
|
736
|
+
#: (ConstantPathTargetNode node) -> void
|
|
737
|
+
def visit_constant_path_target_node(node) # :nodoc:
|
|
726
738
|
commands << [inspect_node("ConstantPathTargetNode", node), indent]
|
|
727
739
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
728
740
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -741,8 +753,8 @@ module Prism
|
|
|
741
753
|
commands << ["└── name_loc: #{inspect_location(node.name_loc)}\n", indent]
|
|
742
754
|
end
|
|
743
755
|
|
|
744
|
-
|
|
745
|
-
def visit_constant_path_write_node(node)
|
|
756
|
+
#: (ConstantPathWriteNode node) -> void
|
|
757
|
+
def visit_constant_path_write_node(node) # :nodoc:
|
|
746
758
|
commands << [inspect_node("ConstantPathWriteNode", node), indent]
|
|
747
759
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
748
760
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -753,24 +765,24 @@ module Prism
|
|
|
753
765
|
commands << [node.value, "#{indent} "]
|
|
754
766
|
end
|
|
755
767
|
|
|
756
|
-
|
|
757
|
-
def visit_constant_read_node(node)
|
|
768
|
+
#: (ConstantReadNode node) -> void
|
|
769
|
+
def visit_constant_read_node(node) # :nodoc:
|
|
758
770
|
commands << [inspect_node("ConstantReadNode", node), indent]
|
|
759
771
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
760
772
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
761
773
|
commands << ["└── name: #{node.name.inspect}\n", indent]
|
|
762
774
|
end
|
|
763
775
|
|
|
764
|
-
|
|
765
|
-
def visit_constant_target_node(node)
|
|
776
|
+
#: (ConstantTargetNode node) -> void
|
|
777
|
+
def visit_constant_target_node(node) # :nodoc:
|
|
766
778
|
commands << [inspect_node("ConstantTargetNode", node), indent]
|
|
767
779
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
768
780
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
769
781
|
commands << ["└── name: #{node.name.inspect}\n", indent]
|
|
770
782
|
end
|
|
771
783
|
|
|
772
|
-
|
|
773
|
-
def visit_constant_write_node(node)
|
|
784
|
+
#: (ConstantWriteNode node) -> void
|
|
785
|
+
def visit_constant_write_node(node) # :nodoc:
|
|
774
786
|
commands << [inspect_node("ConstantWriteNode", node), indent]
|
|
775
787
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
776
788
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -781,8 +793,8 @@ module Prism
|
|
|
781
793
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
782
794
|
end
|
|
783
795
|
|
|
784
|
-
|
|
785
|
-
def visit_def_node(node)
|
|
796
|
+
#: (DefNode node) -> void
|
|
797
|
+
def visit_def_node(node) # :nodoc:
|
|
786
798
|
commands << [inspect_node("DefNode", node), indent]
|
|
787
799
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
788
800
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -815,8 +827,8 @@ module Prism
|
|
|
815
827
|
commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
|
|
816
828
|
end
|
|
817
829
|
|
|
818
|
-
|
|
819
|
-
def visit_defined_node(node)
|
|
830
|
+
#: (DefinedNode node) -> void
|
|
831
|
+
def visit_defined_node(node) # :nodoc:
|
|
820
832
|
commands << [inspect_node("DefinedNode", node), indent]
|
|
821
833
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
822
834
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -827,8 +839,8 @@ module Prism
|
|
|
827
839
|
commands << ["└── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
|
|
828
840
|
end
|
|
829
841
|
|
|
830
|
-
|
|
831
|
-
def visit_else_node(node)
|
|
842
|
+
#: (ElseNode node) -> void
|
|
843
|
+
def visit_else_node(node) # :nodoc:
|
|
832
844
|
commands << [inspect_node("ElseNode", node), indent]
|
|
833
845
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
834
846
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -842,8 +854,8 @@ module Prism
|
|
|
842
854
|
commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
|
|
843
855
|
end
|
|
844
856
|
|
|
845
|
-
|
|
846
|
-
def visit_embedded_statements_node(node)
|
|
857
|
+
#: (EmbeddedStatementsNode node) -> void
|
|
858
|
+
def visit_embedded_statements_node(node) # :nodoc:
|
|
847
859
|
commands << [inspect_node("EmbeddedStatementsNode", node), indent]
|
|
848
860
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
849
861
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -857,8 +869,8 @@ module Prism
|
|
|
857
869
|
commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
|
|
858
870
|
end
|
|
859
871
|
|
|
860
|
-
|
|
861
|
-
def visit_embedded_variable_node(node)
|
|
872
|
+
#: (EmbeddedVariableNode node) -> void
|
|
873
|
+
def visit_embedded_variable_node(node) # :nodoc:
|
|
862
874
|
commands << [inspect_node("EmbeddedVariableNode", node), indent]
|
|
863
875
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
864
876
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -867,8 +879,8 @@ module Prism
|
|
|
867
879
|
commands << [node.variable, "#{indent} "]
|
|
868
880
|
end
|
|
869
881
|
|
|
870
|
-
|
|
871
|
-
def visit_ensure_node(node)
|
|
882
|
+
#: (EnsureNode node) -> void
|
|
883
|
+
def visit_ensure_node(node) # :nodoc:
|
|
872
884
|
commands << [inspect_node("EnsureNode", node), indent]
|
|
873
885
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
874
886
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -882,15 +894,28 @@ module Prism
|
|
|
882
894
|
commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
|
|
883
895
|
end
|
|
884
896
|
|
|
885
|
-
|
|
886
|
-
def
|
|
897
|
+
#: (ErrorRecoveryNode node) -> void
|
|
898
|
+
def visit_error_recovery_node(node) # :nodoc:
|
|
899
|
+
commands << [inspect_node("ErrorRecoveryNode", node), indent]
|
|
900
|
+
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
901
|
+
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
902
|
+
if (unexpected = node.unexpected).nil?
|
|
903
|
+
commands << ["└── unexpected: ∅\n", indent]
|
|
904
|
+
else
|
|
905
|
+
commands << ["└── unexpected:\n", indent]
|
|
906
|
+
commands << [unexpected, "#{indent} "]
|
|
907
|
+
end
|
|
908
|
+
end
|
|
909
|
+
|
|
910
|
+
#: (FalseNode node) -> void
|
|
911
|
+
def visit_false_node(node) # :nodoc:
|
|
887
912
|
commands << [inspect_node("FalseNode", node), indent]
|
|
888
913
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
889
914
|
commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
890
915
|
end
|
|
891
916
|
|
|
892
|
-
|
|
893
|
-
def visit_find_pattern_node(node)
|
|
917
|
+
#: (FindPatternNode node) -> void
|
|
918
|
+
def visit_find_pattern_node(node) # :nodoc:
|
|
894
919
|
commands << [inspect_node("FindPatternNode", node), indent]
|
|
895
920
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
896
921
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -917,8 +942,8 @@ module Prism
|
|
|
917
942
|
commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
|
|
918
943
|
end
|
|
919
944
|
|
|
920
|
-
|
|
921
|
-
def visit_flip_flop_node(node)
|
|
945
|
+
#: (FlipFlopNode node) -> void
|
|
946
|
+
def visit_flip_flop_node(node) # :nodoc:
|
|
922
947
|
commands << [inspect_node("FlipFlopNode", node), indent]
|
|
923
948
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("exclude_end" if node.exclude_end?)].compact
|
|
924
949
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -937,16 +962,16 @@ module Prism
|
|
|
937
962
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
938
963
|
end
|
|
939
964
|
|
|
940
|
-
|
|
941
|
-
def visit_float_node(node)
|
|
965
|
+
#: (FloatNode node) -> void
|
|
966
|
+
def visit_float_node(node) # :nodoc:
|
|
942
967
|
commands << [inspect_node("FloatNode", node), indent]
|
|
943
968
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
944
969
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
945
970
|
commands << ["└── value: #{node.value.inspect}\n", indent]
|
|
946
971
|
end
|
|
947
972
|
|
|
948
|
-
|
|
949
|
-
def visit_for_node(node)
|
|
973
|
+
#: (ForNode node) -> void
|
|
974
|
+
def visit_for_node(node) # :nodoc:
|
|
950
975
|
commands << [inspect_node("ForNode", node), indent]
|
|
951
976
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
952
977
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -966,25 +991,26 @@ module Prism
|
|
|
966
991
|
commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
|
|
967
992
|
end
|
|
968
993
|
|
|
969
|
-
|
|
970
|
-
def visit_forwarding_arguments_node(node)
|
|
994
|
+
#: (ForwardingArgumentsNode node) -> void
|
|
995
|
+
def visit_forwarding_arguments_node(node) # :nodoc:
|
|
971
996
|
commands << [inspect_node("ForwardingArgumentsNode", node), indent]
|
|
972
997
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
973
998
|
commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
974
999
|
end
|
|
975
1000
|
|
|
976
|
-
|
|
977
|
-
def visit_forwarding_parameter_node(node)
|
|
1001
|
+
#: (ForwardingParameterNode node) -> void
|
|
1002
|
+
def visit_forwarding_parameter_node(node) # :nodoc:
|
|
978
1003
|
commands << [inspect_node("ForwardingParameterNode", node), indent]
|
|
979
1004
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
980
1005
|
commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
981
1006
|
end
|
|
982
1007
|
|
|
983
|
-
|
|
984
|
-
def visit_forwarding_super_node(node)
|
|
1008
|
+
#: (ForwardingSuperNode node) -> void
|
|
1009
|
+
def visit_forwarding_super_node(node) # :nodoc:
|
|
985
1010
|
commands << [inspect_node("ForwardingSuperNode", node), indent]
|
|
986
1011
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
987
1012
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
1013
|
+
commands << ["├── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
|
|
988
1014
|
if (block = node.block).nil?
|
|
989
1015
|
commands << ["└── block: ∅\n", indent]
|
|
990
1016
|
else
|
|
@@ -993,8 +1019,8 @@ module Prism
|
|
|
993
1019
|
end
|
|
994
1020
|
end
|
|
995
1021
|
|
|
996
|
-
|
|
997
|
-
def visit_global_variable_and_write_node(node)
|
|
1022
|
+
#: (GlobalVariableAndWriteNode node) -> void
|
|
1023
|
+
def visit_global_variable_and_write_node(node) # :nodoc:
|
|
998
1024
|
commands << [inspect_node("GlobalVariableAndWriteNode", node), indent]
|
|
999
1025
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1000
1026
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1005,8 +1031,8 @@ module Prism
|
|
|
1005
1031
|
commands << [node.value, "#{indent} "]
|
|
1006
1032
|
end
|
|
1007
1033
|
|
|
1008
|
-
|
|
1009
|
-
def visit_global_variable_operator_write_node(node)
|
|
1034
|
+
#: (GlobalVariableOperatorWriteNode node) -> void
|
|
1035
|
+
def visit_global_variable_operator_write_node(node) # :nodoc:
|
|
1010
1036
|
commands << [inspect_node("GlobalVariableOperatorWriteNode", node), indent]
|
|
1011
1037
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1012
1038
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1018,8 +1044,8 @@ module Prism
|
|
|
1018
1044
|
commands << ["└── binary_operator: #{node.binary_operator.inspect}\n", indent]
|
|
1019
1045
|
end
|
|
1020
1046
|
|
|
1021
|
-
|
|
1022
|
-
def visit_global_variable_or_write_node(node)
|
|
1047
|
+
#: (GlobalVariableOrWriteNode node) -> void
|
|
1048
|
+
def visit_global_variable_or_write_node(node) # :nodoc:
|
|
1023
1049
|
commands << [inspect_node("GlobalVariableOrWriteNode", node), indent]
|
|
1024
1050
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1025
1051
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1030,24 +1056,24 @@ module Prism
|
|
|
1030
1056
|
commands << [node.value, "#{indent} "]
|
|
1031
1057
|
end
|
|
1032
1058
|
|
|
1033
|
-
|
|
1034
|
-
def visit_global_variable_read_node(node)
|
|
1059
|
+
#: (GlobalVariableReadNode node) -> void
|
|
1060
|
+
def visit_global_variable_read_node(node) # :nodoc:
|
|
1035
1061
|
commands << [inspect_node("GlobalVariableReadNode", node), indent]
|
|
1036
1062
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1037
1063
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
1038
1064
|
commands << ["└── name: #{node.name.inspect}\n", indent]
|
|
1039
1065
|
end
|
|
1040
1066
|
|
|
1041
|
-
|
|
1042
|
-
def visit_global_variable_target_node(node)
|
|
1067
|
+
#: (GlobalVariableTargetNode node) -> void
|
|
1068
|
+
def visit_global_variable_target_node(node) # :nodoc:
|
|
1043
1069
|
commands << [inspect_node("GlobalVariableTargetNode", node), indent]
|
|
1044
1070
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1045
1071
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
1046
1072
|
commands << ["└── name: #{node.name.inspect}\n", indent]
|
|
1047
1073
|
end
|
|
1048
1074
|
|
|
1049
|
-
|
|
1050
|
-
def visit_global_variable_write_node(node)
|
|
1075
|
+
#: (GlobalVariableWriteNode node) -> void
|
|
1076
|
+
def visit_global_variable_write_node(node) # :nodoc:
|
|
1051
1077
|
commands << [inspect_node("GlobalVariableWriteNode", node), indent]
|
|
1052
1078
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1053
1079
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1058,8 +1084,8 @@ module Prism
|
|
|
1058
1084
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
1059
1085
|
end
|
|
1060
1086
|
|
|
1061
|
-
|
|
1062
|
-
def visit_hash_node(node)
|
|
1087
|
+
#: (HashNode node) -> void
|
|
1088
|
+
def visit_hash_node(node) # :nodoc:
|
|
1063
1089
|
commands << [inspect_node("HashNode", node), indent]
|
|
1064
1090
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1065
1091
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1076,8 +1102,8 @@ module Prism
|
|
|
1076
1102
|
commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
|
|
1077
1103
|
end
|
|
1078
1104
|
|
|
1079
|
-
|
|
1080
|
-
def visit_hash_pattern_node(node)
|
|
1105
|
+
#: (HashPatternNode node) -> void
|
|
1106
|
+
def visit_hash_pattern_node(node) # :nodoc:
|
|
1081
1107
|
commands << [inspect_node("HashPatternNode", node), indent]
|
|
1082
1108
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1083
1109
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1106,8 +1132,8 @@ module Prism
|
|
|
1106
1132
|
commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
|
|
1107
1133
|
end
|
|
1108
1134
|
|
|
1109
|
-
|
|
1110
|
-
def visit_if_node(node)
|
|
1135
|
+
#: (IfNode node) -> void
|
|
1136
|
+
def visit_if_node(node) # :nodoc:
|
|
1111
1137
|
commands << [inspect_node("IfNode", node), indent]
|
|
1112
1138
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1113
1139
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1130,8 +1156,8 @@ module Prism
|
|
|
1130
1156
|
commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
|
|
1131
1157
|
end
|
|
1132
1158
|
|
|
1133
|
-
|
|
1134
|
-
def visit_imaginary_node(node)
|
|
1159
|
+
#: (ImaginaryNode node) -> void
|
|
1160
|
+
def visit_imaginary_node(node) # :nodoc:
|
|
1135
1161
|
commands << [inspect_node("ImaginaryNode", node), indent]
|
|
1136
1162
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1137
1163
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1139,8 +1165,8 @@ module Prism
|
|
|
1139
1165
|
commands << [node.numeric, "#{indent} "]
|
|
1140
1166
|
end
|
|
1141
1167
|
|
|
1142
|
-
|
|
1143
|
-
def visit_implicit_node(node)
|
|
1168
|
+
#: (ImplicitNode node) -> void
|
|
1169
|
+
def visit_implicit_node(node) # :nodoc:
|
|
1144
1170
|
commands << [inspect_node("ImplicitNode", node), indent]
|
|
1145
1171
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1146
1172
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1148,15 +1174,15 @@ module Prism
|
|
|
1148
1174
|
commands << [node.value, "#{indent} "]
|
|
1149
1175
|
end
|
|
1150
1176
|
|
|
1151
|
-
|
|
1152
|
-
def visit_implicit_rest_node(node)
|
|
1177
|
+
#: (ImplicitRestNode node) -> void
|
|
1178
|
+
def visit_implicit_rest_node(node) # :nodoc:
|
|
1153
1179
|
commands << [inspect_node("ImplicitRestNode", node), indent]
|
|
1154
1180
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1155
1181
|
commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
1156
1182
|
end
|
|
1157
1183
|
|
|
1158
|
-
|
|
1159
|
-
def visit_in_node(node)
|
|
1184
|
+
#: (InNode node) -> void
|
|
1185
|
+
def visit_in_node(node) # :nodoc:
|
|
1160
1186
|
commands << [inspect_node("InNode", node), indent]
|
|
1161
1187
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1162
1188
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1168,12 +1194,12 @@ module Prism
|
|
|
1168
1194
|
commands << ["├── statements:\n", indent]
|
|
1169
1195
|
commands << [statements, "#{indent}│ "]
|
|
1170
1196
|
end
|
|
1171
|
-
commands << ["├──
|
|
1172
|
-
commands << ["└──
|
|
1197
|
+
commands << ["├── in_keyword_loc: #{inspect_location(node.in_keyword_loc)}\n", indent]
|
|
1198
|
+
commands << ["└── then_keyword_loc: #{inspect_location(node.then_keyword_loc)}\n", indent]
|
|
1173
1199
|
end
|
|
1174
1200
|
|
|
1175
|
-
|
|
1176
|
-
def visit_index_and_write_node(node)
|
|
1201
|
+
#: (IndexAndWriteNode node) -> void
|
|
1202
|
+
def visit_index_and_write_node(node) # :nodoc:
|
|
1177
1203
|
commands << [inspect_node("IndexAndWriteNode", node), indent]
|
|
1178
1204
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
|
|
1179
1205
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1203,8 +1229,8 @@ module Prism
|
|
|
1203
1229
|
commands << [node.value, "#{indent} "]
|
|
1204
1230
|
end
|
|
1205
1231
|
|
|
1206
|
-
|
|
1207
|
-
def visit_index_operator_write_node(node)
|
|
1232
|
+
#: (IndexOperatorWriteNode node) -> void
|
|
1233
|
+
def visit_index_operator_write_node(node) # :nodoc:
|
|
1208
1234
|
commands << [inspect_node("IndexOperatorWriteNode", node), indent]
|
|
1209
1235
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
|
|
1210
1236
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1235,8 +1261,8 @@ module Prism
|
|
|
1235
1261
|
commands << [node.value, "#{indent} "]
|
|
1236
1262
|
end
|
|
1237
1263
|
|
|
1238
|
-
|
|
1239
|
-
def visit_index_or_write_node(node)
|
|
1264
|
+
#: (IndexOrWriteNode node) -> void
|
|
1265
|
+
def visit_index_or_write_node(node) # :nodoc:
|
|
1240
1266
|
commands << [inspect_node("IndexOrWriteNode", node), indent]
|
|
1241
1267
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
|
|
1242
1268
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1266,8 +1292,8 @@ module Prism
|
|
|
1266
1292
|
commands << [node.value, "#{indent} "]
|
|
1267
1293
|
end
|
|
1268
1294
|
|
|
1269
|
-
|
|
1270
|
-
def visit_index_target_node(node)
|
|
1295
|
+
#: (IndexTargetNode node) -> void
|
|
1296
|
+
def visit_index_target_node(node) # :nodoc:
|
|
1271
1297
|
commands << [inspect_node("IndexTargetNode", node), indent]
|
|
1272
1298
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
|
|
1273
1299
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1289,8 +1315,8 @@ module Prism
|
|
|
1289
1315
|
end
|
|
1290
1316
|
end
|
|
1291
1317
|
|
|
1292
|
-
|
|
1293
|
-
def visit_instance_variable_and_write_node(node)
|
|
1318
|
+
#: (InstanceVariableAndWriteNode node) -> void
|
|
1319
|
+
def visit_instance_variable_and_write_node(node) # :nodoc:
|
|
1294
1320
|
commands << [inspect_node("InstanceVariableAndWriteNode", node), indent]
|
|
1295
1321
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1296
1322
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1301,8 +1327,8 @@ module Prism
|
|
|
1301
1327
|
commands << [node.value, "#{indent} "]
|
|
1302
1328
|
end
|
|
1303
1329
|
|
|
1304
|
-
|
|
1305
|
-
def visit_instance_variable_operator_write_node(node)
|
|
1330
|
+
#: (InstanceVariableOperatorWriteNode node) -> void
|
|
1331
|
+
def visit_instance_variable_operator_write_node(node) # :nodoc:
|
|
1306
1332
|
commands << [inspect_node("InstanceVariableOperatorWriteNode", node), indent]
|
|
1307
1333
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1308
1334
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1314,8 +1340,8 @@ module Prism
|
|
|
1314
1340
|
commands << ["└── binary_operator: #{node.binary_operator.inspect}\n", indent]
|
|
1315
1341
|
end
|
|
1316
1342
|
|
|
1317
|
-
|
|
1318
|
-
def visit_instance_variable_or_write_node(node)
|
|
1343
|
+
#: (InstanceVariableOrWriteNode node) -> void
|
|
1344
|
+
def visit_instance_variable_or_write_node(node) # :nodoc:
|
|
1319
1345
|
commands << [inspect_node("InstanceVariableOrWriteNode", node), indent]
|
|
1320
1346
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1321
1347
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1326,24 +1352,24 @@ module Prism
|
|
|
1326
1352
|
commands << [node.value, "#{indent} "]
|
|
1327
1353
|
end
|
|
1328
1354
|
|
|
1329
|
-
|
|
1330
|
-
def visit_instance_variable_read_node(node)
|
|
1355
|
+
#: (InstanceVariableReadNode node) -> void
|
|
1356
|
+
def visit_instance_variable_read_node(node) # :nodoc:
|
|
1331
1357
|
commands << [inspect_node("InstanceVariableReadNode", node), indent]
|
|
1332
1358
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1333
1359
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
1334
1360
|
commands << ["└── name: #{node.name.inspect}\n", indent]
|
|
1335
1361
|
end
|
|
1336
1362
|
|
|
1337
|
-
|
|
1338
|
-
def visit_instance_variable_target_node(node)
|
|
1363
|
+
#: (InstanceVariableTargetNode node) -> void
|
|
1364
|
+
def visit_instance_variable_target_node(node) # :nodoc:
|
|
1339
1365
|
commands << [inspect_node("InstanceVariableTargetNode", node), indent]
|
|
1340
1366
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1341
1367
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
1342
1368
|
commands << ["└── name: #{node.name.inspect}\n", indent]
|
|
1343
1369
|
end
|
|
1344
1370
|
|
|
1345
|
-
|
|
1346
|
-
def visit_instance_variable_write_node(node)
|
|
1371
|
+
#: (InstanceVariableWriteNode node) -> void
|
|
1372
|
+
def visit_instance_variable_write_node(node) # :nodoc:
|
|
1347
1373
|
commands << [inspect_node("InstanceVariableWriteNode", node), indent]
|
|
1348
1374
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1349
1375
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1354,16 +1380,16 @@ module Prism
|
|
|
1354
1380
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
1355
1381
|
end
|
|
1356
1382
|
|
|
1357
|
-
|
|
1358
|
-
def visit_integer_node(node)
|
|
1383
|
+
#: (IntegerNode node) -> void
|
|
1384
|
+
def visit_integer_node(node) # :nodoc:
|
|
1359
1385
|
commands << [inspect_node("IntegerNode", node), indent]
|
|
1360
1386
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("binary" if node.binary?), ("decimal" if node.decimal?), ("octal" if node.octal?), ("hexadecimal" if node.hexadecimal?)].compact
|
|
1361
1387
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
1362
1388
|
commands << ["└── value: #{node.value.inspect}\n", indent]
|
|
1363
1389
|
end
|
|
1364
1390
|
|
|
1365
|
-
|
|
1366
|
-
def visit_interpolated_match_last_line_node(node)
|
|
1391
|
+
#: (InterpolatedMatchLastLineNode node) -> void
|
|
1392
|
+
def visit_interpolated_match_last_line_node(node) # :nodoc:
|
|
1367
1393
|
commands << [inspect_node("InterpolatedMatchLastLineNode", node), indent]
|
|
1368
1394
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("ignore_case" if node.ignore_case?), ("extended" if node.extended?), ("multi_line" if node.multi_line?), ("once" if node.once?), ("euc_jp" if node.euc_jp?), ("ascii_8bit" if node.ascii_8bit?), ("windows_31j" if node.windows_31j?), ("utf_8" if node.utf_8?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("forced_us_ascii_encoding" if node.forced_us_ascii_encoding?)].compact
|
|
1369
1395
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1380,8 +1406,8 @@ module Prism
|
|
|
1380
1406
|
commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
|
|
1381
1407
|
end
|
|
1382
1408
|
|
|
1383
|
-
|
|
1384
|
-
def visit_interpolated_regular_expression_node(node)
|
|
1409
|
+
#: (InterpolatedRegularExpressionNode node) -> void
|
|
1410
|
+
def visit_interpolated_regular_expression_node(node) # :nodoc:
|
|
1385
1411
|
commands << [inspect_node("InterpolatedRegularExpressionNode", node), indent]
|
|
1386
1412
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("ignore_case" if node.ignore_case?), ("extended" if node.extended?), ("multi_line" if node.multi_line?), ("once" if node.once?), ("euc_jp" if node.euc_jp?), ("ascii_8bit" if node.ascii_8bit?), ("windows_31j" if node.windows_31j?), ("utf_8" if node.utf_8?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("forced_us_ascii_encoding" if node.forced_us_ascii_encoding?)].compact
|
|
1387
1413
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1398,8 +1424,8 @@ module Prism
|
|
|
1398
1424
|
commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
|
|
1399
1425
|
end
|
|
1400
1426
|
|
|
1401
|
-
|
|
1402
|
-
def visit_interpolated_string_node(node)
|
|
1427
|
+
#: (InterpolatedStringNode node) -> void
|
|
1428
|
+
def visit_interpolated_string_node(node) # :nodoc:
|
|
1403
1429
|
commands << [inspect_node("InterpolatedStringNode", node), indent]
|
|
1404
1430
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("frozen" if node.frozen?), ("mutable" if node.mutable?)].compact
|
|
1405
1431
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1416,8 +1442,8 @@ module Prism
|
|
|
1416
1442
|
commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
|
|
1417
1443
|
end
|
|
1418
1444
|
|
|
1419
|
-
|
|
1420
|
-
def visit_interpolated_symbol_node(node)
|
|
1445
|
+
#: (InterpolatedSymbolNode node) -> void
|
|
1446
|
+
def visit_interpolated_symbol_node(node) # :nodoc:
|
|
1421
1447
|
commands << [inspect_node("InterpolatedSymbolNode", node), indent]
|
|
1422
1448
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1423
1449
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1434,8 +1460,8 @@ module Prism
|
|
|
1434
1460
|
commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
|
|
1435
1461
|
end
|
|
1436
1462
|
|
|
1437
|
-
|
|
1438
|
-
def visit_interpolated_x_string_node(node)
|
|
1463
|
+
#: (InterpolatedXStringNode node) -> void
|
|
1464
|
+
def visit_interpolated_x_string_node(node) # :nodoc:
|
|
1439
1465
|
commands << [inspect_node("InterpolatedXStringNode", node), indent]
|
|
1440
1466
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1441
1467
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1452,22 +1478,22 @@ module Prism
|
|
|
1452
1478
|
commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
|
|
1453
1479
|
end
|
|
1454
1480
|
|
|
1455
|
-
|
|
1456
|
-
def visit_it_local_variable_read_node(node)
|
|
1481
|
+
#: (ItLocalVariableReadNode node) -> void
|
|
1482
|
+
def visit_it_local_variable_read_node(node) # :nodoc:
|
|
1457
1483
|
commands << [inspect_node("ItLocalVariableReadNode", node), indent]
|
|
1458
1484
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1459
1485
|
commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
1460
1486
|
end
|
|
1461
1487
|
|
|
1462
|
-
|
|
1463
|
-
def visit_it_parameters_node(node)
|
|
1488
|
+
#: (ItParametersNode node) -> void
|
|
1489
|
+
def visit_it_parameters_node(node) # :nodoc:
|
|
1464
1490
|
commands << [inspect_node("ItParametersNode", node), indent]
|
|
1465
1491
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1466
1492
|
commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
1467
1493
|
end
|
|
1468
1494
|
|
|
1469
|
-
|
|
1470
|
-
def visit_keyword_hash_node(node)
|
|
1495
|
+
#: (KeywordHashNode node) -> void
|
|
1496
|
+
def visit_keyword_hash_node(node) # :nodoc:
|
|
1471
1497
|
commands << [inspect_node("KeywordHashNode", node), indent]
|
|
1472
1498
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("symbol_keys" if node.symbol_keys?)].compact
|
|
1473
1499
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1482,8 +1508,8 @@ module Prism
|
|
|
1482
1508
|
end
|
|
1483
1509
|
end
|
|
1484
1510
|
|
|
1485
|
-
|
|
1486
|
-
def visit_keyword_rest_parameter_node(node)
|
|
1511
|
+
#: (KeywordRestParameterNode node) -> void
|
|
1512
|
+
def visit_keyword_rest_parameter_node(node) # :nodoc:
|
|
1487
1513
|
commands << [inspect_node("KeywordRestParameterNode", node), indent]
|
|
1488
1514
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact
|
|
1489
1515
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1496,8 +1522,8 @@ module Prism
|
|
|
1496
1522
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
1497
1523
|
end
|
|
1498
1524
|
|
|
1499
|
-
|
|
1500
|
-
def visit_lambda_node(node)
|
|
1525
|
+
#: (LambdaNode node) -> void
|
|
1526
|
+
def visit_lambda_node(node) # :nodoc:
|
|
1501
1527
|
commands << [inspect_node("LambdaNode", node), indent]
|
|
1502
1528
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1503
1529
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1519,8 +1545,8 @@ module Prism
|
|
|
1519
1545
|
end
|
|
1520
1546
|
end
|
|
1521
1547
|
|
|
1522
|
-
|
|
1523
|
-
def visit_local_variable_and_write_node(node)
|
|
1548
|
+
#: (LocalVariableAndWriteNode node) -> void
|
|
1549
|
+
def visit_local_variable_and_write_node(node) # :nodoc:
|
|
1524
1550
|
commands << [inspect_node("LocalVariableAndWriteNode", node), indent]
|
|
1525
1551
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1526
1552
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1532,8 +1558,8 @@ module Prism
|
|
|
1532
1558
|
commands << ["└── depth: #{node.depth.inspect}\n", indent]
|
|
1533
1559
|
end
|
|
1534
1560
|
|
|
1535
|
-
|
|
1536
|
-
def visit_local_variable_operator_write_node(node)
|
|
1561
|
+
#: (LocalVariableOperatorWriteNode node) -> void
|
|
1562
|
+
def visit_local_variable_operator_write_node(node) # :nodoc:
|
|
1537
1563
|
commands << [inspect_node("LocalVariableOperatorWriteNode", node), indent]
|
|
1538
1564
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1539
1565
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1546,8 +1572,8 @@ module Prism
|
|
|
1546
1572
|
commands << ["└── depth: #{node.depth.inspect}\n", indent]
|
|
1547
1573
|
end
|
|
1548
1574
|
|
|
1549
|
-
|
|
1550
|
-
def visit_local_variable_or_write_node(node)
|
|
1575
|
+
#: (LocalVariableOrWriteNode node) -> void
|
|
1576
|
+
def visit_local_variable_or_write_node(node) # :nodoc:
|
|
1551
1577
|
commands << [inspect_node("LocalVariableOrWriteNode", node), indent]
|
|
1552
1578
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1553
1579
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1559,8 +1585,8 @@ module Prism
|
|
|
1559
1585
|
commands << ["└── depth: #{node.depth.inspect}\n", indent]
|
|
1560
1586
|
end
|
|
1561
1587
|
|
|
1562
|
-
|
|
1563
|
-
def visit_local_variable_read_node(node)
|
|
1588
|
+
#: (LocalVariableReadNode node) -> void
|
|
1589
|
+
def visit_local_variable_read_node(node) # :nodoc:
|
|
1564
1590
|
commands << [inspect_node("LocalVariableReadNode", node), indent]
|
|
1565
1591
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1566
1592
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1568,8 +1594,8 @@ module Prism
|
|
|
1568
1594
|
commands << ["└── depth: #{node.depth.inspect}\n", indent]
|
|
1569
1595
|
end
|
|
1570
1596
|
|
|
1571
|
-
|
|
1572
|
-
def visit_local_variable_target_node(node)
|
|
1597
|
+
#: (LocalVariableTargetNode node) -> void
|
|
1598
|
+
def visit_local_variable_target_node(node) # :nodoc:
|
|
1573
1599
|
commands << [inspect_node("LocalVariableTargetNode", node), indent]
|
|
1574
1600
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1575
1601
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1577,8 +1603,8 @@ module Prism
|
|
|
1577
1603
|
commands << ["└── depth: #{node.depth.inspect}\n", indent]
|
|
1578
1604
|
end
|
|
1579
1605
|
|
|
1580
|
-
|
|
1581
|
-
def visit_local_variable_write_node(node)
|
|
1606
|
+
#: (LocalVariableWriteNode node) -> void
|
|
1607
|
+
def visit_local_variable_write_node(node) # :nodoc:
|
|
1582
1608
|
commands << [inspect_node("LocalVariableWriteNode", node), indent]
|
|
1583
1609
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1584
1610
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1590,8 +1616,8 @@ module Prism
|
|
|
1590
1616
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
1591
1617
|
end
|
|
1592
1618
|
|
|
1593
|
-
|
|
1594
|
-
def visit_match_last_line_node(node)
|
|
1619
|
+
#: (MatchLastLineNode node) -> void
|
|
1620
|
+
def visit_match_last_line_node(node) # :nodoc:
|
|
1595
1621
|
commands << [inspect_node("MatchLastLineNode", node), indent]
|
|
1596
1622
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("ignore_case" if node.ignore_case?), ("extended" if node.extended?), ("multi_line" if node.multi_line?), ("once" if node.once?), ("euc_jp" if node.euc_jp?), ("ascii_8bit" if node.ascii_8bit?), ("windows_31j" if node.windows_31j?), ("utf_8" if node.utf_8?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("forced_us_ascii_encoding" if node.forced_us_ascii_encoding?)].compact
|
|
1597
1623
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1601,8 +1627,8 @@ module Prism
|
|
|
1601
1627
|
commands << ["└── unescaped: #{node.unescaped.inspect}\n", indent]
|
|
1602
1628
|
end
|
|
1603
1629
|
|
|
1604
|
-
|
|
1605
|
-
def visit_match_predicate_node(node)
|
|
1630
|
+
#: (MatchPredicateNode node) -> void
|
|
1631
|
+
def visit_match_predicate_node(node) # :nodoc:
|
|
1606
1632
|
commands << [inspect_node("MatchPredicateNode", node), indent]
|
|
1607
1633
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1608
1634
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1610,11 +1636,11 @@ module Prism
|
|
|
1610
1636
|
commands << [node.value, "#{indent}│ "]
|
|
1611
1637
|
commands << ["├── pattern:\n", indent]
|
|
1612
1638
|
commands << [node.pattern, "#{indent}│ "]
|
|
1613
|
-
commands << ["└──
|
|
1639
|
+
commands << ["└── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
|
|
1614
1640
|
end
|
|
1615
1641
|
|
|
1616
|
-
|
|
1617
|
-
def visit_match_required_node(node)
|
|
1642
|
+
#: (MatchRequiredNode node) -> void
|
|
1643
|
+
def visit_match_required_node(node) # :nodoc:
|
|
1618
1644
|
commands << [inspect_node("MatchRequiredNode", node), indent]
|
|
1619
1645
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1620
1646
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1625,8 +1651,8 @@ module Prism
|
|
|
1625
1651
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
1626
1652
|
end
|
|
1627
1653
|
|
|
1628
|
-
|
|
1629
|
-
def visit_match_write_node(node)
|
|
1654
|
+
#: (MatchWriteNode node) -> void
|
|
1655
|
+
def visit_match_write_node(node) # :nodoc:
|
|
1630
1656
|
commands << [inspect_node("MatchWriteNode", node), indent]
|
|
1631
1657
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1632
1658
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1643,15 +1669,8 @@ module Prism
|
|
|
1643
1669
|
end
|
|
1644
1670
|
end
|
|
1645
1671
|
|
|
1646
|
-
|
|
1647
|
-
def
|
|
1648
|
-
commands << [inspect_node("MissingNode", node), indent]
|
|
1649
|
-
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1650
|
-
commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
1651
|
-
end
|
|
1652
|
-
|
|
1653
|
-
# Inspect a ModuleNode node.
|
|
1654
|
-
def visit_module_node(node)
|
|
1672
|
+
#: (ModuleNode node) -> void
|
|
1673
|
+
def visit_module_node(node) # :nodoc:
|
|
1655
1674
|
commands << [inspect_node("ModuleNode", node), indent]
|
|
1656
1675
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1657
1676
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1669,8 +1688,8 @@ module Prism
|
|
|
1669
1688
|
commands << ["└── name: #{node.name.inspect}\n", indent]
|
|
1670
1689
|
end
|
|
1671
1690
|
|
|
1672
|
-
|
|
1673
|
-
def visit_multi_target_node(node)
|
|
1691
|
+
#: (MultiTargetNode node) -> void
|
|
1692
|
+
def visit_multi_target_node(node) # :nodoc:
|
|
1674
1693
|
commands << [inspect_node("MultiTargetNode", node), indent]
|
|
1675
1694
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1676
1695
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1702,8 +1721,8 @@ module Prism
|
|
|
1702
1721
|
commands << ["└── rparen_loc: #{inspect_location(node.rparen_loc)}\n", indent]
|
|
1703
1722
|
end
|
|
1704
1723
|
|
|
1705
|
-
|
|
1706
|
-
def visit_multi_write_node(node)
|
|
1724
|
+
#: (MultiWriteNode node) -> void
|
|
1725
|
+
def visit_multi_write_node(node) # :nodoc:
|
|
1707
1726
|
commands << [inspect_node("MultiWriteNode", node), indent]
|
|
1708
1727
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1709
1728
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1738,8 +1757,8 @@ module Prism
|
|
|
1738
1757
|
commands << [node.value, "#{indent} "]
|
|
1739
1758
|
end
|
|
1740
1759
|
|
|
1741
|
-
|
|
1742
|
-
def visit_next_node(node)
|
|
1760
|
+
#: (NextNode node) -> void
|
|
1761
|
+
def visit_next_node(node) # :nodoc:
|
|
1743
1762
|
commands << [inspect_node("NextNode", node), indent]
|
|
1744
1763
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1745
1764
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1752,15 +1771,24 @@ module Prism
|
|
|
1752
1771
|
commands << ["└── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
|
|
1753
1772
|
end
|
|
1754
1773
|
|
|
1755
|
-
|
|
1756
|
-
def visit_nil_node(node)
|
|
1774
|
+
#: (NilNode node) -> void
|
|
1775
|
+
def visit_nil_node(node) # :nodoc:
|
|
1757
1776
|
commands << [inspect_node("NilNode", node), indent]
|
|
1758
1777
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1759
1778
|
commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
1760
1779
|
end
|
|
1761
1780
|
|
|
1762
|
-
|
|
1763
|
-
def
|
|
1781
|
+
#: (NoBlockParameterNode node) -> void
|
|
1782
|
+
def visit_no_block_parameter_node(node) # :nodoc:
|
|
1783
|
+
commands << [inspect_node("NoBlockParameterNode", node), indent]
|
|
1784
|
+
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1785
|
+
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
1786
|
+
commands << ["├── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
1787
|
+
commands << ["└── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
|
|
1788
|
+
end
|
|
1789
|
+
|
|
1790
|
+
#: (NoKeywordsParameterNode node) -> void
|
|
1791
|
+
def visit_no_keywords_parameter_node(node) # :nodoc:
|
|
1764
1792
|
commands << [inspect_node("NoKeywordsParameterNode", node), indent]
|
|
1765
1793
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1766
1794
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1768,24 +1796,24 @@ module Prism
|
|
|
1768
1796
|
commands << ["└── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
|
|
1769
1797
|
end
|
|
1770
1798
|
|
|
1771
|
-
|
|
1772
|
-
def visit_numbered_parameters_node(node)
|
|
1799
|
+
#: (NumberedParametersNode node) -> void
|
|
1800
|
+
def visit_numbered_parameters_node(node) # :nodoc:
|
|
1773
1801
|
commands << [inspect_node("NumberedParametersNode", node), indent]
|
|
1774
1802
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1775
1803
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
1776
1804
|
commands << ["└── maximum: #{node.maximum.inspect}\n", indent]
|
|
1777
1805
|
end
|
|
1778
1806
|
|
|
1779
|
-
|
|
1780
|
-
def visit_numbered_reference_read_node(node)
|
|
1807
|
+
#: (NumberedReferenceReadNode node) -> void
|
|
1808
|
+
def visit_numbered_reference_read_node(node) # :nodoc:
|
|
1781
1809
|
commands << [inspect_node("NumberedReferenceReadNode", node), indent]
|
|
1782
1810
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1783
1811
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
1784
1812
|
commands << ["└── number: #{node.number.inspect}\n", indent]
|
|
1785
1813
|
end
|
|
1786
1814
|
|
|
1787
|
-
|
|
1788
|
-
def visit_optional_keyword_parameter_node(node)
|
|
1815
|
+
#: (OptionalKeywordParameterNode node) -> void
|
|
1816
|
+
def visit_optional_keyword_parameter_node(node) # :nodoc:
|
|
1789
1817
|
commands << [inspect_node("OptionalKeywordParameterNode", node), indent]
|
|
1790
1818
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact
|
|
1791
1819
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1795,8 +1823,8 @@ module Prism
|
|
|
1795
1823
|
commands << [node.value, "#{indent} "]
|
|
1796
1824
|
end
|
|
1797
1825
|
|
|
1798
|
-
|
|
1799
|
-
def visit_optional_parameter_node(node)
|
|
1826
|
+
#: (OptionalParameterNode node) -> void
|
|
1827
|
+
def visit_optional_parameter_node(node) # :nodoc:
|
|
1800
1828
|
commands << [inspect_node("OptionalParameterNode", node), indent]
|
|
1801
1829
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact
|
|
1802
1830
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1807,8 +1835,8 @@ module Prism
|
|
|
1807
1835
|
commands << [node.value, "#{indent} "]
|
|
1808
1836
|
end
|
|
1809
1837
|
|
|
1810
|
-
|
|
1811
|
-
def visit_or_node(node)
|
|
1838
|
+
#: (OrNode node) -> void
|
|
1839
|
+
def visit_or_node(node) # :nodoc:
|
|
1812
1840
|
commands << [inspect_node("OrNode", node), indent]
|
|
1813
1841
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1814
1842
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1819,8 +1847,8 @@ module Prism
|
|
|
1819
1847
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
1820
1848
|
end
|
|
1821
1849
|
|
|
1822
|
-
|
|
1823
|
-
def visit_parameters_node(node)
|
|
1850
|
+
#: (ParametersNode node) -> void
|
|
1851
|
+
def visit_parameters_node(node) # :nodoc:
|
|
1824
1852
|
commands << [inspect_node("ParametersNode", node), indent]
|
|
1825
1853
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1826
1854
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1880,8 +1908,8 @@ module Prism
|
|
|
1880
1908
|
end
|
|
1881
1909
|
end
|
|
1882
1910
|
|
|
1883
|
-
|
|
1884
|
-
def visit_parentheses_node(node)
|
|
1911
|
+
#: (ParenthesesNode node) -> void
|
|
1912
|
+
def visit_parentheses_node(node) # :nodoc:
|
|
1885
1913
|
commands << [inspect_node("ParenthesesNode", node), indent]
|
|
1886
1914
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("multiple_statements" if node.multiple_statements?)].compact
|
|
1887
1915
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1895,8 +1923,8 @@ module Prism
|
|
|
1895
1923
|
commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
|
|
1896
1924
|
end
|
|
1897
1925
|
|
|
1898
|
-
|
|
1899
|
-
def visit_pinned_expression_node(node)
|
|
1926
|
+
#: (PinnedExpressionNode node) -> void
|
|
1927
|
+
def visit_pinned_expression_node(node) # :nodoc:
|
|
1900
1928
|
commands << [inspect_node("PinnedExpressionNode", node), indent]
|
|
1901
1929
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1902
1930
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1907,8 +1935,8 @@ module Prism
|
|
|
1907
1935
|
commands << ["└── rparen_loc: #{inspect_location(node.rparen_loc)}\n", indent]
|
|
1908
1936
|
end
|
|
1909
1937
|
|
|
1910
|
-
|
|
1911
|
-
def visit_pinned_variable_node(node)
|
|
1938
|
+
#: (PinnedVariableNode node) -> void
|
|
1939
|
+
def visit_pinned_variable_node(node) # :nodoc:
|
|
1912
1940
|
commands << [inspect_node("PinnedVariableNode", node), indent]
|
|
1913
1941
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1914
1942
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1917,8 +1945,8 @@ module Prism
|
|
|
1917
1945
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
1918
1946
|
end
|
|
1919
1947
|
|
|
1920
|
-
|
|
1921
|
-
def visit_post_execution_node(node)
|
|
1948
|
+
#: (PostExecutionNode node) -> void
|
|
1949
|
+
def visit_post_execution_node(node) # :nodoc:
|
|
1922
1950
|
commands << [inspect_node("PostExecutionNode", node), indent]
|
|
1923
1951
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1924
1952
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1933,8 +1961,8 @@ module Prism
|
|
|
1933
1961
|
commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
|
|
1934
1962
|
end
|
|
1935
1963
|
|
|
1936
|
-
|
|
1937
|
-
def visit_pre_execution_node(node)
|
|
1964
|
+
#: (PreExecutionNode node) -> void
|
|
1965
|
+
def visit_pre_execution_node(node) # :nodoc:
|
|
1938
1966
|
commands << [inspect_node("PreExecutionNode", node), indent]
|
|
1939
1967
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1940
1968
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1949,8 +1977,8 @@ module Prism
|
|
|
1949
1977
|
commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
|
|
1950
1978
|
end
|
|
1951
1979
|
|
|
1952
|
-
|
|
1953
|
-
def visit_program_node(node)
|
|
1980
|
+
#: (ProgramNode node) -> void
|
|
1981
|
+
def visit_program_node(node) # :nodoc:
|
|
1954
1982
|
commands << [inspect_node("ProgramNode", node), indent]
|
|
1955
1983
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1956
1984
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1959,8 +1987,8 @@ module Prism
|
|
|
1959
1987
|
commands << [node.statements, "#{indent} "]
|
|
1960
1988
|
end
|
|
1961
1989
|
|
|
1962
|
-
|
|
1963
|
-
def visit_range_node(node)
|
|
1990
|
+
#: (RangeNode node) -> void
|
|
1991
|
+
def visit_range_node(node) # :nodoc:
|
|
1964
1992
|
commands << [inspect_node("RangeNode", node), indent]
|
|
1965
1993
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("exclude_end" if node.exclude_end?)].compact
|
|
1966
1994
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1979,8 +2007,8 @@ module Prism
|
|
|
1979
2007
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
1980
2008
|
end
|
|
1981
2009
|
|
|
1982
|
-
|
|
1983
|
-
def visit_rational_node(node)
|
|
2010
|
+
#: (RationalNode node) -> void
|
|
2011
|
+
def visit_rational_node(node) # :nodoc:
|
|
1984
2012
|
commands << [inspect_node("RationalNode", node), indent]
|
|
1985
2013
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("binary" if node.binary?), ("decimal" if node.decimal?), ("octal" if node.octal?), ("hexadecimal" if node.hexadecimal?)].compact
|
|
1986
2014
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -1988,15 +2016,15 @@ module Prism
|
|
|
1988
2016
|
commands << ["└── denominator: #{node.denominator.inspect}\n", indent]
|
|
1989
2017
|
end
|
|
1990
2018
|
|
|
1991
|
-
|
|
1992
|
-
def visit_redo_node(node)
|
|
2019
|
+
#: (RedoNode node) -> void
|
|
2020
|
+
def visit_redo_node(node) # :nodoc:
|
|
1993
2021
|
commands << [inspect_node("RedoNode", node), indent]
|
|
1994
2022
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
1995
2023
|
commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
1996
2024
|
end
|
|
1997
2025
|
|
|
1998
|
-
|
|
1999
|
-
def visit_regular_expression_node(node)
|
|
2026
|
+
#: (RegularExpressionNode node) -> void
|
|
2027
|
+
def visit_regular_expression_node(node) # :nodoc:
|
|
2000
2028
|
commands << [inspect_node("RegularExpressionNode", node), indent]
|
|
2001
2029
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("ignore_case" if node.ignore_case?), ("extended" if node.extended?), ("multi_line" if node.multi_line?), ("once" if node.once?), ("euc_jp" if node.euc_jp?), ("ascii_8bit" if node.ascii_8bit?), ("windows_31j" if node.windows_31j?), ("utf_8" if node.utf_8?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("forced_us_ascii_encoding" if node.forced_us_ascii_encoding?)].compact
|
|
2002
2030
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -2006,8 +2034,8 @@ module Prism
|
|
|
2006
2034
|
commands << ["└── unescaped: #{node.unescaped.inspect}\n", indent]
|
|
2007
2035
|
end
|
|
2008
2036
|
|
|
2009
|
-
|
|
2010
|
-
def visit_required_keyword_parameter_node(node)
|
|
2037
|
+
#: (RequiredKeywordParameterNode node) -> void
|
|
2038
|
+
def visit_required_keyword_parameter_node(node) # :nodoc:
|
|
2011
2039
|
commands << [inspect_node("RequiredKeywordParameterNode", node), indent]
|
|
2012
2040
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact
|
|
2013
2041
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -2015,16 +2043,16 @@ module Prism
|
|
|
2015
2043
|
commands << ["└── name_loc: #{inspect_location(node.name_loc)}\n", indent]
|
|
2016
2044
|
end
|
|
2017
2045
|
|
|
2018
|
-
|
|
2019
|
-
def visit_required_parameter_node(node)
|
|
2046
|
+
#: (RequiredParameterNode node) -> void
|
|
2047
|
+
def visit_required_parameter_node(node) # :nodoc:
|
|
2020
2048
|
commands << [inspect_node("RequiredParameterNode", node), indent]
|
|
2021
2049
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact
|
|
2022
2050
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
2023
2051
|
commands << ["└── name: #{node.name.inspect}\n", indent]
|
|
2024
2052
|
end
|
|
2025
2053
|
|
|
2026
|
-
|
|
2027
|
-
def visit_rescue_modifier_node(node)
|
|
2054
|
+
#: (RescueModifierNode node) -> void
|
|
2055
|
+
def visit_rescue_modifier_node(node) # :nodoc:
|
|
2028
2056
|
commands << [inspect_node("RescueModifierNode", node), indent]
|
|
2029
2057
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
2030
2058
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -2035,8 +2063,8 @@ module Prism
|
|
|
2035
2063
|
commands << [node.rescue_expression, "#{indent} "]
|
|
2036
2064
|
end
|
|
2037
2065
|
|
|
2038
|
-
|
|
2039
|
-
def visit_rescue_node(node)
|
|
2066
|
+
#: (RescueNode node) -> void
|
|
2067
|
+
def visit_rescue_node(node) # :nodoc:
|
|
2040
2068
|
commands << [inspect_node("RescueNode", node), indent]
|
|
2041
2069
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
2042
2070
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -2072,8 +2100,8 @@ module Prism
|
|
|
2072
2100
|
end
|
|
2073
2101
|
end
|
|
2074
2102
|
|
|
2075
|
-
|
|
2076
|
-
def visit_rest_parameter_node(node)
|
|
2103
|
+
#: (RestParameterNode node) -> void
|
|
2104
|
+
def visit_rest_parameter_node(node) # :nodoc:
|
|
2077
2105
|
commands << [inspect_node("RestParameterNode", node), indent]
|
|
2078
2106
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact
|
|
2079
2107
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -2086,15 +2114,15 @@ module Prism
|
|
|
2086
2114
|
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
|
|
2087
2115
|
end
|
|
2088
2116
|
|
|
2089
|
-
|
|
2090
|
-
def visit_retry_node(node)
|
|
2117
|
+
#: (RetryNode node) -> void
|
|
2118
|
+
def visit_retry_node(node) # :nodoc:
|
|
2091
2119
|
commands << [inspect_node("RetryNode", node), indent]
|
|
2092
2120
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
2093
2121
|
commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
2094
2122
|
end
|
|
2095
2123
|
|
|
2096
|
-
|
|
2097
|
-
def visit_return_node(node)
|
|
2124
|
+
#: (ReturnNode node) -> void
|
|
2125
|
+
def visit_return_node(node) # :nodoc:
|
|
2098
2126
|
commands << [inspect_node("ReturnNode", node), indent]
|
|
2099
2127
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
2100
2128
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -2107,15 +2135,15 @@ module Prism
|
|
|
2107
2135
|
end
|
|
2108
2136
|
end
|
|
2109
2137
|
|
|
2110
|
-
|
|
2111
|
-
def visit_self_node(node)
|
|
2138
|
+
#: (SelfNode node) -> void
|
|
2139
|
+
def visit_self_node(node) # :nodoc:
|
|
2112
2140
|
commands << [inspect_node("SelfNode", node), indent]
|
|
2113
2141
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
2114
2142
|
commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
2115
2143
|
end
|
|
2116
2144
|
|
|
2117
|
-
|
|
2118
|
-
def visit_shareable_constant_node(node)
|
|
2145
|
+
#: (ShareableConstantNode node) -> void
|
|
2146
|
+
def visit_shareable_constant_node(node) # :nodoc:
|
|
2119
2147
|
commands << [inspect_node("ShareableConstantNode", node), indent]
|
|
2120
2148
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("literal" if node.literal?), ("experimental_everything" if node.experimental_everything?), ("experimental_copy" if node.experimental_copy?)].compact
|
|
2121
2149
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -2123,8 +2151,8 @@ module Prism
|
|
|
2123
2151
|
commands << [node.write, "#{indent} "]
|
|
2124
2152
|
end
|
|
2125
2153
|
|
|
2126
|
-
|
|
2127
|
-
def visit_singleton_class_node(node)
|
|
2154
|
+
#: (SingletonClassNode node) -> void
|
|
2155
|
+
def visit_singleton_class_node(node) # :nodoc:
|
|
2128
2156
|
commands << [inspect_node("SingletonClassNode", node), indent]
|
|
2129
2157
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
2130
2158
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -2142,30 +2170,30 @@ module Prism
|
|
|
2142
2170
|
commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
|
|
2143
2171
|
end
|
|
2144
2172
|
|
|
2145
|
-
|
|
2146
|
-
def visit_source_encoding_node(node)
|
|
2173
|
+
#: (SourceEncodingNode node) -> void
|
|
2174
|
+
def visit_source_encoding_node(node) # :nodoc:
|
|
2147
2175
|
commands << [inspect_node("SourceEncodingNode", node), indent]
|
|
2148
2176
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
2149
2177
|
commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
2150
2178
|
end
|
|
2151
2179
|
|
|
2152
|
-
|
|
2153
|
-
def visit_source_file_node(node)
|
|
2180
|
+
#: (SourceFileNode node) -> void
|
|
2181
|
+
def visit_source_file_node(node) # :nodoc:
|
|
2154
2182
|
commands << [inspect_node("SourceFileNode", node), indent]
|
|
2155
2183
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("frozen" if node.frozen?), ("mutable" if node.mutable?)].compact
|
|
2156
2184
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
2157
2185
|
commands << ["└── filepath: #{node.filepath.inspect}\n", indent]
|
|
2158
2186
|
end
|
|
2159
2187
|
|
|
2160
|
-
|
|
2161
|
-
def visit_source_line_node(node)
|
|
2188
|
+
#: (SourceLineNode node) -> void
|
|
2189
|
+
def visit_source_line_node(node) # :nodoc:
|
|
2162
2190
|
commands << [inspect_node("SourceLineNode", node), indent]
|
|
2163
2191
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
2164
2192
|
commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
2165
2193
|
end
|
|
2166
2194
|
|
|
2167
|
-
|
|
2168
|
-
def visit_splat_node(node)
|
|
2195
|
+
#: (SplatNode node) -> void
|
|
2196
|
+
def visit_splat_node(node) # :nodoc:
|
|
2169
2197
|
commands << [inspect_node("SplatNode", node), indent]
|
|
2170
2198
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
2171
2199
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -2178,8 +2206,8 @@ module Prism
|
|
|
2178
2206
|
end
|
|
2179
2207
|
end
|
|
2180
2208
|
|
|
2181
|
-
|
|
2182
|
-
def visit_statements_node(node)
|
|
2209
|
+
#: (StatementsNode node) -> void
|
|
2210
|
+
def visit_statements_node(node) # :nodoc:
|
|
2183
2211
|
commands << [inspect_node("StatementsNode", node), indent]
|
|
2184
2212
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
2185
2213
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -2194,8 +2222,8 @@ module Prism
|
|
|
2194
2222
|
end
|
|
2195
2223
|
end
|
|
2196
2224
|
|
|
2197
|
-
|
|
2198
|
-
def visit_string_node(node)
|
|
2225
|
+
#: (StringNode node) -> void
|
|
2226
|
+
def visit_string_node(node) # :nodoc:
|
|
2199
2227
|
commands << [inspect_node("StringNode", node), indent]
|
|
2200
2228
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("frozen" if node.frozen?), ("mutable" if node.mutable?)].compact
|
|
2201
2229
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -2205,8 +2233,8 @@ module Prism
|
|
|
2205
2233
|
commands << ["└── unescaped: #{node.unescaped.inspect}\n", indent]
|
|
2206
2234
|
end
|
|
2207
2235
|
|
|
2208
|
-
|
|
2209
|
-
def visit_super_node(node)
|
|
2236
|
+
#: (SuperNode node) -> void
|
|
2237
|
+
def visit_super_node(node) # :nodoc:
|
|
2210
2238
|
commands << [inspect_node("SuperNode", node), indent]
|
|
2211
2239
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
2212
2240
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -2227,26 +2255,26 @@ module Prism
|
|
|
2227
2255
|
end
|
|
2228
2256
|
end
|
|
2229
2257
|
|
|
2230
|
-
|
|
2231
|
-
def visit_symbol_node(node)
|
|
2258
|
+
#: (SymbolNode node) -> void
|
|
2259
|
+
def visit_symbol_node(node) # :nodoc:
|
|
2232
2260
|
commands << [inspect_node("SymbolNode", node), indent]
|
|
2233
2261
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?), ("forced_us_ascii_encoding" if node.forced_us_ascii_encoding?)].compact
|
|
2234
2262
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
2235
2263
|
commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
|
|
2236
|
-
commands << ["├──
|
|
2264
|
+
commands << ["├── content_loc: #{inspect_location(node.content_loc)}\n", indent]
|
|
2237
2265
|
commands << ["├── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
|
|
2238
2266
|
commands << ["└── unescaped: #{node.unescaped.inspect}\n", indent]
|
|
2239
2267
|
end
|
|
2240
2268
|
|
|
2241
|
-
|
|
2242
|
-
def visit_true_node(node)
|
|
2269
|
+
#: (TrueNode node) -> void
|
|
2270
|
+
def visit_true_node(node) # :nodoc:
|
|
2243
2271
|
commands << [inspect_node("TrueNode", node), indent]
|
|
2244
2272
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
2245
2273
|
commands << ["└── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
2246
2274
|
end
|
|
2247
2275
|
|
|
2248
|
-
|
|
2249
|
-
def visit_undef_node(node)
|
|
2276
|
+
#: (UndefNode node) -> void
|
|
2277
|
+
def visit_undef_node(node) # :nodoc:
|
|
2250
2278
|
commands << [inspect_node("UndefNode", node), indent]
|
|
2251
2279
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
2252
2280
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -2262,12 +2290,12 @@ module Prism
|
|
|
2262
2290
|
commands << ["└── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
|
|
2263
2291
|
end
|
|
2264
2292
|
|
|
2265
|
-
|
|
2266
|
-
def visit_unless_node(node)
|
|
2293
|
+
#: (UnlessNode node) -> void
|
|
2294
|
+
def visit_unless_node(node) # :nodoc:
|
|
2267
2295
|
commands << [inspect_node("UnlessNode", node), indent]
|
|
2268
2296
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
2269
2297
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
2270
|
-
commands << ["├──
|
|
2298
|
+
commands << ["├── unless_keyword_loc: #{inspect_location(node.unless_keyword_loc)}\n", indent]
|
|
2271
2299
|
commands << ["├── predicate:\n", indent]
|
|
2272
2300
|
commands << [node.predicate, "#{indent}│ "]
|
|
2273
2301
|
commands << ["├── then_keyword_loc: #{inspect_location(node.then_keyword_loc)}\n", indent]
|
|
@@ -2286,14 +2314,14 @@ module Prism
|
|
|
2286
2314
|
commands << ["└── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
|
|
2287
2315
|
end
|
|
2288
2316
|
|
|
2289
|
-
|
|
2290
|
-
def visit_until_node(node)
|
|
2317
|
+
#: (UntilNode node) -> void
|
|
2318
|
+
def visit_until_node(node) # :nodoc:
|
|
2291
2319
|
commands << [inspect_node("UntilNode", node), indent]
|
|
2292
2320
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("begin_modifier" if node.begin_modifier?)].compact
|
|
2293
2321
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
2294
|
-
commands << ["├──
|
|
2322
|
+
commands << ["├── until_keyword_loc: #{inspect_location(node.until_keyword_loc)}\n", indent]
|
|
2295
2323
|
commands << ["├── do_keyword_loc: #{inspect_location(node.do_keyword_loc)}\n", indent]
|
|
2296
|
-
commands << ["├──
|
|
2324
|
+
commands << ["├── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
|
|
2297
2325
|
commands << ["├── predicate:\n", indent]
|
|
2298
2326
|
commands << [node.predicate, "#{indent}│ "]
|
|
2299
2327
|
if (statements = node.statements).nil?
|
|
@@ -2304,12 +2332,12 @@ module Prism
|
|
|
2304
2332
|
end
|
|
2305
2333
|
end
|
|
2306
2334
|
|
|
2307
|
-
|
|
2308
|
-
def visit_when_node(node)
|
|
2335
|
+
#: (WhenNode node) -> void
|
|
2336
|
+
def visit_when_node(node) # :nodoc:
|
|
2309
2337
|
commands << [inspect_node("WhenNode", node), indent]
|
|
2310
2338
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
2311
2339
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
2312
|
-
commands << ["├──
|
|
2340
|
+
commands << ["├── when_keyword_loc: #{inspect_location(node.when_keyword_loc)}\n", indent]
|
|
2313
2341
|
commands << ["├── conditions: (length: #{(conditions = node.conditions).length})\n", indent]
|
|
2314
2342
|
if conditions.any?
|
|
2315
2343
|
conditions[0...-1].each do |child|
|
|
@@ -2328,14 +2356,14 @@ module Prism
|
|
|
2328
2356
|
end
|
|
2329
2357
|
end
|
|
2330
2358
|
|
|
2331
|
-
|
|
2332
|
-
def visit_while_node(node)
|
|
2359
|
+
#: (WhileNode node) -> void
|
|
2360
|
+
def visit_while_node(node) # :nodoc:
|
|
2333
2361
|
commands << [inspect_node("WhileNode", node), indent]
|
|
2334
2362
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("begin_modifier" if node.begin_modifier?)].compact
|
|
2335
2363
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
2336
|
-
commands << ["├──
|
|
2364
|
+
commands << ["├── while_keyword_loc: #{inspect_location(node.while_keyword_loc)}\n", indent]
|
|
2337
2365
|
commands << ["├── do_keyword_loc: #{inspect_location(node.do_keyword_loc)}\n", indent]
|
|
2338
|
-
commands << ["├──
|
|
2366
|
+
commands << ["├── end_keyword_loc: #{inspect_location(node.end_keyword_loc)}\n", indent]
|
|
2339
2367
|
commands << ["├── predicate:\n", indent]
|
|
2340
2368
|
commands << [node.predicate, "#{indent}│ "]
|
|
2341
2369
|
if (statements = node.statements).nil?
|
|
@@ -2346,8 +2374,8 @@ module Prism
|
|
|
2346
2374
|
end
|
|
2347
2375
|
end
|
|
2348
2376
|
|
|
2349
|
-
|
|
2350
|
-
def visit_x_string_node(node)
|
|
2377
|
+
#: (XStringNode node) -> void
|
|
2378
|
+
def visit_x_string_node(node) # :nodoc:
|
|
2351
2379
|
commands << [inspect_node("XStringNode", node), indent]
|
|
2352
2380
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("forced_utf8_encoding" if node.forced_utf8_encoding?), ("forced_binary_encoding" if node.forced_binary_encoding?)].compact
|
|
2353
2381
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -2357,8 +2385,8 @@ module Prism
|
|
|
2357
2385
|
commands << ["└── unescaped: #{node.unescaped.inspect}\n", indent]
|
|
2358
2386
|
end
|
|
2359
2387
|
|
|
2360
|
-
|
|
2361
|
-
def visit_yield_node(node)
|
|
2388
|
+
#: (YieldNode node) -> void
|
|
2389
|
+
def visit_yield_node(node) # :nodoc:
|
|
2362
2390
|
commands << [inspect_node("YieldNode", node), indent]
|
|
2363
2391
|
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
|
|
2364
2392
|
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
|
|
@@ -2376,13 +2404,17 @@ module Prism
|
|
|
2376
2404
|
private
|
|
2377
2405
|
|
|
2378
2406
|
# Compose a header for the given node.
|
|
2379
|
-
|
|
2407
|
+
#
|
|
2408
|
+
#: (String name, node node) -> String
|
|
2409
|
+
def inspect_node(name, node) # :nodoc:
|
|
2380
2410
|
location = node.location
|
|
2381
2411
|
"@ #{name} (location: (#{location.start_line},#{location.start_column})-(#{location.end_line},#{location.end_column}))\n"
|
|
2382
2412
|
end
|
|
2383
2413
|
|
|
2384
2414
|
# Compose a string representing the given inner location field.
|
|
2385
|
-
|
|
2415
|
+
#
|
|
2416
|
+
#: (Location? location) -> String
|
|
2417
|
+
def inspect_location(location) # :nodoc:
|
|
2386
2418
|
if location
|
|
2387
2419
|
"(#{location.start_line},#{location.start_column})-(#{location.end_line},#{location.end_column}) = #{location.slice.inspect}"
|
|
2388
2420
|
else
|