prism 0.17.0 → 0.17.1

Sign up to get free protection for your applications and to get access to all the features.
data/rbi/prism_static.rbi CHANGED
@@ -1,196 +1,192 @@
1
- # typed: true
1
+ class Prism::ParseResult
2
+ sig { returns(Prism::ProgramNode) }
3
+ def value; end
2
4
 
3
- module Prism
4
- class ParseResult
5
- sig { returns(ProgramNode) }
6
- def value; end
5
+ sig { returns(T::Array[Prism::Comment]) }
6
+ def comments; end
7
7
 
8
- sig { returns(T::Array[Comment]) }
9
- def comments; end
8
+ sig { returns(T::Array[Prism::ParseError]) }
9
+ def errors; end
10
10
 
11
- sig { returns(T::Array[ParseError]) }
12
- def errors; end
11
+ sig { returns(T::Array[Prism::ParseWarning]) }
12
+ def warnings; end
13
13
 
14
- sig { returns(T::Array[ParseWarning]) }
15
- def warnings; end
16
-
17
- sig { returns(Source) }
18
- def source; end
19
- end
14
+ sig { returns(Prism::Source) }
15
+ def source; end
16
+ end
20
17
 
21
- class ParseError
22
- sig { returns(String) }
23
- def message; end
18
+ class Prism::ParseError
19
+ sig { returns(String) }
20
+ def message; end
24
21
 
25
- sig { returns(Location) }
26
- def location; end
27
- end
22
+ sig { returns(Prism::Location) }
23
+ def location; end
24
+ end
28
25
 
29
- class ParseWarning
30
- sig { returns(String) }
31
- def message; end
26
+ class Prism::ParseWarning
27
+ sig { returns(String) }
28
+ def message; end
32
29
 
33
- sig { returns(Location) }
34
- def location; end
35
- end
30
+ sig { returns(Prism::Location) }
31
+ def location; end
32
+ end
36
33
 
37
- class Node
38
- sig { returns(T::Array[T.nilable(Node)]) }
39
- def child_nodes; end
34
+ class Prism::Node
35
+ sig { returns(T::Array[T.nilable(Prism::Node)]) }
36
+ def child_nodes; end
40
37
 
41
- sig { returns(Location) }
42
- def location; end
38
+ sig { returns(Prism::Location) }
39
+ def location; end
43
40
 
44
- sig { returns(String) }
45
- def slice; end
46
- end
41
+ sig { returns(String) }
42
+ def slice; end
43
+ end
47
44
 
48
- class Comment
49
- sig { returns(Location) }
50
- def location; end
45
+ class Prism::Comment
46
+ sig { returns(Prism::Location) }
47
+ def location; end
51
48
 
52
- sig { returns(T::Boolean) }
53
- def trailing?; end
54
- end
49
+ sig { returns(T::Boolean) }
50
+ def trailing?; end
51
+ end
55
52
 
56
- class InlineComment < Comment
57
- sig { override.returns(T::Boolean) }
58
- def trailing?; end
59
- end
53
+ class Prism::InlineComment < Prism::Comment
54
+ sig { override.returns(T::Boolean) }
55
+ def trailing?; end
56
+ end
60
57
 
61
- class EmbDocComment < Comment
62
- end
58
+ class Prism::EmbDocComment < Prism::Comment
59
+ end
63
60
 
64
- class DATAComment < Comment
65
- end
61
+ class Prism::DATAComment < Prism::Comment
62
+ end
66
63
 
67
- class Location
68
- sig { params(source: Source, start_offset: Integer, length: Integer).void }
69
- def initialize(source, start_offset, length); end
64
+ class Prism::Location
65
+ sig { params(source: Prism::Source, start_offset: Integer, length: Integer).void }
66
+ def initialize(source, start_offset, length); end
70
67
 
71
- sig { returns(String) }
72
- def slice; end
68
+ sig { returns(String) }
69
+ def slice; end
73
70
 
