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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6832f775181e80a7171f163d932725de6493729364497f7741579922268ea16
4
- data.tar.gz: 2d423adee56fa4510dc1ae0ca8d7c015fe8bec9b1fbc2eb2cdb5848d0cdaf40d
3
+ metadata.gz: 5f055d45d7f71a21ca63dbf9c74b4d9866027749d1902fc4908de38c0d6534f2
4
+ data.tar.gz: e38570da9a85ff34ca59fddde7319b3d32abc5cfd7dbbf9e8a3c5dd20120ef82
5
5
  SHA512:
6
- metadata.gz: 12a7d8759168f431dc2baa43373fa6d5518b51524770d8cb46d8ae2e40b74d8cd95df9b5dd910ec252b5b4e115221bf6e4971be2837e163696ce17caa0ee679e
7
- data.tar.gz: 054c541f3fcbff5cc0eb29303f64b6800df73e5479e00c7e8f5ee997e415e487d9d8eefce9db8811ce3b2951d099a35cc68a5c6c05ccef3203f3781aa2eee7ca
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Parser
4
- NEXT_VERSION = "3.0.0.0"
4
+ NEXT_VERSION = "3.0.0.1"
5
5
  end
@@ -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
 
@@ -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.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-02 00:00:00.000000000 Z
11
+ date: 2020-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser