prism 1.7.0 → 1.9.0
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 +31 -1
- data/Makefile +7 -1
- data/config.yml +4 -4
- data/docs/releasing.md +2 -4
- data/docs/ripper_translation.md +8 -17
- data/docs/ruby_api.md +1 -0
- data/ext/prism/extension.h +1 -1
- data/include/prism/ast.h +4 -4
- data/include/prism/version.h +2 -2
- data/lib/prism/compiler.rb +152 -152
- data/lib/prism/lex_compat.rb +133 -150
- data/lib/prism/node.rb +1131 -20
- data/lib/prism/parse_result.rb +9 -0
- data/lib/prism/serialize.rb +1 -1
- data/lib/prism/translation/parser_current.rb +1 -1
- data/lib/prism/translation/parser_versions.rb +36 -0
- data/lib/prism/translation/ripper/filter.rb +53 -0
- data/lib/prism/translation/ripper/lexer.rb +135 -0
- data/lib/prism/translation/ripper.rb +84 -38
- data/lib/prism/translation/ruby_parser.rb +1 -1
- data/lib/prism/translation.rb +5 -5
- data/lib/prism/visitor.rb +152 -152
- data/lib/prism.rb +1 -14
- data/prism.gemspec +5 -11
- data/rbi/prism/node.rbi +3 -0
- data/rbi/prism/translation/parser_versions.rbi +23 -0
- data/rbi/prism.rbi +0 -3
- data/sig/prism/node.rbs +4 -0
- data/sig/prism/parse_result.rbs +1 -0
- data/sig/prism.rbs +54 -40
- data/src/prism.c +48 -27
- metadata +5 -11
- data/lib/prism/translation/parser33.rb +0 -13
- data/lib/prism/translation/parser34.rb +0 -13
- data/lib/prism/translation/parser35.rb +0 -8
- data/lib/prism/translation/parser40.rb +0 -13
- data/lib/prism/translation/parser41.rb +0 -13
- data/rbi/prism/translation/parser33.rbi +0 -6
- data/rbi/prism/translation/parser34.rbi +0 -6
- data/rbi/prism/translation/parser35.rbi +0 -4
- data/rbi/prism/translation/parser40.rbi +0 -6
- data/rbi/prism/translation/parser41.rbi +0 -6
data/lib/prism.rb
CHANGED
|
@@ -20,7 +20,6 @@ module Prism
|
|
|
20
20
|
autoload :DSL, "prism/dsl"
|
|
21
21
|
autoload :InspectVisitor, "prism/inspect_visitor"
|
|
22
22
|
autoload :LexCompat, "prism/lex_compat"
|
|
23
|
-
autoload :LexRipper, "prism/lex_compat"
|
|
24
23
|
autoload :MutationCompiler, "prism/mutation_compiler"
|
|
25
24
|
autoload :Pack, "prism/pack"
|
|
26
25
|
autoload :Pattern, "prism/pattern"
|
|
@@ -35,7 +34,6 @@ module Prism
|
|
|
35
34
|
# private here.
|
|
36
35
|
|
|
37
36
|
private_constant :LexCompat
|
|
38
|
-
private_constant :LexRipper
|
|
39
37
|
|
|
40
38
|
# Raised when requested to parse as the currently running Ruby version but Prism has no support for it.
|
|
41
39
|
class CurrentVersionError < ArgumentError
|
|
@@ -61,24 +59,13 @@ module Prism
|
|
|
61
59
|
# Prism::lex_compat(source, **options) -> LexCompat::Result
|
|
62
60
|
#
|
|
63
61
|
# Returns a parse result whose value is an array of tokens that closely
|
|
64
|
-
# resembles the return value of Ripper::lex.
|
|
65
|
-
# `:on_sp` token is not emitted.
|
|
62
|
+
# resembles the return value of Ripper::lex.
|
|
66
63
|
#
|
|
67
64
|
# For supported options, see Prism::parse.
|
|
68
65
|
def self.lex_compat(source, **options)
|
|
69
66
|
LexCompat.new(source, **options).result # steep:ignore
|
|
70
67
|
end
|
|
71
68
|
|
|
72
|
-
# :call-seq:
|
|
73
|
-
# Prism::lex_ripper(source) -> Array
|
|
74
|
-
#
|
|
75
|
-
# This lexes with the Ripper lex. It drops any space events but otherwise
|
|
76
|
-
# returns the same tokens. Raises SyntaxError if the syntax in source is
|
|
77
|
-
# invalid.
|
|
78
|
-
def self.lex_ripper(source)
|
|
79
|
-
LexRipper.new(source).result # steep:ignore
|
|
80
|
-
end
|
|
81
|
-
|
|
82
69
|
# :call-seq:
|
|
83
70
|
# Prism::load(source, serialized, freeze) -> ParseResult
|
|
84
71
|
#
|
data/prism.gemspec
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |spec|
|
|
4
4
|
spec.name = "prism"
|
|
5
|
-
spec.version = "1.
|
|
5
|
+
spec.version = "1.9.0"
|
|
6
6
|
spec.authors = ["Shopify"]
|
|
7
7
|
spec.email = ["ruby@shopify.com"]
|
|
8
8
|
|
|
@@ -98,15 +98,13 @@ Gem::Specification.new do |spec|
|
|
|
98
98
|
"lib/prism/translation.rb",
|
|
99
99
|
"lib/prism/translation/parser.rb",
|
|
100
100
|
"lib/prism/translation/parser_current.rb",
|
|
101
|
-
"lib/prism/translation/
|
|
102
|
-
"lib/prism/translation/parser34.rb",
|
|
103
|
-
"lib/prism/translation/parser35.rb",
|
|
104
|
-
"lib/prism/translation/parser40.rb",
|
|
105
|
-
"lib/prism/translation/parser41.rb",
|
|
101
|
+
"lib/prism/translation/parser_versions.rb",
|
|
106
102
|
"lib/prism/translation/parser/builder.rb",
|
|
107
103
|
"lib/prism/translation/parser/compiler.rb",
|
|
108
104
|
"lib/prism/translation/parser/lexer.rb",
|
|
109
105
|
"lib/prism/translation/ripper.rb",
|
|
106
|
+
"lib/prism/translation/ripper/filter.rb",
|
|
107
|
+
"lib/prism/translation/ripper/lexer.rb",
|
|
110
108
|
"lib/prism/translation/ripper/sexp.rb",
|
|
111
109
|
"lib/prism/translation/ripper/shim.rb",
|
|
112
110
|
"lib/prism/translation/ruby_parser.rb",
|
|
@@ -122,11 +120,7 @@ Gem::Specification.new do |spec|
|
|
|
122
120
|
"rbi/prism/reflection.rbi",
|
|
123
121
|
"rbi/prism/string_query.rbi",
|
|
124
122
|
"rbi/prism/translation/parser.rbi",
|
|
125
|
-
"rbi/prism/translation/
|
|
126
|
-
"rbi/prism/translation/parser34.rbi",
|
|
127
|
-
"rbi/prism/translation/parser35.rbi",
|
|
128
|
-
"rbi/prism/translation/parser40.rbi",
|
|
129
|
-
"rbi/prism/translation/parser41.rbi",
|
|
123
|
+
"rbi/prism/translation/parser_versions.rbi",
|
|
130
124
|
"rbi/prism/translation/ripper.rbi",
|
|
131
125
|
"rbi/prism/visitor.rbi",
|
|
132
126
|
"sig/prism.rbs",
|
data/rbi/prism/node.rbi
CHANGED
|
@@ -57,6 +57,9 @@ class Prism::Node
|
|
|
57
57
|
sig { params(block: T.proc.params(node: Prism::Node).returns(T::Boolean)).returns(T.nilable(Prism::Node)) }
|
|
58
58
|
def breadth_first_search(&block); end
|
|
59
59
|
|
|
60
|
+
sig { params(block: T.proc.params(node: Prism::Node).returns(T::Boolean)).returns(T::Array[Prism::Node]) }
|
|
61
|
+
def breadth_first_search_all(&block); end
|
|
62
|
+
|
|
60
63
|
sig { abstract.params(visitor: Prism::Visitor).returns(T.untyped) }
|
|
61
64
|
def accept(visitor); end
|
|
62
65
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# typed: strict
|
|
2
|
+
|
|
3
|
+
class Prism::Translation::Parser33 < Prism::Translation::Parser
|
|
4
|
+
sig { override.returns(Integer) }
|
|
5
|
+
def version; end
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
class Prism::Translation::Parser34 < Prism::Translation::Parser
|
|
9
|
+
sig { override.returns(Integer) }
|
|
10
|
+
def version; end
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
class Prism::Translation::Parser40 < Prism::Translation::Parser
|
|
14
|
+
sig { override.returns(Integer) }
|
|
15
|
+
def version; end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
Prism::Translation::Parser35 = Prism::Translation::Parser40
|
|
19
|
+
|
|
20
|
+
class Prism::Translation::Parser40 < Prism::Translation::Parser
|
|
21
|
+
sig { override.returns(Integer) }
|
|
22
|
+
def version; end
|
|
23
|
+
end
|
data/rbi/prism.rbi
CHANGED
|
@@ -16,9 +16,6 @@ module Prism
|
|
|
16
16
|
sig { params(source: String, options: T::Hash[Symbol, T.untyped]).returns(Prism::LexCompat::Result) }
|
|
17
17
|
def self.lex_compat(source, **options); end
|
|
18
18
|
|
|
19
|
-
sig { params(source: String).returns(T::Array[T.untyped]) }
|
|
20
|
-
def self.lex_ripper(source); end
|
|
21
|
-
|
|
22
19
|
sig { params(source: String, serialized: String, freeze: T.nilable(T::Boolean)).returns(Prism::ParseResult) }
|
|
23
20
|
def self.load(source, serialized, freeze = false); end
|
|
24
21
|
|
data/sig/prism/node.rbs
CHANGED
|
@@ -16,6 +16,7 @@ module Prism
|
|
|
16
16
|
def child_nodes: () -> Array[Prism::node?]
|
|
17
17
|
def comment_targets: () -> Array[Prism::node | Location]
|
|
18
18
|
def compact_child_nodes: () -> Array[Prism::node]
|
|
19
|
+
def each_child_node: () { (Prism::node) -> void } -> void | () -> Enumerator[Prism::node]
|
|
19
20
|
def self.fields: () -> Array[Prism::Reflection::Field]
|
|
20
21
|
def type: () -> Symbol
|
|
21
22
|
def self.type: () -> Symbol
|
|
@@ -28,6 +29,9 @@ module Prism
|
|
|
28
29
|
def to_dot: () -> String
|
|
29
30
|
def tunnel: (Integer line, Integer column) -> Array[Prism::node]
|
|
30
31
|
def breadth_first_search: () { (Prism::node) -> bool } -> Prism::node?
|
|
32
|
+
alias find breadth_first_search
|
|
33
|
+
def breadth_first_search_all: () { (Prism::node) -> bool } -> Array[Prism::node]
|
|
34
|
+
alias find_all breadth_first_search_all
|
|
31
35
|
def newline!: (Array[untyped]) -> void
|
|
32
36
|
|
|
33
37
|
def save: (_Repository repository) -> void
|
data/sig/prism/parse_result.rbs
CHANGED
|
@@ -14,6 +14,7 @@ module Prism
|
|
|
14
14
|
def encoding: () -> Encoding
|
|
15
15
|
def lines: () -> Array[String]
|
|
16
16
|
def slice: (Integer byte_offset, Integer length) -> String
|
|
17
|
+
def byte_offset: (Integer line, Integer column) -> Integer
|
|
17
18
|
def line: (Integer byte_offset) -> Integer
|
|
18
19
|
def line_start: (Integer byte_offset) -> Integer
|
|
19
20
|
def line_end: (Integer byte_offset) -> Integer
|
data/sig/prism.rbs
CHANGED
|
@@ -14,119 +14,128 @@ module Prism
|
|
|
14
14
|
|
|
15
15
|
def self.parse: (
|
|
16
16
|
String source,
|
|
17
|
+
?command_line: String,
|
|
17
18
|
?encoding: Encoding | false,
|
|
18
19
|
?filepath: String,
|
|
19
20
|
?freeze: bool,
|
|
20
21
|
?frozen_string_literal: bool,
|
|
21
22
|
?line: Integer,
|
|
22
23
|
?main_script: bool,
|
|
23
|
-
?
|
|
24
|
+
?partial_script: bool,
|
|
24
25
|
?scopes: Array[Array[Symbol]],
|
|
25
|
-
?
|
|
26
|
+
?version: String
|
|
26
27
|
) -> ParseResult
|
|
27
28
|
|
|
28
29
|
def self.profile: (
|
|
29
30
|
String source,
|
|
31
|
+
?command_line: String,
|
|
30
32
|
?encoding: Encoding | false,
|
|
31
33
|
?filepath: String,
|
|
32
34
|
?freeze: bool,
|
|
33
35
|
?frozen_string_literal: bool,
|
|
34
36
|
?line: Integer,
|
|
35
37
|
?main_script: bool,
|
|
36
|
-
?
|
|
38
|
+
?partial_script: bool,
|
|
37
39
|
?scopes: Array[Array[Symbol]],
|
|
38
|
-
?
|
|
40
|
+
?version: String
|
|
39
41
|
) -> nil
|
|
40
42
|
|
|
41
43
|
def self.lex: (
|
|
42
44
|
String source,
|
|
45
|
+
?command_line: String,
|
|
43
46
|
?encoding: Encoding | false,
|
|
44
47
|
?filepath: String,
|
|
45
48
|
?freeze: bool,
|
|
46
49
|
?frozen_string_literal: bool,
|
|
47
50
|
?line: Integer,
|
|
48
51
|
?main_script: bool,
|
|
49
|
-
?
|
|
52
|
+
?partial_script: bool,
|
|
50
53
|
?scopes: Array[Array[Symbol]],
|
|
51
|
-
?
|
|
54
|
+
?version: String
|
|
52
55
|
) -> LexResult
|
|
53
56
|
|
|
54
57
|
def self.lex_compat: (
|
|
55
58
|
String source,
|
|
59
|
+
?command_line: String,
|
|
56
60
|
?encoding: Encoding | false,
|
|
57
61
|
?filepath: String,
|
|
58
62
|
?freeze: bool,
|
|
59
63
|
?frozen_string_literal: bool,
|
|
60
64
|
?line: Integer,
|
|
61
65
|
?main_script: bool,
|
|
62
|
-
?
|
|
66
|
+
?partial_script: bool,
|
|
63
67
|
?scopes: Array[Array[Symbol]],
|
|
64
|
-
?
|
|
68
|
+
?version: String
|
|
65
69
|
) -> LexCompat::Result
|
|
66
70
|
|
|
67
71
|
def self.parse_lex: (
|
|
68
72
|
String source,
|
|
73
|
+
?command_line: String,
|
|
69
74
|
?encoding: Encoding | false,
|
|
70
75
|
?filepath: String,
|
|
71
76
|
?freeze: bool,
|
|
72
77
|
?frozen_string_literal: bool,
|
|
73
78
|
?line: Integer,
|
|
74
79
|
?main_script: bool,
|
|
75
|
-
?
|
|
80
|
+
?partial_script: bool,
|
|
76
81
|
?scopes: Array[Array[Symbol]],
|
|
77
|
-
?
|
|
82
|
+
?version: String
|
|
78
83
|
) -> ParseLexResult
|
|
79
84
|
|
|
80
85
|
def self.dump: (
|
|
81
86
|
String source,
|
|
87
|
+
?command_line: String,
|
|
82
88
|
?encoding: Encoding | false,
|
|
83
89
|
?filepath: String,
|
|
84
90
|
?freeze: bool,
|
|
85
91
|
?frozen_string_literal: bool,
|
|
86
92
|
?line: Integer,
|
|
87
93
|
?main_script: bool,
|
|
88
|
-
?
|
|
94
|
+
?partial_script: bool,
|
|
89
95
|
?scopes: Array[Array[Symbol]],
|
|
90
|
-
?
|
|
96
|
+
?version: String
|
|
91
97
|
) -> String
|
|
92
98
|
|
|
93
99
|
def self.parse_comments: (
|
|
94
100
|
String source,
|
|
101
|
+
?command_line: String,
|
|
95
102
|
?encoding: Encoding | false,
|
|
96
103
|
?filepath: String,
|
|
97
104
|
?freeze: bool,
|
|
98
105
|
?frozen_string_literal: bool,
|
|
99
106
|
?line: Integer,
|
|
100
107
|
?main_script: bool,
|
|
101
|
-
?
|
|
108
|
+
?partial_script: bool,
|
|
102
109
|
?scopes: Array[Array[Symbol]],
|
|
103
|
-
?
|
|
110
|
+
?version: String
|
|
104
111
|
) -> Array[comment]
|
|
105
112
|
|
|
106
113
|
def self.parse_success?: (
|
|
107
114
|
String source,
|
|
115
|
+
?command_line: String,
|
|
108
116
|
?encoding: Encoding | false,
|
|
109
117
|
?filepath: String,
|
|
110
118
|
?freeze: bool,
|
|
111
119
|
?frozen_string_literal: bool,
|
|
112
120
|
?line: Integer,
|
|
113
121
|
?main_script: bool,
|
|
114
|
-
?
|
|
122
|
+
?partial_script: bool,
|
|
115
123
|
?scopes: Array[Array[Symbol]],
|
|
116
|
-
?
|
|
124
|
+
?version: String
|
|
117
125
|
) -> bool
|
|
118
126
|
|
|
119
127
|
def self.parse_failure?: (
|
|
120
128
|
String source,
|
|
129
|
+
?command_line: String,
|
|
121
130
|
?encoding: Encoding | false,
|
|
122
131
|
?filepath: String,
|
|
123
132
|
?freeze: bool,
|
|
124
133
|
?frozen_string_literal: bool,
|
|
125
134
|
?line: Integer,
|
|
126
135
|
?main_script: bool,
|
|
127
|
-
?
|
|
136
|
+
?partial_script: bool,
|
|
128
137
|
?scopes: Array[Array[Symbol]],
|
|
129
|
-
?
|
|
138
|
+
?version: String
|
|
130
139
|
) -> bool
|
|
131
140
|
|
|
132
141
|
def self.load: (
|
|
@@ -135,106 +144,110 @@ module Prism
|
|
|
135
144
|
?bool freeze
|
|
136
145
|
) -> ParseResult
|
|
137
146
|
|
|
138
|
-
def self.lex_ripper: (
|
|
139
|
-
String source
|
|
140
|
-
) -> Array[[[Integer, Integer], Symbol, String, untyped]]
|
|
141
|
-
|
|
142
147
|
# Methods taking a path to a Ruby file:
|
|
143
148
|
|
|
144
149
|
def self.parse_file: (
|
|
145
150
|
String filepath,
|
|
151
|
+
?command_line: String,
|
|
146
152
|
?encoding: Encoding | false,
|
|
147
153
|
?freeze: bool,
|
|
148
154
|
?frozen_string_literal: bool,
|
|
149
155
|
?line: Integer,
|
|
150
156
|
?main_script: bool,
|
|
151
|
-
?
|
|
157
|
+
?partial_script: bool,
|
|
152
158
|
?scopes: Array[Array[Symbol]],
|
|
153
|
-
?
|
|
159
|
+
?version: String
|
|
154
160
|
) -> ParseResult
|
|
155
161
|
|
|
156
162
|
def self.profile_file: (
|
|
157
163
|
String filepath,
|
|
164
|
+
?command_line: String,
|
|
158
165
|
?encoding: Encoding | false,
|
|
159
166
|
?freeze: bool,
|
|
160
167
|
?frozen_string_literal: bool,
|
|
161
168
|
?line: Integer,
|
|
162
169
|
?main_script: bool,
|
|
163
|
-
?
|
|
170
|
+
?partial_script: bool,
|
|
164
171
|
?scopes: Array[Array[Symbol]],
|
|
165
|
-
?
|
|
172
|
+
?version: String
|
|
166
173
|
) -> nil
|
|
167
174
|
|
|
168
175
|
def self.lex_file: (
|
|
169
176
|
String filepath,
|
|
177
|
+
?command_line: String,
|
|
170
178
|
?encoding: Encoding | false,
|
|
171
179
|
?freeze: bool,
|
|
172
180
|
?frozen_string_literal: bool,
|
|
173
181
|
?line: Integer,
|
|
174
182
|
?main_script: bool,
|
|
175
|
-
?
|
|
183
|
+
?partial_script: bool,
|
|
176
184
|
?scopes: Array[Array[Symbol]],
|
|
177
|
-
?
|
|
185
|
+
?version: String
|
|
178
186
|
) -> LexResult
|
|
179
187
|
|
|
180
188
|
def self.parse_lex_file: (
|
|
181
189
|
String filepath,
|
|
190
|
+
?command_line: String,
|
|
182
191
|
?encoding: Encoding | false,
|
|
183
192
|
?freeze: bool,
|
|
184
193
|
?frozen_string_literal: bool,
|
|
185
194
|
?line: Integer,
|
|
186
195
|
?main_script: bool,
|
|
187
|
-
?
|
|
196
|
+
?partial_script: bool,
|
|
188
197
|
?scopes: Array[Array[Symbol]],
|
|
189
|
-
?
|
|
198
|
+
?version: String
|
|
190
199
|
) -> ParseLexResult
|
|
191
200
|
|
|
192
201
|
def self.dump_file: (
|
|
193
202
|
String filepath,
|
|
203
|
+
?command_line: String,
|
|
194
204
|
?encoding: Encoding | false,
|
|
195
205
|
?freeze: bool,
|
|
196
206
|
?frozen_string_literal: bool,
|
|
197
207
|
?line: Integer,
|
|
198
208
|
?main_script: bool,
|
|
199
|
-
?
|
|
209
|
+
?partial_script: bool,
|
|
200
210
|
?scopes: Array[Array[Symbol]],
|
|
201
|
-
?
|
|
211
|
+
?version: String
|
|
202
212
|
) -> String
|
|
203
213
|
|
|
204
214
|
def self.parse_file_comments: (
|
|
205
215
|
String filepath,
|
|
216
|
+
?command_line: String,
|
|
206
217
|
?encoding: Encoding | false,
|
|
207
218
|
?freeze: bool,
|
|
208
219
|
?frozen_string_literal: bool,
|
|
209
220
|
?line: Integer,
|
|
210
221
|
?main_script: bool,
|
|
211
|
-
?
|
|
222
|
+
?partial_script: bool,
|
|
212
223
|
?scopes: Array[Array[Symbol]],
|
|
213
|
-
?
|
|
224
|
+
?version: String
|
|
214
225
|
) -> Array[comment]
|
|
215
226
|
|
|
216
227
|
def self.parse_file_success?: (
|
|
217
228
|
String filepath,
|
|
229
|
+
?command_line: String,
|
|
218
230
|
?encoding: Encoding | false,
|
|
219
231
|
?freeze: bool,
|
|
220
232
|
?frozen_string_literal: bool,
|
|
221
233
|
?line: Integer,
|
|
222
234
|
?main_script: bool,
|
|
223
|
-
?
|
|
235
|
+
?partial_script: bool,
|
|
224
236
|
?scopes: Array[Array[Symbol]],
|
|
225
|
-
?
|
|
237
|
+
?version: String
|
|
226
238
|
) -> bool
|
|
227
239
|
|
|
228
240
|
def self.parse_file_failure?: (
|
|
229
241
|
String filepath,
|
|
242
|
+
?command_line: String,
|
|
230
243
|
?encoding: Encoding | false,
|
|
231
244
|
?freeze: bool,
|
|
232
245
|
?frozen_string_literal: bool,
|
|
233
246
|
?line: Integer,
|
|
234
247
|
?main_script: bool,
|
|
235
|
-
?
|
|
248
|
+
?partial_script: bool,
|
|
236
249
|
?scopes: Array[Array[Symbol]],
|
|
237
|
-
?
|
|
250
|
+
?version: String
|
|
238
251
|
) -> bool
|
|
239
252
|
|
|
240
253
|
interface _Stream
|
|
@@ -243,15 +256,16 @@ module Prism
|
|
|
243
256
|
|
|
244
257
|
def self.parse_stream: (
|
|
245
258
|
_Stream stream,
|
|
259
|
+
?command_line: String,
|
|
246
260
|
?encoding: Encoding | false,
|
|
247
261
|
?filepath: String,
|
|
248
262
|
?freeze: bool,
|
|
249
263
|
?frozen_string_literal: bool,
|
|
250
264
|
?line: Integer,
|
|
251
265
|
?main_script: bool,
|
|
252
|
-
?
|
|
266
|
+
?partial_script: bool,
|
|
253
267
|
?scopes: Array[Array[Symbol]],
|
|
254
|
-
?
|
|
268
|
+
?version: String
|
|
255
269
|
) -> ParseResult
|
|
256
270
|
|
|
257
271
|
def self.scope: (?locals: Array[Symbol], ?forwarding: Array[Symbol]) -> Scope
|