74
- sig { returns(T::Array[Comment]) }
75
- def comments; end
71
+ sig { returns(T::Array[Prism::Comment]) }
72
+ def comments; end
76
73
 
77
- sig { params(options: T.untyped).returns(Location) }
78
- def copy(**options); end
74
+ sig { params(options: T.untyped).returns(Prism::Location) }
75
+ def copy(**options); end
79
76
 
80
- sig { returns(Integer) }
81
- def start_offset; end
77
+ sig { returns(Integer) }
78
+ def start_offset; end
82
79
 
83
- sig { returns(Integer) }
84
- def end_offset; end
80
+ sig { returns(Integer) }
81
+ def end_offset; end
85
82
 
86
- sig { returns(Integer) }
87
- def start_line; end
83
+ sig { returns(Integer) }
84
+ def start_line; end
88
85
 
89
- sig { returns(Integer) }
90
- def end_line; end
86
+ sig { returns(Integer) }
87
+ def end_line; end
91
88
 
92
- sig { returns(Integer) }
93
- def start_column; end
89
+ sig { returns(Integer) }
90
+ def start_column; end
94
91
 
95
- sig { returns(Integer) }
96
- def end_column; end
97
- end
92
+ sig { returns(Integer) }
93
+ def end_column; end
94
+ end
98
95
 
99
- class Source
100
- sig { params(source: String, start_line: Integer, offsets: T::Array[Integer]).void }
101
- def initialize(source, start_line, offsets); end
96
+ class Prism::Source
97
+ sig { params(source: String, start_line: Integer, offsets: T::Array[Integer]).void }
98
+ def initialize(source, start_line, offsets); end
102
99
 
103
- sig { params(offset: Integer, length: Integer).returns(String) }
104
- def slice(offset, length); end
100
+ sig { params(offset: Integer, length: Integer).returns(String) }
101
+ def slice(offset, length); end
105
102
 
106
- sig { params(value: Integer).returns(Integer) }
107
- def line(value); end
103
+ sig { params(value: Integer).returns(Integer) }
104
+ def line(value); end
108
105
 
109
- sig { params(value: Integer).returns(Integer) }
110
- def line_offset(value); end
106
+ sig { params(value: Integer).returns(Integer) }
107
+ def line_offset(value); end
111
108
 
112
- sig { params(value: Integer).returns(Integer) }
113
- def column(value); end
109
+ sig { params(value: Integer).returns(Integer) }
110
+ def column(value); end
114
111
 
115
- sig { returns(String) }
116
- def source; end
112
+ sig { returns(String) }
113
+ def source; end
117
114
 
118
- sig { returns(T::Array[Integer]) }
119
- def offsets; end
120
- end
115
+ sig { returns(T::Array[Integer]) }
116
+ def offsets; end
117
+ end
121
118
 
122
- class Token
123
- sig { params(type: T.untyped, value: String, location: Location).void }
124
- def initialize(type, value, location); end
119
+ class Prism::Token
120
+ sig { params(type: T.untyped, value: String, location: Prism::Location).void }
121
+ def initialize(type, value, location); end
125
122
 
126
- sig { params(keys: T.untyped).returns(T.untyped) }
127
- def deconstruct_keys(keys); end
123
+ sig { params(keys: T.untyped).returns(T.untyped) }
124
+ def deconstruct_keys(keys); end
128
125
 
129
- sig { params(q: T.untyped).returns(T.untyped) }
130
- def pretty_print(q); end
126
+ sig { params(q: T.untyped).returns(T.untyped) }
127
+ def pretty_print(q); end
131
128
 
132
- sig { params(other: T.untyped).returns(T::Boolean) }
133
- def ==(other); end
129
+ sig { params(other: T.untyped).returns(T::Boolean) }
130
+ def ==(other); end
134
131
 
135
- sig { returns(T.untyped) }
136
- def type; end
132
+ sig { returns(T.untyped) }
133
+ def type; end
137
134
 
