@@ -13,35 +13,6 @@ module PrintableSymbol
1313 def accept_printer ( printer ) = raise NotImplementedError , "Abstract method called"
1414 end
1515
16- class Hover < T ::Struct
17- include PrintableSymbol
18-
19- const :contents , String
20- const :range , T . nilable ( Range )
21-
22- class << self
23- #: (Hash[untyped, untyped] json) -> Hover
24- def from_json ( json )
25- Hover . new (
26- contents : json [ "contents" ] [ "value" ] ,
27- range : json [ "range" ] ? Range . from_json ( json [ "range" ] ) : nil ,
28- )
29- end
30- end
31-
32- # @override
33- #: (SymbolPrinter printer) -> void
34- def accept_printer ( printer )
35- printer . print ( "#{ contents } \n " )
36- printer . print_object ( range ) if range
37- end
38-
39- #: -> String
40- def to_s
41- "#{ contents } (#{ range } )."
42- end
43- end
44-
4516 class Position < T ::Struct
4617 include PrintableSymbol
4718
@@ -100,6 +71,35 @@ def to_s
10071 end
10172 end
10273
74+ class Hover < T ::Struct
75+ include PrintableSymbol
76+
77+ const :contents , String
78+ const :range , T . nilable ( Range )
79+
80+ class << self
81+ #: (Hash[untyped, untyped] json) -> Hover
82+ def from_json ( json )
83+ Hover . new (
84+ contents : json [ "contents" ] [ "value" ] ,
85+ range : json [ "range" ] ? Range . from_json ( json [ "range" ] ) : nil ,
86+ )
87+ end
88+ end
89+
90+ # @override
91+ #: (SymbolPrinter printer) -> void
92+ def accept_printer ( printer )
93+ printer . print ( "#{ contents } \n " )
94+ printer . print_object ( range ) if range
95+ end
96+
97+ #: -> String
98+ def to_s
99+ "#{ contents } (#{ range } )."
100+ end
101+ end
102+
103103 class Location < T ::Struct
104104 include PrintableSymbol
105105
0 commit comments