parser 2.5.1.1 → 2.5.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/parser/lexer.rl +8 -2
- data/lib/parser/version.rb +1 -1
- data/test/test_parser.rb +10 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 999565504b59c7ad12546445a92d20f6ff6235ed29d76c8c52eb73513c23d9e7
|
4
|
+
data.tar.gz: e04475df2071b10e772259cc6697875067432121122541a5ef5a5092eeee4e1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef4a0c50b91ba31b62c2274a6d442589fa277e0a606811800e9590ae73e7f6236d80fbc01c1d180adf2d64532d87dc99fcfa4953a28fa272dcce2fb195e8b224
|
7
|
+
data.tar.gz: 88e285335392b9269787035fe5dccc073758157496bcade661be8acbb912ec134e86fa75e8a2e3fbc0a62f7fa8a38c9f581cbecd9059bbddfe03812f958002cd
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,12 @@ Changelog
|
|
4
4
|
Not released (2018-07-10)
|
5
5
|
-------------------------
|
6
6
|
|
7
|
+
Bugs fixed:
|
8
|
+
* lexer.rl: Partially revert 5ba072d and properly handle 'm = -> *args do end'. (Ilya Bylich)
|
9
|
+
|
10
|
+
v2.5.1.1 (2018-07-10)
|
11
|
+
---------------------
|
12
|
+
|
7
13
|
Features implemented:
|
8
14
|
* ruby26.y: Endless ranges support. (Ilya Bylich)
|
9
15
|
|
data/lib/parser/lexer.rl
CHANGED
@@ -2243,13 +2243,19 @@ class Parser::Lexer
|
|
2243
2243
|
# OPERATORS
|
2244
2244
|
#
|
2245
2245
|
|
2246
|
+
'*'
|
2247
|
+
=> {
|
2248
|
+
emit(:tSTAR2)
|
2249
|
+
fgoto expr_value;
|
2250
|
+
};
|
2251
|
+
|
2246
2252
|
# When '|', '~', '!', '=>' are used as operators
|
2247
2253
|
# they do not accept any symbols (or quoted labels) after.
|
2248
2254
|
# Other binary operators accept it.
|
2249
|
-
( operator_arithmetic | operator_rest ) - ( '|' | '~' | '!' )
|
2255
|
+
( operator_arithmetic | operator_rest ) - ( '|' | '~' | '!' - '*' )
|
2250
2256
|
=> {
|
2251
2257
|
emit_table(PUNCTUATION);
|
2252
|
-
|
2258
|
+
fnext expr_value; fbreak;
|
2253
2259
|
};
|
2254
2260
|
|
2255
2261
|
( e_lparen | '|' | '~' | '!' )
|
data/lib/parser/version.rb
CHANGED
data/test/test_parser.rb
CHANGED
@@ -7025,4 +7025,14 @@ class TestParser < Minitest::Test
|
|
7025
7025
|
%q{},
|
7026
7026
|
SINCE_1_9)
|
7027
7027
|
end
|
7028
|
+
|
7029
|
+
def test_parser_bug_518
|
7030
|
+
assert_parses(
|
7031
|
+
s(:class,
|
7032
|
+
s(:const, nil, :A),
|
7033
|
+
s(:const, nil, :B), nil),
|
7034
|
+
"class A < B\nend",
|
7035
|
+
%q{},
|
7036
|
+
ALL_VERSIONS)
|
7037
|
+
end
|
7028
7038
|
end
|