138
- sig { returns(String) }
139
- def value; end
135
+ sig { returns(String) }
136
+ def value; end
140
137
 
141
- sig { returns(Location) }
142
- def location; end
143
- end
138
+ sig { returns(Prism::Location) }
139
+ def location; end
140
+ end
144
141
 
145
- class NodeInspector
146
- sig { params(prefix: String).void }
147
- def initialize(prefix); end
142
+ class Prism::NodeInspector
143
+ sig { params(prefix: String).void }
144
+ def initialize(prefix); end
148
145
 
149
- sig { returns(String) }
150
- def prefix; end
146
+ sig { returns(String) }
147
+ def prefix; end
151
148
 
152
- sig { returns(String) }
153
- def output; end
149
+ sig { returns(String) }
150
+ def output; end
154
151
 
155
- # Appends a line to the output with the current prefix.
156
- sig { params(line: String).void }
157
- def <<(line); end
152
+ # Appends a line to the output with the current prefix.
153
+ sig { params(line: String).void }
154
+ def <<(line); end
158
155
 
159
- # This generates a string that is used as the header of the inspect output
160
- # for any given node.
161
- sig { params(node: Node).returns(String) }
162
- def header(node); end
156
+ # This generates a string that is used as the header of the inspect output
157
+ # for any given node.
158
+ sig { params(node: Prism::Node).returns(String) }
159
+ def header(node); end
163
160
 
164
- # Generates a string that represents a list of nodes. It handles properly
165
- # using the box drawing characters to make the output look nice.
166
- sig { params(prefix: String, nodes: T::Array[Node]).returns(String) }
167
- def list(prefix, nodes); end
161
+ # Generates a string that represents a list of nodes. It handles properly
162
+ # using the box drawing characters to make the output look nice.
163
+ sig { params(prefix: String, nodes: T::Array[Prism::Node]).returns(String) }
164
+ def list(prefix, nodes); end
168
165
 
169
- # Generates a string that represents a location field on a node.
170
- sig { params(value: Location).returns(String) }
171
- def location(value); end
166
+ # Generates a string that represents a location field on a node.
167
+ sig { params(value: Prism::Location).returns(String) }
168
+ def location(value); end
172
169
 
173
- # Generates a string that represents a child node.
174
- sig { params(node: Node, append: String).returns(String) }
175
- def child_node(node, append); end
170
+ # Generates a string that represents a child node.
171
+ sig { params(node: Prism::Node, append: String).returns(String) }
172
+ def child_node(node, append); end
176
173
 
177
- # Returns a new inspector that can be used to inspect a child node.
178
- sig { params(append: String).returns(NodeInspector) }
179
- def child_inspector(append); end
174
+ # Returns a new inspector that can be used to inspect a child node.
175
+ sig { params(append: String).returns(Prism::NodeInspector) }
176
+ def child_inspector(append); end
180
177
 
181
- # Returns the output as a string.
182
- sig { returns(String) }
183
- def to_str; end
184
- end
178
+ # Returns the output as a string.
179
+ sig { returns(String) }
180
+ def to_str; end
181
+ end
185
182
 
186
- class BasicVisitor
187
- sig { params(node: T.nilable(Node)).void }
188
- def visit(node); end
183
+ class Prism::BasicVisitor
184
+ sig { params(node: T.nilable(Prism::Node)).void }
185
+ def visit(node); end
189
186
 
190
- sig { params(nodes: T::Array[T.nilable(Node)]).void }
191
- def visit_all(nodes); end
187
+ sig { params(nodes: T::Array[T.nilable(Prism::Node)]).void }
188
+ def visit_all(nodes); end
192
189
 
193
- sig { params(node: Node).void }
194
- def visit_child_nodes(node); end
195
- end
190
+ sig { params(node: Prism::Node).void }
191
+ def visit_child_nodes(node); end
196
192
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prism
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify