ruby-next-parser 3.0.0.0 → 3.0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/parser/ruby-next/builder.rb +5 -0
- data/lib/parser/ruby-next/version.rb +1 -1
- data/lib/parser/rubynext.rb +6 -0
- data/lib/parser/rubynext.y +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f055d45d7f71a21ca63dbf9c74b4d9866027749d1902fc4908de38c0d6534f2
|
4
|
+
data.tar.gz: e38570da9a85ff34ca59fddde7319b3d32abc5cfd7dbbf9e8a3c5dd20120ef82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c56d58f7d31cd29b9caffb0200b1e686ac9399f7818e0c9856a288cfe65f8a8582dc8d60a2de24c7347a06bf08bed412539b0ad3b1bf092d341a2d3b6415e47
|
7
|
+
data.tar.gz: 66f57dad528067cb014d959619edfdfe11a49752e4390248126c2dc77fec71f916f3bbbbcfb598e5e4342008161ff51f59a5bd731ccbb891a30abb55b3831fae
|
@@ -14,5 +14,10 @@ module Parser
|
|
14
14
|
def ipair(var)
|
15
15
|
n(:ipair, [ var ], var.loc)
|
16
16
|
end
|
17
|
+
|
18
|
+
def check_reserved_for_numparam(name, loc)
|
19
|
+
# We don't want to raise SyntaxError, 'cause we want to use _x vars for older Rubies.
|
20
|
+
# The exception should be raised by Ruby itself for versions supporting numbered parameters
|
21
|
+
end
|
17
22
|
end
|
18
23
|
end
|
data/lib/parser/rubynext.rb
CHANGED
@@ -5191,6 +5191,12 @@ def _reduce_250(val, _values, result)
|
|
5191
5191
|
end
|
5192
5192
|
|
5193
5193
|
def _reduce_251(val, _values, result)
|
5194
|
+
_def_t, name_t = val[0]
|
5195
|
+
|
5196
|
+
if name_t[0].end_with?('=')
|
5197
|
+
diagnostic :error, :endless_setter, nil, name_t
|
5198
|
+
end
|
5199
|
+
|
5194
5200
|
result = @builder.def_endless_method(*val[0],
|
5195
5201
|
val[1], val[2], val[3])
|
5196
5202
|
|
data/lib/parser/rubynext.y
CHANGED
@@ -866,6 +866,12 @@ rule
|
|
866
866
|
}
|
867
867
|
| defn_head f_paren_args tEQL arg
|
868
868
|
{
|
869
|
+
_def_t, name_t = val[0]
|
870
|
+
|
871
|
+
if name_t[0].end_with?('=')
|
872
|
+
diagnostic :error, :endless_setter, nil, name_t
|
873
|
+
end
|
874
|
+
|
869
875
|
result = @builder.def_endless_method(*val[0],
|
870
876
|
val[1], val[2], val[3])
|
871
877
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-next-parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.
|
4
|
+
version: 3.0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Dementyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|