ruby-lsp 0.11.2 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/exe/ruby-lsp +2 -1
  4. data/exe/ruby-lsp-doctor +16 -0
  5. data/lib/ruby_indexer/lib/ruby_indexer/configuration.rb +5 -1
  6. data/lib/ruby_indexer/lib/ruby_indexer/entry.rb +205 -0
  7. data/lib/ruby_indexer/lib/ruby_indexer/index.rb +23 -106
  8. data/lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb +6 -6
  9. data/lib/ruby_indexer/lib/ruby_indexer/visitor.rb +101 -49
  10. data/lib/ruby_indexer/ruby_indexer.rb +1 -0
  11. data/lib/ruby_indexer/test/classes_and_modules_test.rb +49 -16
  12. data/lib/ruby_indexer/test/constant_test.rb +99 -36
  13. data/lib/ruby_indexer/test/index_test.rb +1 -1
  14. data/lib/ruby_indexer/test/method_test.rb +73 -0
  15. data/lib/ruby_indexer/test/test_case.rb +5 -1
  16. data/lib/ruby_lsp/addon.rb +8 -8
  17. data/lib/ruby_lsp/document.rb +14 -14
  18. data/lib/ruby_lsp/executor.rb +89 -53
  19. data/lib/ruby_lsp/internal.rb +7 -2
  20. data/lib/ruby_lsp/listener.rb +6 -6
  21. data/lib/ruby_lsp/requests/base_request.rb +1 -9
  22. data/lib/ruby_lsp/requests/code_action_resolve.rb +3 -3
  23. data/lib/ruby_lsp/requests/code_lens.rb +30 -30
  24. data/lib/ruby_lsp/requests/completion.rb +83 -32
  25. data/lib/ruby_lsp/requests/definition.rb +21 -15
  26. data/lib/ruby_lsp/requests/diagnostics.rb +1 -1
  27. data/lib/ruby_lsp/requests/document_highlight.rb +508 -31
  28. data/lib/ruby_lsp/requests/document_link.rb +24 -17
  29. data/lib/ruby_lsp/requests/document_symbol.rb +42 -42
  30. data/lib/ruby_lsp/requests/folding_ranges.rb +83 -77
  31. data/lib/ruby_lsp/requests/hover.rb +22 -17
  32. data/lib/ruby_lsp/requests/inlay_hints.rb +6 -6
  33. data/lib/ruby_lsp/requests/selection_ranges.rb +13 -105
  34. data/lib/ruby_lsp/requests/semantic_highlighting.rb +92 -92
  35. data/lib/ruby_lsp/requests/support/annotation.rb +3 -3
  36. data/lib/ruby_lsp/requests/support/common.rb +5 -5
  37. data/lib/ruby_lsp/requests/support/rubocop_diagnostic.rb +12 -0
  38. data/lib/ruby_lsp/requests/support/semantic_token_encoder.rb +10 -7
  39. data/lib/ruby_lsp/requests/support/sorbet.rb +28 -28
  40. data/lib/ruby_lsp/requests/workspace_symbol.rb +4 -4
  41. data/lib/ruby_lsp/requests.rb +0 -1
  42. data/lib/ruby_lsp/setup_bundler.rb +8 -5
  43. metadata +19 -17
  44. data/lib/ruby_lsp/event_emitter.rb +0 -351
  45. data/lib/ruby_lsp/requests/support/highlight_target.rb +0 -118
@@ -10,39 +10,39 @@ module RubyLsp
10
10
 
