Debian Codegraph @

sig/prism/parse_result/comments.rbs

raw
1 module Prism
2 class ParseResult < Result
3 class Comments
4 interface _Target
5 def start_offset: () -> Integer
6 def end_offset: () -> Integer
7 def encloses?: (comment) -> bool
8 def leading_comment: (comment) -> void
9 def trailing_comment: (comment) -> void
10 end
11
12 class NodeTarget
13 include _Target
14
15 attr_reader node: node
16
17 def initialize: (node) -> void
18 end
19
20 class LocationTarget
21 include _Target
22
23 attr_reader location: Location
24
25 def initialize: (Location location) -> void
26 end
27
28 attr_reader parse_result: ParseResult
29
30 def initialize: (ParseResult parse_result) -> void
31 def attach!: () -> void
32
33 private
34
35 def nearest_targets: (node, comment) -> [_Target?, _Target, _Target?]
36 end
37 end
38 end