rbs 4.0.3 → 4.1.0.pre.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/c-check.yml +3 -0
- data/.github/workflows/dependabot.yml +1 -1
- data/.github/workflows/jruby.yml +67 -0
- data/.github/workflows/milestone.yml +4 -1
- data/.github/workflows/ruby.yml +40 -0
- data/.github/workflows/rust.yml +3 -2
- data/.github/workflows/truffleruby.yml +54 -0
- data/.github/workflows/typecheck.yml +3 -0
- data/.github/workflows/wasm.yml +53 -0
- data/.github/workflows/windows.yml +3 -0
- data/.gitignore +7 -0
- data/CHANGELOG.md +0 -8
- data/README.md +3 -3
- data/Rakefile +118 -3
- data/Steepfile +7 -0
- data/config.yml +24 -0
- data/core/array.rbs +144 -144
- data/core/builtin.rbs +7 -6
- data/core/class.rbs +5 -3
- data/core/enumerable.rbs +109 -109
- data/core/enumerator/product.rbs +5 -5
- data/core/enumerator.rbs +28 -28
- data/core/file.rbs +24 -1018
- data/core/file_constants.rbs +463 -0
- data/core/file_stat.rbs +534 -0
- data/core/hash.rbs +117 -101
- data/core/integer.rbs +21 -58
- data/core/io.rbs +25 -7
- data/core/kernel.rbs +26 -11
- data/core/module.rbs +88 -74
- data/core/numeric.rbs +3 -0
- data/core/object_space/weak_key_map.rbs +7 -7
- data/core/range.rbs +23 -23
- data/core/rbs/ops.rbs +154 -0
- data/core/rbs/unnamed/argf.rbs +3 -3
- data/core/ruby_vm.rbs +40 -0
- data/core/set.rbs +3 -3
- data/core/struct.rbs +16 -16
- data/core/thread.rbs +6 -6
- data/docs/CONTRIBUTING.md +2 -1
- data/docs/inline.md +65 -7
- data/docs/rbs_by_example.md +20 -20
- data/docs/syntax.md +2 -2
- data/docs/wasm_serialization.md +80 -0
- data/ext/rbs_extension/ast_translation.c +1298 -956
- data/ext/rbs_extension/ast_translation.h +4 -0
- data/ext/rbs_extension/class_constants.c +2 -0
- data/ext/rbs_extension/class_constants.h +1 -0
- data/ext/rbs_extension/extconf.rb +1 -0
- data/ext/rbs_extension/main.c +139 -4
- data/include/rbs/ast.h +323 -298
- data/include/rbs/defines.h +13 -0
- data/include/rbs/lexer.h +1 -0
- data/include/rbs/serialize.h +39 -0
- data/lib/rbs/annotate/rdoc_annotator.rb +27 -31
- data/lib/rbs/ast/ruby/annotations.rb +42 -0
- data/lib/rbs/ast/ruby/comment_block.rb +6 -4
- data/lib/rbs/ast/ruby/declarations.rb +11 -1
- data/lib/rbs/ast/ruby/helpers/location_helper.rb +1 -1
- data/lib/rbs/ast/ruby/members.rb +40 -1
- data/lib/rbs/buffer.rb +48 -11
- data/lib/rbs/cli.rb +3 -5
- data/lib/rbs/collection/config/lockfile_generator.rb +14 -1
- data/lib/rbs/collection/sources/git.rb +6 -0
- data/lib/rbs/definition_builder/method_builder.rb +12 -6
- data/lib/rbs/environment.rb +10 -3
- data/lib/rbs/inline_parser.rb +54 -28
- data/lib/rbs/namespace.rb +47 -11
- data/lib/rbs/prototype/runtime.rb +2 -0
- data/lib/rbs/resolver/type_name_resolver.rb +12 -14
- data/lib/rbs/rewriter.rb +70 -0
- data/lib/rbs/test/type_check.rb +6 -1
- data/lib/rbs/type_name.rb +33 -13
- data/lib/rbs/unit_test/type_assertions.rb +9 -0
- data/lib/rbs/version.rb +1 -1
- data/lib/rbs/wasm/deserializer.rb +213 -0
- data/lib/rbs/wasm/location.rb +61 -0
- data/lib/rbs/wasm/parser.rb +137 -0
- data/lib/rbs/wasm/runtime.rb +217 -0
- data/lib/rbs/wasm/serialization_schema.rb +110 -0
- data/lib/rbs.rb +14 -2
- data/rbs.gemspec +19 -2
- data/sig/annotate/rdoc_annotater.rbs +12 -9
- data/sig/ast/ruby/annotations.rbs +49 -0
- data/sig/ast/ruby/members.rbs +21 -1
- data/sig/buffer.rbs +19 -1
- data/sig/collection/config/lockfile_generator.rbs +2 -0
- data/sig/inline_parser.rbs +2 -0
- data/sig/manifest.yaml +0 -1
- data/sig/namespace.rbs +20 -0
- data/sig/parser.rbs +10 -0
- data/sig/resolver/type_name_resolver.rbs +2 -4
- data/sig/rewriter.rbs +45 -0
- data/sig/typename.rbs +15 -0
- data/sig/unit_test/type_assertions.rbs +4 -0
- data/sig/wasm/deserializer.rbs +66 -0
- data/sig/wasm/serialization_schema.rbs +13 -0
- data/src/ast.c +186 -162
- data/src/lexer.c +137 -114
- data/src/lexer.re +1 -0
- data/src/lexstate.c +6 -1
- data/src/parser.c +55 -5
- data/src/serialize.c +958 -0
- data/src/util/rbs_allocator.c +1 -4
- data/stdlib/abbrev/0/array.rbs +1 -1
- data/stdlib/csv/0/csv.rbs +5 -5
- data/stdlib/digest/0/digest.rbs +1 -1
- data/stdlib/etc/0/etc.rbs +18 -4
- data/stdlib/fileutils/0/fileutils.rbs +21 -21
- data/stdlib/json/0/json.rbs +6 -6
- data/stdlib/openssl/0/openssl.rbs +7 -7
- data/stdlib/resolv/0/resolv.rbs +1 -1
- data/stdlib/shellwords/0/shellwords.rbs +1 -1
- data/stdlib/stringio/0/stringio.rbs +32 -10
- data/stdlib/strscan/0/string_scanner.rbs +74 -55
- data/stdlib/tsort/0/cyclic.rbs +1 -1
- data/stdlib/tsort/0/interfaces.rbs +8 -8
- data/stdlib/tsort/0/tsort.rbs +9 -9
- data/stdlib/zlib/0/gzip_reader.rbs +2 -2
- data/wasm/README.md +59 -0
- data/wasm/rbs_wasm.c +411 -0
- metadata +23 -5
- data/.vscode/extensions.json +0 -5
- data/.vscode/settings.json +0 -19
data/src/lexer.c
CHANGED
|
@@ -166,7 +166,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
166
166
|
}
|
|
167
167
|
yy1:
|
|
168
168
|
rbs_skip(lexer);
|
|
169
|
-
#line
|
|
169
|
+
#line 152 "src/lexer.re"
|
|
170
170
|
{
|
|
171
171
|
return rbs_next_eof_token(lexer);
|
|
172
172
|
}
|
|
@@ -174,7 +174,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
174
174
|
yy2:
|
|
175
175
|
rbs_skip(lexer);
|
|
176
176
|
yy3:
|
|
177
|
-
#line
|
|
177
|
+
#line 153 "src/lexer.re"
|
|
178
178
|
{
|
|
179
179
|
return rbs_next_token(lexer, ErrorToken);
|
|
180
180
|
}
|
|
@@ -185,7 +185,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
185
185
|
if (yych == '\t') goto yy4;
|
|
186
186
|
if (yych == ' ') goto yy4;
|
|
187
187
|
yy5:
|
|
188
|
-
#line
|
|
188
|
+
#line 151 "src/lexer.re"
|
|
189
189
|
{
|
|
190
190
|
return rbs_next_token(lexer, tTRIVIA);
|
|
191
191
|
}
|
|
@@ -572,7 +572,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
574
|
yy38:
|
|
575
|
-
#line
|
|
575
|
+
#line 137 "src/lexer.re"
|
|
576
576
|
{
|
|
577
577
|
return rbs_next_token(lexer, tUIDENT);
|
|
578
578
|
}
|
|
@@ -621,7 +621,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
623
|
yy43:
|
|
624
|
-
#line
|
|
624
|
+
#line 140 "src/lexer.re"
|
|
625
625
|
{
|
|
626
626
|
return rbs_next_token(lexer, tULLIDENT);
|
|
627
627
|
}
|
|
@@ -655,7 +655,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
655
655
|
goto yy54;
|
|
656
656
|
}
|
|
657
657
|
yy47:
|
|
658
|
-
#line
|
|
658
|
+
#line 136 "src/lexer.re"
|
|
659
659
|
{
|
|
660
660
|
return rbs_next_token(lexer, tLIDENT);
|
|
661
661
|
}
|
|
@@ -836,7 +836,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
836
836
|
}
|
|
837
837
|
yy71:
|
|
838
838
|
rbs_skip(lexer);
|
|
839
|
-
#line
|
|
839
|
+
#line 114 "src/lexer.re"
|
|
840
840
|
{
|
|
841
841
|
return rbs_next_token(lexer, tDQSTRING);
|
|
842
842
|
}
|
|
@@ -877,7 +877,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
877
877
|
}
|
|
878
878
|
}
|
|
879
879
|
yy74:
|
|
880
|
-
#line
|
|
880
|
+
#line 147 "src/lexer.re"
|
|
881
881
|
{
|
|
882
882
|
return rbs_next_token(lexer, tGIDENT);
|
|
883
883
|
}
|
|
@@ -920,7 +920,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
920
920
|
yy79:
|
|
921
921
|
rbs_skip(lexer);
|
|
922
922
|
yy80:
|
|
923
|
-
#line
|
|
923
|
+
#line 115 "src/lexer.re"
|
|
924
924
|
{
|
|
925
925
|
return rbs_next_token(lexer, tSQSTRING);
|
|
926
926
|
}
|
|
@@ -970,7 +970,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
970
970
|
if (yych == '=') goto yy90;
|
|
971
971
|
if (yych == '~') goto yy90;
|
|
972
972
|
yy87:
|
|
973
|
-
#line
|
|
973
|
+
#line 134 "src/lexer.re"
|
|
974
974
|
{
|
|
975
975
|
return rbs_next_token(lexer, tSYMBOL);
|
|
976
976
|
}
|
|
@@ -1116,7 +1116,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
1118
|
yy100:
|
|
1119
|
-
#line
|
|
1119
|
+
#line 130 "src/lexer.re"
|
|
1120
1120
|
{
|
|
1121
1121
|
return rbs_next_token(lexer, tSYMBOL);
|
|
1122
1122
|
}
|
|
@@ -1172,7 +1172,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
1172
1172
|
}
|
|
1173
1173
|
}
|
|
1174
1174
|
yy108:
|
|
1175
|
-
#line
|
|
1175
|
+
#line 144 "src/lexer.re"
|
|
1176
1176
|
{
|
|
1177
1177
|
return rbs_next_token(lexer, tAIDENT);
|
|
1178
1178
|
}
|
|
@@ -1184,14 +1184,14 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
1184
1184
|
goto yy107;
|
|
1185
1185
|
yy110:
|
|
1186
1186
|
rbs_skip(lexer);
|
|
1187
|
-
#line
|
|
1187
|
+
#line 141 "src/lexer.re"
|
|
1188
1188
|
{
|
|
1189
1189
|
return rbs_next_token(lexer, tBANGIDENT);
|
|
1190
1190
|
}
|
|
1191
1191
|
#line 1041 "src/lexer.c"
|
|
1192
1192
|
yy111:
|
|
1193
1193
|
rbs_skip(lexer);
|
|
1194
|
-
#line
|
|
1194
|
+
#line 142 "src/lexer.re"
|
|
1195
1195
|
{
|
|
1196
1196
|
return rbs_next_token(lexer, tEQIDENT);
|
|
1197
1197
|
}
|
|
@@ -1226,7 +1226,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
1226
1226
|
}
|
|
1227
1227
|
}
|
|
1228
1228
|
yy115:
|
|
1229
|
-
#line
|
|
1229
|
+
#line 138 "src/lexer.re"
|
|
1230
1230
|
{
|
|
1231
1231
|
return rbs_next_token(lexer, tULLIDENT);
|
|
1232
1232
|
}
|
|
@@ -1251,7 +1251,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
1251
1251
|
}
|
|
1252
1252
|
}
|
|
1253
1253
|
yy117:
|
|
1254
|
-
#line
|
|
1254
|
+
#line 139 "src/lexer.re"
|
|
1255
1255
|
{
|
|
1256
1256
|
return rbs_next_token(lexer, tULIDENT);
|
|
1257
1257
|
}
|
|
@@ -1292,7 +1292,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
1294
1294
|
yy122:
|
|
1295
|
-
#line
|
|
1295
|
+
#line 101 "src/lexer.re"
|
|
1296
1296
|
{
|
|
1297
1297
|
return rbs_next_token(lexer, kAS);
|
|
1298
1298
|
}
|
|
@@ -1519,7 +1519,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
1519
1519
|
#line 1355 "src/lexer.c"
|
|
1520
1520
|
yy156:
|
|
1521
1521
|
rbs_skip(lexer);
|
|
1522
|
-
#line
|
|
1522
|
+
#line 116 "src/lexer.re"
|
|
1523
1523
|
{
|
|
1524
1524
|
return rbs_next_token(lexer, tDQSYMBOL);
|
|
1525
1525
|
}
|
|
@@ -1560,7 +1560,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
1560
1560
|
}
|
|
1561
1561
|
}
|
|
1562
1562
|
yy159:
|
|
1563
|
-
#line
|
|
1563
|
+
#line 133 "src/lexer.re"
|
|
1564
1564
|
{
|
|
1565
1565
|
return rbs_next_token(lexer, tSYMBOL);
|
|
1566
1566
|
}
|
|
@@ -1571,7 +1571,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
1571
1571
|
yy161:
|
|
1572
1572
|
rbs_skip(lexer);
|
|
1573
1573
|
yy162:
|
|
1574
|
-
#line
|
|
1574
|
+
#line 117 "src/lexer.re"
|
|
1575
1575
|
{
|
|
1576
1576
|
return rbs_next_token(lexer, tSQSYMBOL);
|
|
1577
1577
|
}
|
|
@@ -1630,7 +1630,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
1630
1630
|
}
|
|
1631
1631
|
}
|
|
1632
1632
|
yy168:
|
|
1633
|
-
#line
|
|
1633
|
+
#line 131 "src/lexer.re"
|
|
1634
1634
|
{
|
|
1635
1635
|
return rbs_next_token(lexer, tSYMBOL);
|
|
1636
1636
|
}
|
|
@@ -1654,7 +1654,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
1654
1654
|
}
|
|
1655
1655
|
}
|
|
1656
1656
|
yy171:
|
|
1657
|
-
#line
|
|
1657
|
+
#line 145 "src/lexer.re"
|
|
1658
1658
|
{
|
|
1659
1659
|
return rbs_next_token(lexer, tA2IDENT);
|
|
1660
1660
|
}
|
|
@@ -1821,7 +1821,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
1821
1821
|
}
|
|
1822
1822
|
}
|
|
1823
1823
|
yy192:
|
|
1824
|
-
#line
|
|
1824
|
+
#line 87 "src/lexer.re"
|
|
1825
1825
|
{
|
|
1826
1826
|
return rbs_next_token(lexer, kNIL);
|
|
1827
1827
|
}
|
|
@@ -1846,7 +1846,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
1846
1846
|
}
|
|
1847
1847
|
}
|
|
1848
1848
|
yy194:
|
|
1849
|
-
#line
|
|
1849
|
+
#line 88 "src/lexer.re"
|
|
1850
1850
|
{
|
|
1851
1851
|
return rbs_next_token(lexer, kOUT);
|
|
1852
1852
|
}
|
|
@@ -1906,7 +1906,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
1906
1906
|
}
|
|
1907
1907
|
}
|
|
1908
1908
|
yy203:
|
|
1909
|
-
#line
|
|
1909
|
+
#line 94 "src/lexer.re"
|
|
1910
1910
|
{
|
|
1911
1911
|
return rbs_next_token(lexer, kTOP);
|
|
1912
1912
|
}
|
|
@@ -1951,7 +1951,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
1951
1951
|
}
|
|
1952
1952
|
}
|
|
1953
1953
|
yy209:
|
|
1954
|
-
#line
|
|
1954
|
+
#line 100 "src/lexer.re"
|
|
1955
1955
|
{
|
|
1956
1956
|
return rbs_next_token(lexer, kUSE);
|
|
1957
1957
|
}
|
|
@@ -2064,7 +2064,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
2064
2064
|
}
|
|
2065
2065
|
}
|
|
2066
2066
|
yy221:
|
|
2067
|
-
#line
|
|
2067
|
+
#line 132 "src/lexer.re"
|
|
2068
2068
|
{
|
|
2069
2069
|
return rbs_next_token(lexer, tSYMBOL);
|
|
2070
2070
|
}
|
|
@@ -2088,7 +2088,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
2088
2088
|
}
|
|
2089
2089
|
}
|
|
2090
2090
|
yy224:
|
|
2091
|
-
#line
|
|
2091
|
+
#line 103 "src/lexer.re"
|
|
2092
2092
|
{
|
|
2093
2093
|
return rbs_next_token(lexer, kATRBS);
|
|
2094
2094
|
}
|
|
@@ -2208,7 +2208,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
2208
2208
|
}
|
|
2209
2209
|
}
|
|
2210
2210
|
yy242:
|
|
2211
|
-
#line
|
|
2211
|
+
#line 92 "src/lexer.re"
|
|
2212
2212
|
{
|
|
2213
2213
|
return rbs_next_token(lexer, kSELF);
|
|
2214
2214
|
}
|
|
@@ -2238,7 +2238,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
2238
2238
|
}
|
|
2239
2239
|
}
|
|
2240
2240
|
yy245:
|
|
2241
|
-
#line
|
|
2241
|
+
#line 104 "src/lexer.re"
|
|
2242
2242
|
{
|
|
2243
2243
|
return rbs_next_token(lexer, kSKIP);
|
|
2244
2244
|
}
|
|
@@ -2263,7 +2263,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
2263
2263
|
}
|
|
2264
2264
|
}
|
|
2265
2265
|
yy247:
|
|
2266
|
-
#line
|
|
2266
|
+
#line 95 "src/lexer.re"
|
|
2267
2267
|
{
|
|
2268
2268
|
return rbs_next_token(lexer, kTRUE);
|
|
2269
2269
|
}
|
|
@@ -2288,7 +2288,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
2288
2288
|
}
|
|
2289
2289
|
}
|
|
2290
2290
|
yy249:
|
|
2291
|
-
#line
|
|
2291
|
+
#line 96 "src/lexer.re"
|
|
2292
2292
|
{
|
|
2293
2293
|
return rbs_next_token(lexer, kTYPE);
|
|
2294
2294
|
}
|
|
@@ -2323,7 +2323,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
2323
2323
|
}
|
|
2324
2324
|
}
|
|
2325
2325
|
yy253:
|
|
2326
|
-
#line
|
|
2326
|
+
#line 99 "src/lexer.re"
|
|
2327
2327
|
{
|
|
2328
2328
|
return rbs_next_token(lexer, kVOID);
|
|
2329
2329
|
}
|
|
@@ -2662,7 +2662,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
2662
2662
|
}
|
|
2663
2663
|
}
|
|
2664
2664
|
yy294:
|
|
2665
|
-
#line
|
|
2665
|
+
#line 91 "src/lexer.re"
|
|
2666
2666
|
{
|
|
2667
2667
|
return rbs_next_token(lexer, kPUBLIC);
|
|
2668
2668
|
}
|
|
@@ -2687,7 +2687,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
2687
2687
|
}
|
|
2688
2688
|
}
|
|
2689
2689
|
yy296:
|
|
2690
|
-
#line
|
|
2690
|
+
#line 105 "src/lexer.re"
|
|
2691
2691
|
{
|
|
2692
2692
|
return rbs_next_token(lexer, kRETURN);
|
|
2693
2693
|
}
|
|
@@ -2784,6 +2784,7 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
2784
2784
|
rbs_skip(lexer);
|
|
2785
2785
|
yych = rbs_peek(lexer);
|
|
2786
2786
|
if (yych == 'a') goto yy328;
|
|
2787
|
+
if (yych == 's') goto yy329;
|
|
2787
2788
|
goto yy70;
|
|
2788
2789
|
yy311:
|
|
2789
2790
|
rbs_skip(lexer);
|
|
@@ -2805,11 +2806,11 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
2805
2806
|
}
|
|
2806
2807
|
}
|
|
2807
2808
|
yy312:
|
|
2808
|
-
#line
|
|
2809
|
+
#line 89 "src/lexer.re"
|
|
2809
2810
|
{
|
|
2810
2811
|
return rbs_next_token(lexer, kPREPEND);
|
|
2811
2812
|
}
|
|
2812
|
-
#line
|
|
2813
|
+
#line 2579 "src/lexer.c"
|
|
2813
2814
|
yy313:
|
|
2814
2815
|
rbs_skip(lexer);
|
|
2815
2816
|
yych = rbs_peek(lexer);
|
|
@@ -2830,20 +2831,20 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
2830
2831
|
}
|
|
2831
2832
|
}
|
|
2832
2833
|
yy314:
|
|
2833
|
-
#line
|
|
2834
|
+
#line 90 "src/lexer.re"
|
|
2834
2835
|
{
|
|
2835
2836
|
return rbs_next_token(lexer, kPRIVATE);
|
|
2836
2837
|
}
|
|
2837
|
-
#line
|
|
2838
|
+
#line 2602 "src/lexer.c"
|
|
2838
2839
|
yy315:
|
|
2839
2840
|
rbs_skip(lexer);
|
|
2840
2841
|
yych = rbs_peek(lexer);
|
|
2841
|
-
if (yych == 'o') goto
|
|
2842
|
+
if (yych == 'o') goto yy330;
|
|
2842
2843
|
goto yy54;
|
|
2843
2844
|
yy316:
|
|
2844
2845
|
rbs_skip(lexer);
|
|
2845
2846
|
yych = rbs_peek(lexer);
|
|
2846
|
-
if (yych == 'e') goto
|
|
2847
|
+
if (yych == 'e') goto yy331;
|
|
2847
2848
|
goto yy54;
|
|
2848
2849
|
yy317:
|
|
2849
2850
|
rbs_skip(lexer);
|
|
@@ -2865,11 +2866,11 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
2865
2866
|
}
|
|
2866
2867
|
}
|
|
2867
2868
|
yy318:
|
|
2868
|
-
#line
|
|
2869
|
+
#line 98 "src/lexer.re"
|
|
2869
2870
|
{
|
|
2870
2871
|
return rbs_next_token(lexer, kUNTYPED);
|
|
2871
2872
|
}
|
|
2872
|
-
#line
|
|
2873
|
+
#line 2635 "src/lexer.c"
|
|
2873
2874
|
yy319:
|
|
2874
2875
|
rbs_skip(lexer);
|
|
2875
2876
|
yych = rbs_peek(lexer);
|
|
@@ -2890,30 +2891,30 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
2890
2891
|
}
|
|
2891
2892
|
}
|
|
2892
2893
|
yy320:
|
|
2893
|
-
#line
|
|
2894
|
+
#line 102 "src/lexer.re"
|
|
2894
2895
|
{
|
|
2895
2896
|
return rbs_next_token(lexer, k__TODO__);
|
|
2896
2897
|
}
|
|
2897
|
-
#line
|
|
2898
|
+
#line 2658 "src/lexer.c"
|
|
2898
2899
|
yy321:
|
|
2899
2900
|
rbs_skip(lexer);
|
|
2900
2901
|
yych = rbs_peek(lexer);
|
|
2901
|
-
if (yych == 'e') goto
|
|
2902
|
+
if (yych == 'e') goto yy332;
|
|
2902
2903
|
goto yy54;
|
|
2903
2904
|
yy322:
|
|
2904
2905
|
rbs_skip(lexer);
|
|
2905
2906
|
yych = rbs_peek(lexer);
|
|
2906
|
-
if (yych == 'd') goto
|
|
2907
|
+
if (yych == 'd') goto yy333;
|
|
2907
2908
|
goto yy54;
|
|
2908
2909
|
yy323:
|
|
2909
2910
|
rbs_skip(lexer);
|
|
2910
2911
|
yych = rbs_peek(lexer);
|
|
2911
|
-
if (yych == 't') goto
|
|
2912
|
+
if (yych == 't') goto yy334;
|
|
2912
2913
|
goto yy54;
|
|
2913
2914
|
yy324:
|
|
2914
2915
|
rbs_skip(lexer);
|
|
2915
2916
|
yych = rbs_peek(lexer);
|
|
2916
|
-
if (yych == 'i') goto
|
|
2917
|
+
if (yych == 'i') goto yy335;
|
|
2917
2918
|
goto yy70;
|
|
2918
2919
|
yy325:
|
|
2919
2920
|
rbs_skip(lexer);
|
|
@@ -2939,48 +2940,53 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
2939
2940
|
{
|
|
2940
2941
|
return rbs_next_token(lexer, kINSTANCE);
|
|
2941
2942
|
}
|
|
2942
|
-
#line
|
|
2943
|
+
#line 2701 "src/lexer.c"
|
|
2943
2944
|
yy327:
|
|
2944
2945
|
rbs_skip(lexer);
|
|
2945
2946
|
yych = rbs_peek(lexer);
|
|
2946
|
-
if (yych == 'e') goto
|
|
2947
|
+
if (yych == 'e') goto yy336;
|
|
2947
2948
|
goto yy54;
|
|
2948
2949
|
yy328:
|
|
2949
2950
|
rbs_skip(lexer);
|
|
2950
2951
|
yych = rbs_peek(lexer);
|
|
2951
|
-
if (yych == 'l') goto
|
|
2952
|
+
if (yych == 'l') goto yy338;
|
|
2952
2953
|
goto yy70;
|
|
2953
2954
|
yy329:
|
|
2954
2955
|
rbs_skip(lexer);
|
|
2955
2956
|
yych = rbs_peek(lexer);
|
|
2956
|
-
if (yych == '
|
|
2957
|
-
goto
|
|
2957
|
+
if (yych == 'e') goto yy339;
|
|
2958
|
+
goto yy70;
|
|
2958
2959
|
yy330:
|
|
2959
2960
|
rbs_skip(lexer);
|
|
2960
2961
|
yych = rbs_peek(lexer);
|
|
2961
|
-
if (yych == '
|
|
2962
|
+
if (yych == 'n') goto yy340;
|
|
2962
2963
|
goto yy54;
|
|
2963
2964
|
yy331:
|
|
2964
2965
|
rbs_skip(lexer);
|
|
2965
2966
|
yych = rbs_peek(lexer);
|
|
2966
|
-
if (yych == '
|
|
2967
|
+
if (yych == 'd') goto yy342;
|
|
2967
2968
|
goto yy54;
|
|
2968
2969
|
yy332:
|
|
2969
2970
|
rbs_skip(lexer);
|
|
2970
2971
|
yych = rbs_peek(lexer);
|
|
2971
|
-
if (yych == '
|
|
2972
|
+
if (yych == 's') goto yy344;
|
|
2972
2973
|
goto yy54;
|
|
2973
2974
|
yy333:
|
|
2974
2975
|
rbs_skip(lexer);
|
|
2975
2976
|
yych = rbs_peek(lexer);
|
|
2976
|
-
if (yych == 'e') goto
|
|
2977
|
+
if (yych == 'e') goto yy345;
|
|
2977
2978
|
goto yy54;
|
|
2978
2979
|
yy334:
|
|
2979
2980
|
rbs_skip(lexer);
|
|
2980
2981
|
yych = rbs_peek(lexer);
|
|
2981
|
-
if (yych == '
|
|
2982
|
-
goto
|
|
2982
|
+
if (yych == 'e') goto yy346;
|
|
2983
|
+
goto yy54;
|
|
2983
2984
|
yy335:
|
|
2985
|
+
rbs_skip(lexer);
|
|
2986
|
+
yych = rbs_peek(lexer);
|
|
2987
|
+
if (yych == 'a') goto yy347;
|
|
2988
|
+
goto yy70;
|
|
2989
|
+
yy336:
|
|
2984
2990
|
rbs_skip(lexer);
|
|
2985
2991
|
yych = rbs_peek(lexer);
|
|
2986
2992
|
if (yych <= '=') {
|
|
@@ -2992,25 +2998,30 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
2992
2998
|
}
|
|
2993
2999
|
} else {
|
|
2994
3000
|
if (yych <= '^') {
|
|
2995
|
-
if (yych <= '@') goto
|
|
3001
|
+
if (yych <= '@') goto yy337;
|
|
2996
3002
|
if (yych <= 'Z') goto yy53;
|
|
2997
3003
|
} else {
|
|
2998
|
-
if (yych == '`') goto
|
|
3004
|
+
if (yych == '`') goto yy337;
|
|
2999
3005
|
if (yych <= 'z') goto yy53;
|
|
3000
3006
|
}
|
|
3001
3007
|
}
|
|
3002
|
-
|
|
3008
|
+
yy337:
|
|
3003
3009
|
#line 83 "src/lexer.re"
|
|
3004
3010
|
{
|
|
3005
3011
|
return rbs_next_token(lexer, kINTERFACE);
|
|
3006
3012
|
}
|
|
3007
|
-
#line
|
|
3008
|
-
|
|
3013
|
+
#line 2769 "src/lexer.c"
|
|
3014
|
+
yy338:
|
|
3009
3015
|
rbs_skip(lexer);
|
|
3010
3016
|
yych = rbs_peek(lexer);
|
|
3011
|
-
if (yych == 'i') goto
|
|
3017
|
+
if (yych == 'i') goto yy348;
|
|
3012
3018
|
goto yy70;
|
|
3013
|
-
|
|
3019
|
+
yy339:
|
|
3020
|
+
rbs_skip(lexer);
|
|
3021
|
+
yych = rbs_peek(lexer);
|
|
3022
|
+
if (yych == 'l') goto yy349;
|
|
3023
|
+
goto yy70;
|
|
3024
|
+
yy340:
|
|
3014
3025
|
rbs_skip(lexer);
|
|
3015
3026
|
yych = rbs_peek(lexer);
|
|
3016
3027
|
if (yych <= '=') {
|
|
@@ -3022,20 +3033,20 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
3022
3033
|
}
|
|
3023
3034
|
} else {
|
|
3024
3035
|
if (yych <= '^') {
|
|
3025
|
-
if (yych <= '@') goto
|
|
3036
|
+
if (yych <= '@') goto yy341;
|
|
3026
3037
|
if (yych <= 'Z') goto yy53;
|
|
3027
3038
|
} else {
|
|
3028
|
-
if (yych == '`') goto
|
|
3039
|
+
if (yych == '`') goto yy341;
|
|
3029
3040
|
if (yych <= 'z') goto yy53;
|
|
3030
3041
|
}
|
|
3031
3042
|
}
|
|
3032
|
-
|
|
3033
|
-
#line
|
|
3043
|
+
yy341:
|
|
3044
|
+
#line 93 "src/lexer.re"
|
|
3034
3045
|
{
|
|
3035
3046
|
return rbs_next_token(lexer, kSINGLETON);
|
|
3036
3047
|
}
|
|
3037
|
-
#line
|
|
3038
|
-
|
|
3048
|
+
#line 2802 "src/lexer.c"
|
|
3049
|
+
yy342:
|
|
3039
3050
|
rbs_skip(lexer);
|
|
3040
3051
|
yych = rbs_peek(lexer);
|
|
3041
3052
|
if (yych <= '=') {
|
|
@@ -3047,50 +3058,55 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
3047
3058
|
}
|
|
3048
3059
|
} else {
|
|
3049
3060
|
if (yych <= '^') {
|
|
3050
|
-
if (yych <= '@') goto
|
|
3061
|
+
if (yych <= '@') goto yy343;
|
|
3051
3062
|
if (yych <= 'Z') goto yy53;
|
|
3052
3063
|
} else {
|
|
3053
|
-
if (yych == '`') goto
|
|
3064
|
+
if (yych == '`') goto yy343;
|
|
3054
3065
|
if (yych <= 'z') goto yy53;
|
|
3055
3066
|
}
|
|
3056
3067
|
}
|
|
3057
|
-
|
|
3058
|
-
#line
|
|
3068
|
+
yy343:
|
|
3069
|
+
#line 97 "src/lexer.re"
|
|
3059
3070
|
{
|
|
3060
3071
|
return rbs_next_token(lexer, kUNCHECKED);
|
|
3061
3072
|
}
|
|
3062
|
-
#line
|
|
3063
|
-
|
|
3073
|
+
#line 2825 "src/lexer.c"
|
|
3074
|
+
yy344:
|
|
3064
3075
|
rbs_skip(lexer);
|
|
3065
3076
|
yych = rbs_peek(lexer);
|
|
3066
|
-
if (yych == 's') goto
|
|
3077
|
+
if (yych == 's') goto yy350;
|
|
3067
3078
|
goto yy54;
|
|
3068
|
-
|
|
3079
|
+
yy345:
|
|
3069
3080
|
rbs_skip(lexer);
|
|
3070
3081
|
yych = rbs_peek(lexer);
|
|
3071
|
-
if (yych == 'r') goto
|
|
3082
|
+
if (yych == 'r') goto yy351;
|
|
3072
3083
|
goto yy54;
|
|
3073
|
-
|
|
3084
|
+
yy346:
|
|
3074
3085
|
rbs_skip(lexer);
|
|
3075
3086
|
yych = rbs_peek(lexer);
|
|
3076
|
-
if (yych == 'r') goto
|
|
3087
|
+
if (yych == 'r') goto yy353;
|
|
3077
3088
|
goto yy54;
|
|
3078
|
-
|
|
3089
|
+
yy347:
|
|
3079
3090
|
rbs_skip(lexer);
|
|
3080
3091
|
yych = rbs_peek(lexer);
|
|
3081
|
-
if (yych == 's') goto
|
|
3092
|
+
if (yych == 's') goto yy355;
|
|
3082
3093
|
goto yy70;
|
|
3083
|
-
|
|
3094
|
+
yy348:
|
|
3084
3095
|
rbs_skip(lexer);
|
|
3085
3096
|
yych = rbs_peek(lexer);
|
|
3086
|
-
if (yych == 'a') goto
|
|
3097
|
+
if (yych == 'a') goto yy356;
|
|
3087
3098
|
goto yy70;
|
|
3088
|
-
|
|
3099
|
+
yy349:
|
|
3100
|
+
rbs_skip(lexer);
|
|
3101
|
+
yych = rbs_peek(lexer);
|
|
3102
|
+
if (yych == 'f') goto yy357;
|
|
3103
|
+
goto yy70;
|
|
3104
|
+
yy350:
|
|
3089
3105
|
rbs_skip(lexer);
|
|
3090
3106
|
yych = rbs_peek(lexer);
|
|
3091
|
-
if (yych == 'o') goto
|
|
3107
|
+
if (yych == 'o') goto yy358;
|
|
3092
3108
|
goto yy54;
|
|
3093
|
-
|
|
3109
|
+
yy351:
|
|
3094
3110
|
rbs_skip(lexer);
|
|
3095
3111
|
yych = rbs_peek(lexer);
|
|
3096
3112
|
if (yych <= '=') {
|
|
@@ -3102,20 +3118,20 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
3102
3118
|
}
|
|
3103
3119
|
} else {
|
|
3104
3120
|
if (yych <= '^') {
|
|
3105
|
-
if (yych <= '@') goto
|
|
3121
|
+
if (yych <= '@') goto yy352;
|
|
3106
3122
|
if (yych <= 'Z') goto yy53;
|
|
3107
3123
|
} else {
|
|
3108
|
-
if (yych == '`') goto
|
|
3124
|
+
if (yych == '`') goto yy352;
|
|
3109
3125
|
if (yych <= 'z') goto yy53;
|
|
3110
3126
|
}
|
|
3111
3127
|
}
|
|
3112
|
-
|
|
3128
|
+
yy352:
|
|
3113
3129
|
#line 70 "src/lexer.re"
|
|
3114
3130
|
{
|
|
3115
3131
|
return rbs_next_token(lexer, kATTRREADER);
|
|
3116
3132
|
}
|
|
3117
|
-
#line
|
|
3118
|
-
|
|
3133
|
+
#line 2883 "src/lexer.c"
|
|
3134
|
+
yy353:
|
|
3119
3135
|
rbs_skip(lexer);
|
|
3120
3136
|
yych = rbs_peek(lexer);
|
|
3121
3137
|
if (yych <= '=') {
|
|
@@ -3127,44 +3143,51 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
3127
3143
|
}
|
|
3128
3144
|
} else {
|
|
3129
3145
|
if (yych <= '^') {
|
|
3130
|
-
if (yych <= '@') goto
|
|
3146
|
+
if (yych <= '@') goto yy354;
|
|
3131
3147
|
if (yych <= 'Z') goto yy53;
|
|
3132
3148
|
} else {
|
|
3133
|
-
if (yych == '`') goto
|
|
3149
|
+
if (yych == '`') goto yy354;
|
|
3134
3150
|
if (yych <= 'z') goto yy53;
|
|
3135
3151
|
}
|
|
3136
3152
|
}
|
|
3137
|
-
|
|
3153
|
+
yy354:
|
|
3138
3154
|
#line 71 "src/lexer.re"
|
|
3139
3155
|
{
|
|
3140
3156
|
return rbs_next_token(lexer, kATTRWRITER);
|
|
3141
3157
|
}
|
|
3142
|
-
#line
|
|
3143
|
-
|
|
3158
|
+
#line 2906 "src/lexer.c"
|
|
3159
|
+
yy355:
|
|
3144
3160
|
rbs_skip(lexer);
|
|
3145
3161
|
#line 75 "src/lexer.re"
|
|
3146
3162
|
{
|
|
3147
3163
|
return rbs_next_token(lexer, kCLASSALIAS);
|
|
3148
3164
|
}
|
|
3149
|
-
#line
|
|
3150
|
-
|
|
3165
|
+
#line 2911 "src/lexer.c"
|
|
3166
|
+
yy356:
|
|
3151
3167
|
rbs_skip(lexer);
|
|
3152
3168
|
yych = rbs_peek(lexer);
|
|
3153
|
-
if (yych == 's') goto
|
|
3169
|
+
if (yych == 's') goto yy359;
|
|
3154
3170
|
goto yy70;
|
|
3155
|
-
|
|
3171
|
+
yy357:
|
|
3172
|
+
rbs_skip(lexer);
|
|
3173
|
+
#line 86 "src/lexer.re"
|
|
3174
|
+
{
|
|
3175
|
+
return rbs_next_token(lexer, kMODULESELF);
|
|
3176
|
+
}
|
|
3177
|
+
#line 2921 "src/lexer.c"
|
|
3178
|
+
yy358:
|
|
3156
3179
|
rbs_skip(lexer);
|
|
3157
3180
|
yych = rbs_peek(lexer);
|
|
3158
|
-
if (yych == 'r') goto
|
|
3181
|
+
if (yych == 'r') goto yy360;
|
|
3159
3182
|
goto yy54;
|
|
3160
|
-
|
|
3183
|
+
yy359:
|
|
3161
3184
|
rbs_skip(lexer);
|
|
3162
3185
|
#line 85 "src/lexer.re"
|
|
3163
3186
|
{
|
|
3164
3187
|
return rbs_next_token(lexer, kMODULEALIAS);
|
|
3165
3188
|
}
|
|
3166
|
-
#line
|
|
3167
|
-
|
|
3189
|
+
#line 2931 "src/lexer.c"
|
|
3190
|
+
yy360:
|
|
3168
3191
|
rbs_skip(lexer);
|
|
3169
3192
|
yych = rbs_peek(lexer);
|
|
3170
3193
|
if (yych <= '=') {
|
|
@@ -3176,19 +3199,19 @@ rbs_token_t rbs_lexer_next_token(rbs_lexer_t *lexer) {
|
|
|
3176
3199
|
}
|
|
3177
3200
|
} else {
|
|
3178
3201
|
if (yych <= '^') {
|
|
3179
|
-
if (yych <= '@') goto
|
|
3202
|
+
if (yych <= '@') goto yy361;
|
|
3180
3203
|
if (yych <= 'Z') goto yy53;
|
|
3181
3204
|
} else {
|
|
3182
|
-
if (yych == '`') goto
|
|
3205
|
+
if (yych == '`') goto yy361;
|
|
3183
3206
|
if (yych <= 'z') goto yy53;
|
|
3184
3207
|
}
|
|
3185
3208
|
}
|
|
3186
|
-
|
|
3209
|
+
yy361:
|
|
3187
3210
|
#line 69 "src/lexer.re"
|
|
3188
3211
|
{
|
|
3189
3212
|
return rbs_next_token(lexer, kATTRACCESSOR);
|
|
3190
3213
|
}
|
|
3191
|
-
#line
|
|
3214
|
+
#line 2954 "src/lexer.c"
|
|
3192
3215
|
}
|
|
3193
|
-
#line
|
|
3216
|
+
#line 154 "src/lexer.re"
|
|
3194
3217
|
}
|