parser 2.1.3 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/parser/builders/default.rb +1 -1
- data/lib/parser/version.rb +1 -1
- data/test/test_parser.rb +14 -0
- metadata +43 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e88ebe1de51e22363aed8e3c19386b88145f8bdf
|
4
|
+
data.tar.gz: bfa19788a7bd3ea433bceb98227e4b6a8fe856d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c45ee15b7d3acfcd6c77504d0aae08f47bf4bc109fc9ecb59398d8bea0538f356e4ee8e6a7bea3eacc50e79086a6ed9ead574e5ee0defc175e531310352dc5a
|
7
|
+
data.tar.gz: 264a6216cc8a86c372b58fc4aa3dc5afab9b905773170e17161abee39ad30d2c586e875eeaf6a99b93f9bf0ddff3915ed9274a7db29f7acf38a619d8c25b2015
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
Changelog
|
2
2
|
=========
|
3
3
|
|
4
|
+
v2.1.4 (2014-01-11)
|
5
|
+
-------------------
|
6
|
+
|
7
|
+
Features implemented:
|
8
|
+
* ruby22.y: "x def y; z do end end": save cmdarg stack to isolate command argument state from outer scope. (Peter Zotov)
|
9
|
+
* Add Ruby 2.2 syntax. (Peter Zotov)
|
10
|
+
|
11
|
+
Bugs fixed:
|
12
|
+
* Builders::Default: "super do end": super and zsuper are like send (fixes #131). (Peter Zotov)
|
13
|
+
|
4
14
|
v2.1.3 (2014-01-10)
|
5
15
|
-------------------
|
6
16
|
|
@@ -635,7 +635,7 @@ module Parser
|
|
635
635
|
diagnostic :error, :block_and_blockarg, nil, last_arg.loc.expression, [loc(begin_t)]
|
636
636
|
end
|
637
637
|
|
638
|
-
if method_call.type
|
638
|
+
if [:send, :super, :zsuper].include?(method_call.type)
|
639
639
|
n(:block, [ method_call, args, body ],
|
640
640
|
block_map(method_call.loc.expression, begin_t, end_t))
|
641
641
|
else
|
data/lib/parser/version.rb
CHANGED
data/test/test_parser.rb
CHANGED
@@ -3135,6 +3135,20 @@ class TestParser < Minitest::Test
|
|
3135
3135
|
|~~~~~ expression})
|
3136
3136
|
end
|
3137
3137
|
|
3138
|
+
def test_super_block
|
3139
|
+
assert_parses(
|
3140
|
+
s(:block,
|
3141
|
+
s(:super, s(:lvar, :foo), s(:lvar, :bar)),
|
3142
|
+
s(:args), nil),
|
3143
|
+
%q{super foo, bar do end})
|
3144
|
+
|
3145
|
+
assert_parses(
|
3146
|
+
s(:block,
|
3147
|
+
s(:zsuper),
|
3148
|
+
s(:args), nil),
|
3149
|
+
%q{super do end})
|
3150
|
+
end
|
3151
|
+
|
3138
3152
|
# To block argument
|
3139
3153
|
|
3140
3154
|
def test_yield
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Zotov
|
@@ -14,62 +14,62 @@ dependencies:
|
|
14
14
|
name: ast
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: slop
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '3.4'
|
34
|
-
- -
|
34
|
+
- - '>='
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: 3.4.5
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- -
|
41
|
+
- - ~>
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '3.4'
|
44
|
-
- -
|
44
|
+
- - '>='
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 3.4.5
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bundler
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- -
|
51
|
+
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '1.2'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- -
|
58
|
+
- - ~>
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '1.2'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: rake
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- -
|
65
|
+
- - ~>
|
66
66
|
- !ruby/object:Gem::Version
|
67
67
|
version: '0.9'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- -
|
72
|
+
- - ~>
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0.9'
|
75
75
|
- !ruby/object:Gem::Dependency
|
@@ -90,140 +90,140 @@ dependencies:
|
|
90
90
|
name: cliver
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
|
-
- -
|
93
|
+
- - ~>
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: 0.3.0
|
96
96
|
type: :development
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
|
-
- -
|
100
|
+
- - ~>
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: 0.3.0
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: yard
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- -
|
107
|
+
- - '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
|
-
- -
|
114
|
+
- - '>='
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: kramdown
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
|
-
- -
|
121
|
+
- - '>='
|
122
122
|
- !ruby/object:Gem::Version
|
123
123
|
version: '0'
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
|
-
- -
|
128
|
+
- - '>='
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: minitest
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
|
-
- -
|
135
|
+
- - ~>
|
136
136
|
- !ruby/object:Gem::Version
|
137
137
|
version: '5.0'
|
138
138
|
type: :development
|
139
139
|
prerelease: false
|
140
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
|
-
- -
|
142
|
+
- - ~>
|
143
143
|
- !ruby/object:Gem::Version
|
144
144
|
version: '5.0'
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
146
|
name: simplecov
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
|
-
- -
|
149
|
+
- - ~>
|
150
150
|
- !ruby/object:Gem::Version
|
151
151
|
version: '0.7'
|
152
152
|
type: :development
|
153
153
|
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
|
-
- -
|
156
|
+
- - ~>
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: '0.7'
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
160
|
name: coveralls
|
161
161
|
requirement: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
|
-
- -
|
163
|
+
- - '>='
|
164
164
|
- !ruby/object:Gem::Version
|
165
165
|
version: '0'
|
166
166
|
type: :development
|
167
167
|
prerelease: false
|
168
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
169
|
requirements:
|
170
|
-
- -
|
170
|
+
- - '>='
|
171
171
|
- !ruby/object:Gem::Version
|
172
172
|
version: '0'
|
173
173
|
- !ruby/object:Gem::Dependency
|
174
174
|
name: json_pure
|
175
175
|
requirement: !ruby/object:Gem::Requirement
|
176
176
|
requirements:
|
177
|
-
- -
|
177
|
+
- - '>='
|
178
178
|
- !ruby/object:Gem::Version
|
179
179
|
version: '0'
|
180
180
|
type: :development
|
181
181
|
prerelease: false
|
182
182
|
version_requirements: !ruby/object:Gem::Requirement
|
183
183
|
requirements:
|
184
|
-
- -
|
184
|
+
- - '>='
|
185
185
|
- !ruby/object:Gem::Version
|
186
186
|
version: '0'
|
187
187
|
- !ruby/object:Gem::Dependency
|
188
188
|
name: mime-types
|
189
189
|
requirement: !ruby/object:Gem::Requirement
|
190
190
|
requirements:
|
191
|
-
- -
|
191
|
+
- - ~>
|
192
192
|
- !ruby/object:Gem::Version
|
193
193
|
version: '1.25'
|
194
194
|
type: :development
|
195
195
|
prerelease: false
|
196
196
|
version_requirements: !ruby/object:Gem::Requirement
|
197
197
|
requirements:
|
198
|
-
- -
|
198
|
+
- - ~>
|
199
199
|
- !ruby/object:Gem::Version
|
200
200
|
version: '1.25'
|
201
201
|
- !ruby/object:Gem::Dependency
|
202
202
|
name: simplecov-sublime-ruby-coverage
|
203
203
|
requirement: !ruby/object:Gem::Requirement
|
204
204
|
requirements:
|
205
|
-
- -
|
205
|
+
- - '>='
|
206
206
|
- !ruby/object:Gem::Version
|
207
207
|
version: '0'
|
208
208
|
type: :development
|
209
209
|
prerelease: false
|
210
210
|
version_requirements: !ruby/object:Gem::Requirement
|
211
211
|
requirements:
|
212
|
-
- -
|
212
|
+
- - '>='
|
213
213
|
- !ruby/object:Gem::Version
|
214
214
|
version: '0'
|
215
215
|
- !ruby/object:Gem::Dependency
|
216
216
|
name: gauntlet
|
217
217
|
requirement: !ruby/object:Gem::Requirement
|
218
218
|
requirements:
|
219
|
-
- -
|
219
|
+
- - '>='
|
220
220
|
- !ruby/object:Gem::Version
|
221
221
|
version: '0'
|
222
222
|
type: :development
|
223
223
|
prerelease: false
|
224
224
|
version_requirements: !ruby/object:Gem::Requirement
|
225
225
|
requirements:
|
226
|
-
- -
|
226
|
+
- - '>='
|
227
227
|
- !ruby/object:Gem::Version
|
228
228
|
version: '0'
|
229
229
|
description: A Ruby parser written in pure Ruby.
|
@@ -235,10 +235,10 @@ executables:
|
|
235
235
|
extensions: []
|
236
236
|
extra_rdoc_files: []
|
237
237
|
files:
|
238
|
-
-
|
239
|
-
-
|
240
|
-
-
|
241
|
-
-
|
238
|
+
- .gitignore
|
239
|
+
- .rubocop.yml
|
240
|
+
- .travis.yml
|
241
|
+
- .yardopts
|
242
242
|
- CHANGELOG.md
|
243
243
|
- CONTRIBUTING.md
|
244
244
|
- Gemfile
|
@@ -264,20 +264,15 @@ files:
|
|
264
264
|
- lib/parser/current.rb
|
265
265
|
- lib/parser/diagnostic.rb
|
266
266
|
- lib/parser/diagnostic/engine.rb
|
267
|
-
- lib/parser/lexer.rb
|
268
267
|
- lib/parser/lexer.rl
|
269
268
|
- lib/parser/lexer/explanation.rb
|
270
269
|
- lib/parser/lexer/literal.rb
|
271
270
|
- lib/parser/lexer/stack_state.rb
|
272
271
|
- lib/parser/messages.rb
|
273
272
|
- lib/parser/rewriter.rb
|
274
|
-
- lib/parser/ruby18.rb
|
275
273
|
- lib/parser/ruby18.y
|
276
|
-
- lib/parser/ruby19.rb
|
277
274
|
- lib/parser/ruby19.y
|
278
|
-
- lib/parser/ruby20.rb
|
279
275
|
- lib/parser/ruby20.y
|
280
|
-
- lib/parser/ruby21.rb
|
281
276
|
- lib/parser/ruby21.y
|
282
277
|
- lib/parser/runner.rb
|
283
278
|
- lib/parser/runner/ruby_parse.rb
|
@@ -323,6 +318,11 @@ files:
|
|
323
318
|
- test/test_source_rewriter.rb
|
324
319
|
- test/test_source_rewriter_action.rb
|
325
320
|
- test/test_static_environment.rb
|
321
|
+
- lib/parser/lexer.rb
|
322
|
+
- lib/parser/ruby18.rb
|
323
|
+
- lib/parser/ruby19.rb
|
324
|
+
- lib/parser/ruby20.rb
|
325
|
+
- lib/parser/ruby21.rb
|
326
326
|
homepage: http://github.com/whitequark/parser
|
327
327
|
licenses:
|
328
328
|
- MIT
|
@@ -333,17 +333,17 @@ require_paths:
|
|
333
333
|
- lib
|
334
334
|
required_ruby_version: !ruby/object:Gem::Requirement
|
335
335
|
requirements:
|
336
|
-
- -
|
336
|
+
- - '>='
|
337
337
|
- !ruby/object:Gem::Version
|
338
338
|
version: '0'
|
339
339
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
340
340
|
requirements:
|
341
|
-
- -
|
341
|
+
- - '>='
|
342
342
|
- !ruby/object:Gem::Version
|
343
343
|
version: '0'
|
344
344
|
requirements: []
|
345
345
|
rubyforge_project:
|
346
|
-
rubygems_version: 2.
|
346
|
+
rubygems_version: 2.0.14
|
347
347
|
signing_key:
|
348
348
|
specification_version: 4
|
349
349
|
summary: A Ruby parser written in pure Ruby.
|