11
11
  ANNOTATIONS = T.let(
12
12
  {
13
- "abstract!" => Annotation.new(arity: 0),
14
- "absurd" => Annotation.new(arity: 1, receiver: true),
15
- "all" => Annotation.new(arity: (2..), receiver: true),
16
- "any" => Annotation.new(arity: (2..), receiver: true),
17
- "assert_type!" => Annotation.new(arity: 2, receiver: true),
18
- "attached_class" => Annotation.new(arity: 0, receiver: true),
19
- "bind" => Annotation.new(arity: 2, receiver: true),
20
- "cast" => Annotation.new(arity: 2, receiver: true),
21
- "class_of" => Annotation.new(arity: 1, receiver: true),
22
- "enums" => Annotation.new(arity: 0),
23
- "interface!" => Annotation.new(arity: 0),
24
- "let" => Annotation.new(arity: 2, receiver: true),
25
- "mixes_in_class_methods" => Annotation.new(arity: 1),
26
- "must" => Annotation.new(arity: 1, receiver: true),
27
- "must_because" => Annotation.new(arity: 1, receiver: true),
28
- "nilable" => Annotation.new(arity: 1, receiver: true),
29
- "noreturn" => Annotation.new(arity: 0, receiver: true),
30
- "requires_ancestor" => Annotation.new(arity: 0),
31
- "reveal_type" => Annotation.new(arity: 1, receiver: true),
32
- "sealed!" => Annotation.new(arity: 0),
33
- "self_type" => Annotation.new(arity: 0, receiver: true),
34
- "sig" => Annotation.new(arity: 0),
35
- "type_member" => Annotation.new(arity: (0..1)),
36
- "type_template" => Annotation.new(arity: 0),
37
- "unsafe" => Annotation.new(arity: 1),
38
- "untyped" => Annotation.new(arity: 0, receiver: true),
13
+ abstract!: Annotation.new(arity: 0),
14
+ absurd: Annotation.new(arity: 1, receiver: true),
15
+ all: Annotation.new(arity: (2..), receiver: true),
16
+ any: Annotation.new(arity: (2..), receiver: true),
17
+ assert_type!: Annotation.new(arity: 2, receiver: true),
18
+ attached_class: Annotation.new(arity: 0, receiver: true),
19
+ bind: Annotation.new(arity: 2, receiver: true),
20
+ cast: Annotation.new(arity: 2, receiver: true),
21
+ class_of: Annotation.new(arity: 1, receiver: true),
22
+ enums: Annotation.new(arity: 0),
23
+ interface!: Annotation.new(arity: 0),
24
+ let: Annotation.new(arity: 2, receiver: true),
25
+ mixes_in_class_methods: Annotation.new(arity: 1),
26
+ must: Annotation.new(arity: 1, receiver: true),
27
+ must_because: Annotation.new(arity: 1, receiver: true),
28
+ nilable: Annotation.new(arity: 1, receiver: true),
29
+ noreturn: Annotation.new(arity: 0, receiver: true),
30
+ requires_ancestor: Annotation.new(arity: 0),
31
+ reveal_type: Annotation.new(arity: 1, receiver: true),
32
+ sealed!: Annotation.new(arity: 0),
33
+ self_type: Annotation.new(arity: 0, receiver: true),
34
+ sig: Annotation.new(arity: 0),
35
+ type_member: Annotation.new(arity: (0..1)),
36
+ type_template: Annotation.new(arity: 0),
37
+ unsafe: Annotation.new(arity: 1),
38
+ untyped: Annotation.new(arity: 0, receiver: true),
39
39
  },
40
- T::Hash[String, Annotation],
40
+ T::Hash[Symbol, Annotation],
41
41
  )
42
42
 
43
43
  sig do
44
44
  params(
45
- node: YARP::CallNode,
45
+ node: Prism::CallNode,
46
46
  ).returns(T::Boolean)
47
47
  end
48
48
  def annotation?(node)
@@ -73,14 +73,14 @@ module RubyLsp
73
73
 
74
74
  private
75
75
 
76
- sig { params(entry: RubyIndexer::Index::Entry).returns(T.nilable(Integer)) }
76
+ sig { params(entry: RubyIndexer::Entry).returns(T.nilable(Integer)) }
77
77
  def kind_for_entry(entry)
78
78
  case entry
79
- when RubyIndexer::Index::Entry::Class
79
+ when RubyIndexer::Entry::Class
80
80
  Constant::SymbolKind::CLASS
81
- when RubyIndexer::Index::Entry::Module
81
+ when RubyIndexer::Entry::Module
82
82
  Constant::SymbolKind::NAMESPACE
83
- when RubyIndexer::Index::Entry::Constant
83
+ when RubyIndexer::Entry::Constant
84
84
  Constant::SymbolKind::CONSTANT
85
85
  end
86
86
  end
@@ -51,7 +51,6 @@ module RubyLsp
51
51
  autoload :SemanticTokenEncoder, "ruby_lsp/requests/support/semantic_token_encoder"
52
52
  autoload :Annotation, "ruby_lsp/requests/support/annotation"
53
53
  autoload :Sorbet, "ruby_lsp/requests/support/sorbet"
54
- autoload :HighlightTarget, "ruby_lsp/requests/support/highlight_target"
55
54
  autoload :RailsDocumentClient, "ruby_lsp/requests/support/rails_document_client"
56
55
  autoload :Common, "ruby_lsp/requests/support/common"
57
56
  autoload :FormatterRunner, "ruby_lsp/requests/support/formatter_runner"
@@ -46,9 +46,9 @@ module RubyLsp
46
46
  @dependencies = T.let(load_dependencies, T::Hash[String, T.untyped])
47
47
  end
48
48
 
49
- # Setups up the custom bundle and returns the `BUNDLE_GEMFILE` and `BUNDLE_PATH` that should be used for running the
50
- # server
51
- sig { returns([String, T.nilable(String)]) }
49
+ # Sets up the custom bundle and returns the `BUNDLE_GEMFILE`, `BUNDLE_PATH` and `BUNDLE_APP_CONFIG` that should be
50
+ # used for running the server
51
+ sig { returns([String, T.nilable(String), T.nilable(String)]) }
52
52
  def setup!
53
53
  raise BundleNotLocked if @gemfile&.exist? && !@lockfile&.exist?
54
54
 
@@ -156,7 +156,7 @@ module RubyLsp
156
156
  dependencies
157
157
  end
158
158
 
159
- sig { params(bundle_gemfile: T.nilable(Pathname)).returns([String, T.nilable(String)]) }
159
+ sig { params(bundle_gemfile: T.nilable(Pathname)).returns([String, T.nilable(String), T.nilable(String)]) }
160
160
  def run_bundle_install(bundle_gemfile = @gemfile)
161
161
  # If the user has a custom bundle path configured, we need to ensure that we will use the absolute and not
162
162
  # relative version of it when running `bundle install`. This is necessary to avoid installing the gems under the
@@ -170,6 +170,9 @@ module RubyLsp
170
170
  env["BUNDLE_GEMFILE"] = bundle_gemfile.to_s
171
171
  env["BUNDLE_PATH"] = expanded_path if expanded_path
172
172
 
173
+ local_config_path = File.join(Dir.pwd, ".bundle")
174
+ env["BUNDLE_APP_CONFIG"] = local_config_path if Dir.exist?(local_config_path)
175
+
173
176
  # If both `ruby-lsp` and `debug` are already in the Gemfile, then we shouldn't try to upgrade them or else we'll
174
177
  # produce undesired source control changes. If the custom bundle was just created and either `ruby-lsp` or `debug`
175
178
  # weren't a part of the Gemfile, then we need to run `bundle install` for the first time to generate the
@@ -200,7 +203,7 @@ module RubyLsp
200
203
  # Add bundle update
201
204
  warn("Ruby LSP> Running bundle install for the custom bundle. This may take a while...")
202
205
  system(env, command)
203
- [bundle_gemfile.to_s, expanded_path]
206
+ [bundle_gemfile.to_s, expanded_path, env["BUNDLE_APP_CONFIG"]]
204
207
  end
205
208
 
206
209
  sig { returns(T::Boolean) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-lsp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-11 00:00:00.000000000 Z
11
+ date: 2023-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: language_server-protocol
@@ -25,45 +25,46 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.17.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: sorbet-runtime
28
+ name: prism
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.5.5685
33
+ version: 0.15.1
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '0.16'
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
41
  - - ">="
39
42
  - !ruby/object:Gem::Version
40
- version: 0.5.5685
43
+ version: 0.15.1
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '0.16'
41
47
  - !ruby/object:Gem::Dependency
42
- name: yarp
48
+ name: sorbet-runtime
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
51
  - - ">="
46
52
  - !ruby/object:Gem::Version
47
- version: '0.12'
48
- - - "<"
49
- - !ruby/object:Gem::Version
50
- version: '0.13'
53
+ version: 0.5.5685
51
54
  type: :runtime
52
55
  prerelease: false
53
56
  version_requirements: !ruby/object:Gem::Requirement
54
57
  requirements:
55
58
  - - ">="
56
59
  - !ruby/object:Gem::Version
57
- version: '0.12'
58
- - - "<"
59
- - !ruby/object:Gem::Version
60
- version: '0.13'
60
+ version: 0.5.5685
61
61
  description: An opinionated language server for Ruby
62
62
  email:
63
63
  - ruby@shopify.com
64
64
  executables:
65
65
  - ruby-lsp
66
66
  - ruby-lsp-check
67
+ - ruby-lsp-doctor
67
68
  extensions: []
68
69
  extra_rdoc_files: []
69
70
  files:
@@ -72,10 +73,12 @@ files:
72
73
  - VERSION
73
74
  - exe/ruby-lsp
74
75
  - exe/ruby-lsp-check
76
+ - exe/ruby-lsp-doctor
75
77
  - lib/core_ext/uri.rb
76
78
  - lib/rubocop/cop/ruby_lsp/use_language_server_aliases.rb
77
79
  - lib/ruby-lsp.rb
78
80
  - lib/ruby_indexer/lib/ruby_indexer/configuration.rb
81
+ - lib/ruby_indexer/lib/ruby_indexer/entry.rb
79
82
  - lib/ruby_indexer/lib/ruby_indexer/index.rb
80
83
  - lib/ruby_indexer/lib/ruby_indexer/indexable_path.rb
81
84
  - lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb
@@ -85,12 +88,12 @@ files:
85
88
  - lib/ruby_indexer/test/configuration_test.rb
86
89
  - lib/ruby_indexer/test/constant_test.rb
87
90
  - lib/ruby_indexer/test/index_test.rb
91
+ - lib/ruby_indexer/test/method_test.rb
88
92
  - lib/ruby_indexer/test/prefix_tree_test.rb
89
93
  - lib/ruby_indexer/test/test_case.rb
90
94
  - lib/ruby_lsp/addon.rb
91
95
  - lib/ruby_lsp/check_docs.rb
92
96
  - lib/ruby_lsp/document.rb
93
- - lib/ruby_lsp/event_emitter.rb
94
97
  - lib/ruby_lsp/executor.rb
95
98
  - lib/ruby_lsp/internal.rb
96
99
  - lib/ruby_lsp/listener.rb
@@ -118,7 +121,6 @@ files:
118
121
  - lib/ruby_lsp/requests/support/common.rb
119
122
  - lib/ruby_lsp/requests/support/dependency_detector.rb
120
123
  - lib/ruby_lsp/requests/support/formatter_runner.rb
121
- - lib/ruby_lsp/requests/support/highlight_target.rb
122
124
  - lib/ruby_lsp/requests/support/rubocop_diagnostic.rb
123
125
  - lib/ruby_lsp/requests/support/rubocop_diagnostics_runner.rb
124
126
  - lib/ruby_lsp/requests/support/rubocop_formatting_runner.rb
@@ -153,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
155
  - !ruby/object:Gem::Version
154
156
  version: '0'
155
157
  requirements: []
156
- rubygems_version: 3.4.20
158
+ rubygems_version: 3.4.21
157
159
  signing_key:
158
160
  specification_version: 4
159
161
  summary: An opinionated language server for Ruby
@@ -1,351 +0,0 @@
1
- # typed: strict
2
- # frozen_string_literal: true
3
-
4
- module RubyLsp
5
- # EventEmitter is an intermediary between our requests and YARP visitors. It's used to visit the document's AST
6
- # and emit events that the requests can listen to for providing functionality. Usages:
7
- #
8
- # - For positional requests, locate the target node and use `emit_for_target` to fire events for each listener
9
- # - For nonpositional requests, use `visit` to go through the AST, which will fire events for each listener as nodes
10
- # are found
11
- #
12
- # # Example
13
- #
14
- # ```ruby
15
- # target_node = document.locate_node(position)
16
- # emitter = EventEmitter.new
17
- # listener = Requests::Hover.new(emitter, @message_queue)
18
- # emitter.emit_for_target(target_node)
19
- # listener.response
20
- # ```
21
- class EventEmitter < YARP::Visitor
22
- extend T::Sig
23
-
24
- sig { void }
25
- def initialize
26
- @listeners = T.let(Hash.new { |h, k| h[k] = [] }, T::Hash[Symbol, T::Array[Listener[T.untyped]]])
27
- super()
28
- end
29
-
30
- sig { params(listener: Listener[T.untyped], events: Symbol).void }
31
- def register(listener, *events)
32
- events.each { |event| T.must(@listeners[event]) << listener }
33
- end
34
-
35
- # Emit events for a specific node. This is similar to the regular `visit` method, but avoids going deeper into the
36
- # tree for performance
37
- sig { params(node: T.nilable(YARP::Node)).void }
38
- def emit_for_target(node)
39
- case node
40
- when YARP::CallNode
41
- @listeners[:on_call]&.each { |l| T.unsafe(l).on_call(node) }
42
- when YARP::ConstantPathNode
43
- @listeners[:on_constant_path]&.each { |l| T.unsafe(l).on_constant_path(node) }
44
- when YARP::StringNode
45
- @listeners[:on_string]&.each { |l| T.unsafe(l).on_string(node) }
46
- when YARP::ClassNode
47
- @listeners[:on_class]&.each { |l| T.unsafe(l).on_class(node) }
48
- when YARP::ModuleNode
49
- @listeners[:on_module]&.each { |l| T.unsafe(l).on_module(node) }
50
- when YARP::ConstantWriteNode
51
- @listeners[:on_constant_write]&.each { |l| T.unsafe(l).on_constant_write(node) }
52
- when YARP::ConstantReadNode
53
- @listeners[:on_constant_read]&.each { |l| T.unsafe(l).on_constant_read(node) }
54
- end
55
- end
56
-
57
- # Visit dispatchers are below. Notice that for nodes that create a new scope (e.g.: classes, modules, method defs)
58
- # we need both an `on_*` and `after_*` event. This is because some requests must know when we exit the scope
59
- sig { override.params(node: T.nilable(YARP::Node)).void }
60
- def visit(node)
61
- @listeners[:on_node]&.each { |l| T.unsafe(l).on_node(node) }
62
- super
63
- end
64
-
65
- sig { params(nodes: T::Array[T.nilable(YARP::Node)]).void }
66
- def visit_all(nodes)
67
- nodes.each { |node| visit(node) }
68
- end
69
-
70
- sig { override.params(node: YARP::ClassNode).void }
71
- def visit_class_node(node)
72
- @listeners[:on_class]&.each { |l| T.unsafe(l).on_class(node) }
73
- super
74
- @listeners[:after_class]&.each { |l| T.unsafe(l).after_class(node) }
75
- end
76
-
77
- sig { override.params(node: YARP::ModuleNode).void }
78
- def visit_module_node(node)
79
- @listeners[:on_module]&.each { |l| T.unsafe(l).on_module(node) }
80
- super
81
- @listeners[:after_module]&.each { |l| T.unsafe(l).after_module(node) }
82
- end
83
-
84
- sig { override.params(node: YARP::CallNode).void }
85
- def visit_call_node(node)
86
- @listeners[:on_call]&.each { |l| T.unsafe(l).on_call(node) }
87
- super
88
- @listeners[:after_call]&.each { |l| T.unsafe(l).after_call(node) }
89
- end
90
-
91
- sig { override.params(node: YARP::InstanceVariableWriteNode).void }
92
- def visit_instance_variable_write_node(node)
93
- @listeners[:on_instance_variable_write]&.each { |l| T.unsafe(l).on_instance_variable_write(node) }
94
- super
95
- end
96
-
97
- sig { override.params(node: YARP::ClassVariableWriteNode).void }
98
- def visit_class_variable_write_node(node)
99
- @listeners[:on_class_variable_write]&.each { |l| T.unsafe(l).on_class_variable_write(node) }
100
- super
101
- end
102
-
103
- sig { override.params(node: YARP::DefNode).void }
104
- def visit_def_node(node)
105
- @listeners[:on_def]&.each { |l| T.unsafe(l).on_def(node) }
106
- super
107
- @listeners[:after_def]&.each { |l| T.unsafe(l).after_def(node) }
108
- end
109
-
110
- sig { override.params(node: YARP::BlockNode).void }
111
- def visit_block_node(node)
112
- @listeners[:on_block]&.each { |l| T.unsafe(l).on_block(node) }
113
- super
114
- @listeners[:after_block]&.each { |l| T.unsafe(l).after_block(node) }
115
- end
116
-
117
- sig { override.params(node: YARP::SelfNode).void }
118
- def visit_self_node(node)
119
- @listeners[:on_self]&.each { |l| T.unsafe(l).on_self(node) }
120
- super
121
- end
122
-
123
- sig { override.params(node: YARP::RescueNode).void }
124
- def visit_rescue_node(node)
125
- @listeners[:on_rescue]&.each { |l| T.unsafe(l).on_rescue(node) }
126
- super
127
- end
128
-
129
- sig { override.params(node: YARP::BlockParameterNode).void }
130
- def visit_block_parameter_node(node)
131
- @listeners[:on_block_parameter]&.each { |l| T.unsafe(l).on_block_parameter(node) }
132
- super
133
- end
134
-
135
- sig { override.params(node: YARP::KeywordParameterNode).void }
136
- def visit_keyword_parameter_node(node)
137
- @listeners[:on_keyword_parameter]&.each { |l| T.unsafe(l).on_keyword_parameter(node) }
138
- super
139
- end
140
-
141
- sig { override.params(node: YARP::KeywordRestParameterNode).void }
142
- def visit_keyword_rest_parameter_node(node)
143
- @listeners[:on_keyword_rest_parameter]&.each { |l| T.unsafe(l).on_keyword_rest_parameter(node) }
144
- super
145
- end
146
-
147
- sig { override.params(node: YARP::OptionalParameterNode).void }
148
- def visit_optional_parameter_node(node)
149
- @listeners[:on_optional_parameter]&.each { |l| T.unsafe(l).on_optional_parameter(node) }
150
- super
151
- end
152
-
153
- sig { override.params(node: YARP::RequiredParameterNode).void }
154
- def visit_required_parameter_node(node)
155
- @listeners[:on_required_parameter]&.each { |l| T.unsafe(l).on_required_parameter(node) }
156
- super
157
- end
158
-
159
- sig { override.params(node: YARP::RestParameterNode).void }
160
- def visit_rest_parameter_node(node)
161
- @listeners[:on_rest_parameter]&.each { |l| T.unsafe(l).on_rest_parameter(node) }
162
- super
163
- end
164
-
165
- sig { override.params(node: YARP::ConstantReadNode).void }
166
- def visit_constant_read_node(node)
167
- @listeners[:on_constant_read]&.each { |l| T.unsafe(l).on_constant_read(node) }
168
- super
169
- end
170
-
171
- sig { override.params(node: YARP::ConstantPathNode).void }
172
- def visit_constant_path_node(node)
173
- @listeners[:on_constant_path]&.each { |l| T.unsafe(l).on_constant_path(node) }
174
- super
175
- end
176
-
177
- sig { override.params(node: YARP::ConstantPathWriteNode).void }
178
- def visit_constant_path_write_node(node)
179
- @listeners[:on_constant_path_write]&.each { |l| T.unsafe(l).on_constant_path_write(node) }
180
- super
181
- end
182
-
183
- sig { override.params(node: YARP::ConstantWriteNode).void }
184
- def visit_constant_write_node(node)
185
- @listeners[:on_constant_write]&.each { |l| T.unsafe(l).on_constant_write(node) }
186
- super
187
- end
188
-
189
- sig { override.params(node: YARP::ConstantAndWriteNode).void }
190
- def visit_constant_and_write_node(node)
191
- @listeners[:on_constant_and_write]&.each { |l| T.unsafe(l).on_constant_and_write(node) }
192
- super
193
- end
194
-
195
- sig { override.params(node: YARP::ConstantOperatorWriteNode).void }
196
- def visit_constant_operator_write_node(node)
197
- @listeners[:on_constant_operator_write]&.each { |l| T.unsafe(l).on_constant_operator_write(node) }
198
- super
199
- end
200
-
201
- sig { override.params(node: YARP::ConstantOrWriteNode).void }
202
- def visit_constant_or_write_node(node)
203
- @listeners[:on_constant_or_write]&.each { |l| T.unsafe(l).on_constant_or_write(node) }
204
- super
205
- end
206
-
207
- sig { override.params(node: YARP::ConstantTargetNode).void }
208
- def visit_constant_target_node(node)
209
- @listeners[:on_constant_target]&.each { |l| T.unsafe(l).on_constant_target(node) }
210
- super
211
- end
212
-
213
- sig { override.params(node: YARP::LocalVariableWriteNode).void }
214
- def visit_local_variable_write_node(node)
215
- @listeners[:on_local_variable_write]&.each { |l| T.unsafe(l).on_local_variable_write(node) }
216
- super
217
- end
218
-
219
- sig { override.params(node: YARP::LocalVariableReadNode).void }
220
- def visit_local_variable_read_node(node)
221
- @listeners[:on_local_variable_read]&.each { |l| T.unsafe(l).on_local_variable_read(node) }
222
- super
223
- end
224
-
225
- sig { override.params(node: YARP::LocalVariableAndWriteNode).void }
226
- def visit_local_variable_and_write_node(node)
227
- @listeners[:on_local_variable_and_write]&.each { |l| T.unsafe(l).on_local_variable_and_write(node) }
228
- super
229
- end
230
-
231
- sig { override.params(node: YARP::LocalVariableOperatorWriteNode).void }
232
- def visit_local_variable_operator_write_node(node)
233
- @listeners[:on_local_variable_operator_write]&.each { |l| T.unsafe(l).on_local_variable_operator_write(node) }
234
- super
235
- end
236
-
237
- sig { override.params(node: YARP::LocalVariableOrWriteNode).void }
238
- def visit_local_variable_or_write_node(node)
239
- @listeners[:on_local_variable_or_write]&.each { |l| T.unsafe(l).on_local_variable_or_write(node) }
240
- super
241
- end
242
-
243
- sig { override.params(node: YARP::LocalVariableTargetNode).void }
244
- def visit_local_variable_target_node(node)
245
- @listeners[:on_local_variable_target]&.each { |l| T.unsafe(l).on_local_variable_target(node) }
246
- super
247
- end
248
-
249
- sig { override.params(node: YARP::BlockLocalVariableNode).void }
250
- def visit_block_local_variable_node(node)
251
- @listeners[:on_block_local_variable]&.each { |l| T.unsafe(l).on_block_local_variable(node) }
252
- super
253
- end
254
-
255
- sig { override.params(node: YARP::IfNode).void }
256
- def visit_if_node(node)
257
- @listeners[:on_if]&.each { |l| T.unsafe(l).on_if(node) }
258
- super
259
- end
260
-
261
- sig { override.params(node: YARP::InNode).void }
262
- def visit_in_node(node)
263
- @listeners[:on_in]&.each { |l| T.unsafe(l).on_in(node) }
264
- super
265
- end
266
-
267
- sig { override.params(node: YARP::WhenNode).void }
268
- def visit_when_node(node)
269
- @listeners[:on_when]&.each { |l| T.unsafe(l).on_when(node) }
270
- super
271
- end
272
-
273
- sig { override.params(node: YARP::InterpolatedStringNode).void }
274
- def visit_interpolated_string_node(node)
275
- @listeners[:on_interpolated_string]&.each { |l| T.unsafe(l).on_interpolated_string(node) }
276
- super
277
- end
278
-
279
- sig { override.params(node: YARP::ArrayNode).void }
280
- def visit_array_node(node)
281
- @listeners[:on_array]&.each { |l| T.unsafe(l).on_array(node) }
282
- super
283
- end
284
-
285
- sig { override.params(node: YARP::CaseNode).void }
286
- def visit_case_node(node)
287
- @listeners[:on_case]&.each { |l| T.unsafe(l).on_case(node) }
288
- super
289
- end
290
-
291
- sig { override.params(node: YARP::ForNode).void }
292
- def visit_for_node(node)
293
- @listeners[:on_for]&.each { |l| T.unsafe(l).on_for(node) }
294
- super
295
- end
296
-
297
- sig { override.params(node: YARP::HashNode).void }
298
- def visit_hash_node(node)
299
- @listeners[:on_hash]&.each { |l| T.unsafe(l).on_hash(node) }
300
- super
301
- end
302
-
303
- sig { override.params(node: YARP::SingletonClassNode).void }
304
- def visit_singleton_class_node(node)
305
- @listeners[:on_singleton_class]&.each { |l| T.unsafe(l).on_singleton_class(node) }
306
- super
307
- end
308
-
309
- sig { override.params(node: YARP::UnlessNode).void }
310
- def visit_unless_node(node)
311
- @listeners[:on_unless]&.each { |l| T.unsafe(l).on_unless(node) }
312
- super
313
- end
314
-
315
- sig { override.params(node: YARP::UntilNode).void }
316
- def visit_until_node(node)
317
- @listeners[:on_until]&.each { |l| T.unsafe(l).on_until(node) }
318
- super
319
- end
320
-
321
- sig { override.params(node: YARP::WhileNode).void }
322
- def visit_while_node(node)
323
- @listeners[:on_while]&.each { |l| T.unsafe(l).on_while(node) }
324
- super
325
- end
326
-
327
- sig { override.params(node: YARP::ElseNode).void }
328
- def visit_else_node(node)
329
- @listeners[:on_else]&.each { |l| T.unsafe(l).on_else(node) }
330
- super
331
- end
332
-
333
- sig { override.params(node: YARP::EnsureNode).void }
334
- def visit_ensure_node(node)
335
- @listeners[:on_ensure]&.each { |l| T.unsafe(l).on_ensure(node) }
336
- super
337
- end
338
-
339
- sig { override.params(node: YARP::BeginNode).void }
340
- def visit_begin_node(node)
341
- @listeners[:on_begin]&.each { |l| T.unsafe(l).on_begin(node) }
342
- super
343
- end
344
-
345
- sig { override.params(node: YARP::StringConcatNode).void }
346
- def visit_string_concat_node(node)
347
- @listeners[:on_string_concat]&.each { |l| T.unsafe(l).on_string_concat(node) }
348
- super
349
- end
350
- end
351
- end