rbs 1.3.0 → 1.3.1
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/rbs/parser.rb +4 -4
- data/lib/rbs/parser.y +4 -4
- data/lib/rbs/version.rb +1 -1
- 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: '018869df02515c1d7d1194b7b577e87c2dae8c01dc8fba577252b87bd41cc6d8'
|
4
|
+
data.tar.gz: 0c96d33f71b40d62ed5f5e082b0fec5780f6abb63343fcc5b8eb163f9504b8d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3380f6f0558ab9d9052ce6da093c03e3e11a96ebbc29f67d4c88ae4fcad222b980e884527fd741d2a698e77d7fa53f144857eb045b785de20d008a4839b3cc87
|
7
|
+
data.tar.gz: 19d98bbcf5ea0ce420ddd0191cdc9042f4b8a7aa329d9bc455205f7c6b5c0300aede0864b7f86f307b10e72c46b9809414997b244ce2564be1e8b3898df81e52
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## 1.3.1 (2021-07-21)
|
6
|
+
|
7
|
+
This release is to fix a bug introduced by parser update in 1.3.0.
|
8
|
+
|
9
|
+
* Fix parser to accept param names starting with `_` ([#721](https://github.com/ruby/rbs/pull/721))
|
10
|
+
|
5
11
|
## 1.3.0 (2021-07-20)
|
6
12
|
|
7
13
|
### Summary
|
data/lib/rbs/parser.rb
CHANGED
@@ -340,8 +340,8 @@ def next_token
|
|
340
340
|
new_token(:tLIDENT)
|
341
341
|
when input.scan(/_[a-z]\w*\b/)
|
342
342
|
new_token(:tUNDERSCOREIDENT)
|
343
|
-
when input.scan(/_/)
|
344
|
-
new_token(:
|
343
|
+
when input.scan(/_[\w_]*\b/)
|
344
|
+
new_token(:tPARAMNAME)
|
345
345
|
when input.scan(/"(\\"|[^"])*"/)
|
346
346
|
s = input.matched.yield_self {|s| s[1, s.length - 2] }
|
347
347
|
.gsub(DBL_QUOTE_STR_ESCAPE_SEQUENCES_RE) do |match|
|
@@ -1228,7 +1228,7 @@ racc_token_table = {
|
|
1228
1228
|
:kIN => 79,
|
1229
1229
|
:kUNCHECKED => 80,
|
1230
1230
|
:kOVERLOAD => 81,
|
1231
|
-
:
|
1231
|
+
:tPARAMNAME => 82 }
|
1232
1232
|
|
1233
1233
|
racc_nt_base = 83
|
1234
1234
|
|
@@ -1333,7 +1333,7 @@ Racc_token_to_s_table = [
|
|
1333
1333
|
"kIN",
|
1334
1334
|
"kUNCHECKED",
|
1335
1335
|
"kOVERLOAD",
|
1336
|
-
"
|
1336
|
+
"tPARAMNAME",
|
1337
1337
|
"$start",
|
1338
1338
|
"target",
|
1339
1339
|
"type",
|
data/lib/rbs/parser.y
CHANGED
@@ -12,7 +12,7 @@ class RBS::Parser
|
|
12
12
|
kPREPEND kEXTENSION kINCOMPATIBLE
|
13
13
|
type_TYPE type_SIGNATURE type_METHODTYPE tEOF
|
14
14
|
kOUT kIN kUNCHECKED kOVERLOAD
|
15
|
-
|
15
|
+
tPARAMNAME
|
16
16
|
|
17
17
|
prechigh
|
18
18
|
nonassoc kQUESTION
|
@@ -1327,7 +1327,7 @@ rule
|
|
1327
1327
|
}
|
1328
1328
|
|
1329
1329
|
var_name_opt:
|
1330
|
-
| tLIDENT | tINTERFACEIDENT | tQUOTEDIDENT | tUNDERSCOREIDENT |
|
1330
|
+
| tLIDENT | tINTERFACEIDENT | tQUOTEDIDENT | tUNDERSCOREIDENT | tPARAMNAME
|
1331
1331
|
|
1332
1332
|
qualified_name:
|
1333
1333
|
namespace simple_name {
|
@@ -1722,8 +1722,8 @@ def next_token
|
|
1722
1722
|
new_token(:tLIDENT)
|
1723
1723
|
when input.scan(/_[a-z]\w*\b/)
|
1724
1724
|
new_token(:tUNDERSCOREIDENT)
|
1725
|
-
when input.scan(/_/)
|
1726
|
-
new_token(:
|
1725
|
+
when input.scan(/_[\w_]*\b/)
|
1726
|
+
new_token(:tPARAMNAME)
|
1727
1727
|
when input.scan(/"(\\"|[^"])*"/)
|
1728
1728
|
s = input.matched.yield_self {|s| s[1, s.length - 2] }
|
1729
1729
|
.gsub(DBL_QUOTE_STR_ESCAPE_SEQUENCES_RE) do |match|
|
data/lib/rbs/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Soutaro Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: RBS is the language for type signatures for Ruby and standard library
|
14
14
|
definitions.
|