rbs 0.14.0 → 0.15.0
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/CHANGELOG.md +11 -0
- data/docs/syntax.md +50 -6
- data/lib/rbs/definition_builder.rb +2 -2
- data/lib/rbs/parser.rb +98 -96
- data/lib/rbs/parser.y +3 -1
- data/lib/rbs/prototype/rb.rb +38 -6
- data/lib/rbs/prototype/runtime.rb +17 -7
- data/lib/rbs/test/hook.rb +2 -0
- data/lib/rbs/test/tester.rb +4 -1
- data/lib/rbs/test/type_check.rb +10 -4
- data/lib/rbs/version.rb +1 -1
- data/sig/constant_table.rbs +1 -1
- data/sig/declarations.rbs +1 -1
- data/sig/definition.rbs +1 -1
- data/sig/environment_loader.rbs +3 -3
- data/sig/members.rbs +2 -2
- data/sig/method_types.rbs +1 -1
- data/sig/namespace.rbs +1 -1
- data/stdlib/base64/base64.rbs +1 -1
- data/stdlib/builtin/array.rbs +124 -120
- data/stdlib/builtin/builtin.rbs +28 -0
- data/stdlib/builtin/enumerable.rbs +26 -20
- data/stdlib/builtin/errors.rbs +1 -1
- data/stdlib/builtin/gc.rbs +2 -2
- data/stdlib/builtin/hash.rbs +7 -7
- data/stdlib/builtin/io.rbs +5 -5
- data/stdlib/builtin/kernel.rbs +1 -85
- data/stdlib/builtin/module.rbs +13 -13
- data/stdlib/builtin/object.rbs +1 -1
- data/stdlib/builtin/random.rbs +1 -1
- data/stdlib/builtin/range.rbs +2 -2
- data/stdlib/builtin/string.rbs +6 -6
- data/stdlib/builtin/string_io.rbs +7 -7
- data/stdlib/builtin/struct.rbs +1 -1
- data/stdlib/builtin/symbol.rbs +1 -1
- data/stdlib/builtin/thread.rbs +4 -4
- data/stdlib/builtin/true_class.rbs +1 -1
- data/stdlib/coverage/coverage.rbs +2 -2
- data/stdlib/csv/csv.rbs +1 -1
- data/stdlib/date/date.rbs +2 -2
- data/stdlib/date/date_time.rbs +1 -1
- data/stdlib/find/find.rbs +2 -2
- data/stdlib/logger/log_device.rbs +1 -1
- data/stdlib/logger/logger.rbs +1 -1
- data/stdlib/pathname/pathname.rbs +39 -39
- data/stdlib/pstore/pstore.rbs +287 -0
- data/stdlib/pty/pty.rbs +1 -1
- data/stdlib/uri/generic.rbs +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5348f41dbf169228104d4ba79ad88098ec3e8e83656b48b0b1c5877fab2e8cb7
|
4
|
+
data.tar.gz: c79ce48144a85642f974b0973e22f8ed97a072d98ce98e2b62aebf639c8d04f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efb99d0e6476b83dbd1994a71526adab4b5b6aab2fc231a1685407739bb9a3e2f1268fb3effcbe701fa033608a0b872fd3f0011d046c599457bf47a3c3fcdb97
|
7
|
+
data.tar.gz: 87d13112f6abce7b7ead4e95302978d17c7c08eaf94485bf27c00c5d91e08f8c10458344661b73d518caff095787323d3694512d76796f2d20da8c2bad2e101f
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,17 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## 0.15.0 (2020-11-2)
|
6
|
+
|
7
|
+
* Signature updates for `Kernel`, `PStore`, `Enumerable`, and `Array` ([#450](https://github.com/ruby/rbs/pull/450), [#443](https://github.com/ruby/rbs/pull/443), [#438](https://github.com/ruby/rbs/pull/438), [#437](https://github.com/ruby/rbs/pull/437), [#433](https://github.com/ruby/rbs/pull/433), [#432](https://github.com/ruby/rbs/pull/432))
|
8
|
+
* Add helper interfaces ([#434](https://github.com/ruby/rbs/pull/434), [#428](https://github.com/ruby/rbs/pull/428))
|
9
|
+
* Change `bool` type semantics ([#456](https://github.com/ruby/rbs/pull/456))
|
10
|
+
* Support alias in `rbs prototype rb` ([#457](https://github.com/ruby/rbs/pull/457))
|
11
|
+
* Runtime testing improvements ([#455](https://github.com/ruby/rbs/pull/455), [#447](https://github.com/ruby/rbs/pull/447), [#444](https://github.com/ruby/rbs/pull/444), [#431](https://github.com/ruby/rbs/pull/431))
|
12
|
+
* Fix proc type parsing ([#451](https://github.com/ruby/rbs/pull/451))
|
13
|
+
* Fix type variable parsing ([#442](https://github.com/ruby/rbs/pull/442))
|
14
|
+
|
15
|
+
|
5
16
|
## 0.14.0 (2020-10-17)
|
6
17
|
|
7
18
|
* Allow keyword names ending with `?` and `!` ([#417](https://github.com/ruby/rbs/pull/417))
|
data/docs/syntax.md
CHANGED
@@ -179,7 +179,7 @@ Proc type denotes type of procedures, `Proc` instances.
|
|
179
179
|
|
180
180
|
`instance` denotes the type of instance of the class. `class` is the singleton of the class.
|
181
181
|
|
182
|
-
`bool` is an
|
182
|
+
`bool` is an alias of `true | false`.
|
183
183
|
|
184
184
|
`untyped` is for _a type without type checking_. It is `?` in gradual typing, _dynamic_ in some languages like C#, and _any_ in TypeScript. It is both subtype _and_ supertype of all of the types. (The type was `any` but renamed to `untyped`.)
|
185
185
|
|
@@ -193,15 +193,34 @@ Proc type denotes type of procedures, `Proc` instances.
|
|
193
193
|
|
194
194
|
We recommend using `nil`.
|
195
195
|
|
196
|
-
#### `bool` or `
|
196
|
+
#### `bool` or `boolish`
|
197
197
|
|
198
|
-
We
|
198
|
+
We have a builtin type alias called `boolish`.
|
199
|
+
It is an alias of `top` type, and you can use `boolish` if we want to allow any object of any type.
|
199
200
|
|
200
|
-
|
201
|
+
We can see an example at the definition of `Enumerable#find`:
|
202
|
+
|
203
|
+
```
|
204
|
+
module Enumerable[Elem, Return]
|
205
|
+
def find: () { (Elem) -> boolish } -> Elem?
|
206
|
+
...
|
207
|
+
end
|
208
|
+
```
|
209
|
+
|
210
|
+
We want to write something like:
|
211
|
+
|
212
|
+
```
|
213
|
+
array.find {|x| x && x.some_test? } # The block will return (bool | nil)
|
214
|
+
```
|
215
|
+
|
216
|
+
We recommend using `boolish` for method arguments and block return values, if you only use the values for conditions.
|
217
|
+
You can write `bool` if you strictly want `true | false`.
|
218
|
+
|
219
|
+
#### `void`, `boolish`, or `top`?
|
201
220
|
|
202
221
|
They are all equivalent for the type system; they are all _top type_.
|
203
222
|
|
204
|
-
`void` tells developers a hint that _the value should not be used_. `
|
223
|
+
`void` tells developers a hint that _the value should not be used_. `boolish` implies the value is used as a truth value. `top` is anything else.
|
205
224
|
|
206
225
|
## Method Types
|
207
226
|
|
@@ -433,8 +452,10 @@ _global-name_ ::= /$[a-zA-Z]\w+/ | ...
|
|
433
452
|
_module-type-parameters_ ::= # Empty
|
434
453
|
| `[` _module-type-parameter_ `,` ... `]`
|
435
454
|
|
436
|
-
_module-type-parameter_ ::= _variance_ _type-variable_
|
455
|
+
_module-type-parameter_ ::= _check_ _variance_ _type-variable_
|
437
456
|
_variance_ ::= `out` | `in`
|
457
|
+
_check_ ::= # Empty
|
458
|
+
| `unchecked`
|
438
459
|
```
|
439
460
|
|
440
461
|
### Class declaration
|
@@ -448,6 +469,29 @@ class Ref[A] < Object
|
|
448
469
|
end
|
449
470
|
```
|
450
471
|
|
472
|
+
For classes with type parameters, you may specify if they are "invariant" (default), "covariant" (`out`) or "contravariant" (`in`). See [this definition of covariance and contravariance](https://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)).
|
473
|
+
|
474
|
+
For example, an `Array` of `String` can almost be considered to be an `Array` of `Object`, but not the reverse, so we can think of:
|
475
|
+
|
476
|
+
```
|
477
|
+
class Array[out T]
|
478
|
+
# ...
|
479
|
+
end
|
480
|
+
```
|
481
|
+
|
482
|
+
There's a limitation with this is for mutable objects (like arrays): a mutation could invalidate this.
|
483
|
+
If an array of String is passed to a method as an array of Objects, and that method adds an Integer to the array, the promise is broken.
|
484
|
+
|
485
|
+
In those cases, one must use the `unchecked` keyword:
|
486
|
+
|
487
|
+
```
|
488
|
+
class Array[unchecked out T]
|
489
|
+
# ...
|
490
|
+
end
|
491
|
+
```
|
492
|
+
|
493
|
+
This is how `Array` is actually defined in RBS.
|
494
|
+
|
451
495
|
### Module declaration
|
452
496
|
|
453
497
|
Module declaration takes optional _self type_ parameter, which defines a constraint about a class when the module is mixed.
|
@@ -940,8 +940,8 @@ module RBS
|
|
940
940
|
Definition::Method::TypeDef.new(
|
941
941
|
type: method_type,
|
942
942
|
member: initialize_def.member,
|
943
|
-
defined_in:
|
944
|
-
implemented_in:
|
943
|
+
defined_in: initialize_def.defined_in,
|
944
|
+
implemented_in: initialize_def.implemented_in
|
945
945
|
)
|
946
946
|
end,
|
947
947
|
accessibility: :public,
|
data/lib/rbs/parser.rb
CHANGED
@@ -8,7 +8,7 @@ require 'racc/parser.rb'
|
|
8
8
|
module RBS
|
9
9
|
class Parser < Racc::Parser
|
10
10
|
|
11
|
-
module_eval(<<'...end parser.y/module_eval...', 'parser.y',
|
11
|
+
module_eval(<<'...end parser.y/module_eval...', 'parser.y', 1044)
|
12
12
|
|
13
13
|
Types = RBS::Types
|
14
14
|
Namespace = RBS::Namespace
|
@@ -2067,7 +2067,9 @@ module_eval(<<'.,.,', 'parser.y', 472)
|
|
2067
2067
|
|
2068
2068
|
module_eval(<<'.,.,', 'parser.y', 477)
|
2069
2069
|
def _reduce_81(val, _values, result)
|
2070
|
-
|
2070
|
+
reset_variable_scope
|
2071
|
+
|
2072
|
+
location = (val[1] || val[2] || val[3] || val[4]).location + val[5].location
|
2071
2073
|
type_params = val[1]&.value || []
|
2072
2074
|
|
2073
2075
|
params = val[2]&.value || empty_params_result
|
@@ -2094,14 +2096,14 @@ module_eval(<<'.,.,', 'parser.y', 477)
|
|
2094
2096
|
end
|
2095
2097
|
.,.,
|
2096
2098
|
|
2097
|
-
module_eval(<<'.,.,', 'parser.y',
|
2099
|
+
module_eval(<<'.,.,', 'parser.y', 504)
|
2098
2100
|
def _reduce_82(val, _values, result)
|
2099
2101
|
result = nil
|
2100
2102
|
result
|
2101
2103
|
end
|
2102
2104
|
.,.,
|
2103
2105
|
|
2104
|
-
module_eval(<<'.,.,', 'parser.y',
|
2106
|
+
module_eval(<<'.,.,', 'parser.y', 506)
|
2105
2107
|
def _reduce_83(val, _values, result)
|
2106
2108
|
result = LocatedValue.new(value: val[1], location: val[0].location + val[2].location)
|
2107
2109
|
|
@@ -2109,14 +2111,14 @@ module_eval(<<'.,.,', 'parser.y', 504)
|
|
2109
2111
|
end
|
2110
2112
|
.,.,
|
2111
2113
|
|
2112
|
-
module_eval(<<'.,.,', 'parser.y',
|
2114
|
+
module_eval(<<'.,.,', 'parser.y', 510)
|
2113
2115
|
def _reduce_84(val, _values, result)
|
2114
2116
|
result = nil
|
2115
2117
|
result
|
2116
2118
|
end
|
2117
2119
|
.,.,
|
2118
2120
|
|
2119
|
-
module_eval(<<'.,.,', 'parser.y',
|
2121
|
+
module_eval(<<'.,.,', 'parser.y', 512)
|
2120
2122
|
def _reduce_85(val, _values, result)
|
2121
2123
|
block = MethodType::Block.new(type: val[1].value, required: true)
|
2122
2124
|
result = LocatedValue.new(value: block, location: val[0].location + val[2].location)
|
@@ -2125,7 +2127,7 @@ module_eval(<<'.,.,', 'parser.y', 510)
|
|
2125
2127
|
end
|
2126
2128
|
.,.,
|
2127
2129
|
|
2128
|
-
module_eval(<<'.,.,', 'parser.y',
|
2130
|
+
module_eval(<<'.,.,', 'parser.y', 516)
|
2129
2131
|
def _reduce_86(val, _values, result)
|
2130
2132
|
block = MethodType::Block.new(type: val[2].value, required: false)
|
2131
2133
|
result = LocatedValue.new(value: block, location: val[0].location + val[3].location)
|
@@ -2136,7 +2138,7 @@ module_eval(<<'.,.,', 'parser.y', 514)
|
|
2136
2138
|
|
2137
2139
|
# reduce 87 omitted
|
2138
2140
|
|
2139
|
-
module_eval(<<'.,.,', 'parser.y',
|
2141
|
+
module_eval(<<'.,.,', 'parser.y', 523)
|
2140
2142
|
def _reduce_88(val, _values, result)
|
2141
2143
|
result = LocatedValue.new(value: val[0].value.to_sym,
|
2142
2144
|
location: val[0].location + val[1].location)
|
@@ -2163,7 +2165,7 @@ module_eval(<<'.,.,', 'parser.y', 521)
|
|
2163
2165
|
|
2164
2166
|
# reduce 97 omitted
|
2165
2167
|
|
2166
|
-
module_eval(<<'.,.,', 'parser.y',
|
2168
|
+
module_eval(<<'.,.,', 'parser.y', 532)
|
2167
2169
|
def _reduce_98(val, _values, result)
|
2168
2170
|
unless val[0].location.pred?(val[1].location)
|
2169
2171
|
raise SyntaxError.new(token_str: "kQUESTION", error_value: val[1])
|
@@ -2176,7 +2178,7 @@ module_eval(<<'.,.,', 'parser.y', 530)
|
|
2176
2178
|
end
|
2177
2179
|
.,.,
|
2178
2180
|
|
2179
|
-
module_eval(<<'.,.,', 'parser.y',
|
2181
|
+
module_eval(<<'.,.,', 'parser.y', 540)
|
2180
2182
|
def _reduce_99(val, _values, result)
|
2181
2183
|
unless val[0].location.pred?(val[1].location)
|
2182
2184
|
raise SyntaxError.new(token_str: "kEXCLAMATION", error_value: val[1])
|
@@ -2269,14 +2271,14 @@ module_eval(<<'.,.,', 'parser.y', 538)
|
|
2269
2271
|
|
2270
2272
|
# reduce 139 omitted
|
2271
2273
|
|
2272
|
-
module_eval(<<'.,.,', 'parser.y',
|
2274
|
+
module_eval(<<'.,.,', 'parser.y', 560)
|
2273
2275
|
def _reduce_140(val, _values, result)
|
2274
2276
|
result = nil
|
2275
2277
|
result
|
2276
2278
|
end
|
2277
2279
|
.,.,
|
2278
2280
|
|
2279
|
-
module_eval(<<'.,.,', 'parser.y',
|
2281
|
+
module_eval(<<'.,.,', 'parser.y', 562)
|
2280
2282
|
def _reduce_141(val, _values, result)
|
2281
2283
|
val[1].each {|p| insert_bound_variable(p.name) }
|
2282
2284
|
|
@@ -2286,7 +2288,7 @@ module_eval(<<'.,.,', 'parser.y', 560)
|
|
2286
2288
|
end
|
2287
2289
|
.,.,
|
2288
2290
|
|
2289
|
-
module_eval(<<'.,.,', 'parser.y',
|
2291
|
+
module_eval(<<'.,.,', 'parser.y', 569)
|
2290
2292
|
def _reduce_142(val, _values, result)
|
2291
2293
|
result = Declarations::ModuleTypeParams.new()
|
2292
2294
|
result.add(val[0])
|
@@ -2295,7 +2297,7 @@ module_eval(<<'.,.,', 'parser.y', 567)
|
|
2295
2297
|
end
|
2296
2298
|
.,.,
|
2297
2299
|
|
2298
|
-
module_eval(<<'.,.,', 'parser.y',
|
2300
|
+
module_eval(<<'.,.,', 'parser.y', 573)
|
2299
2301
|
def _reduce_143(val, _values, result)
|
2300
2302
|
result = val[0].add(val[2])
|
2301
2303
|
|
@@ -2303,7 +2305,7 @@ module_eval(<<'.,.,', 'parser.y', 571)
|
|
2303
2305
|
end
|
2304
2306
|
.,.,
|
2305
2307
|
|
2306
|
-
module_eval(<<'.,.,', 'parser.y',
|
2308
|
+
module_eval(<<'.,.,', 'parser.y', 578)
|
2307
2309
|
def _reduce_144(val, _values, result)
|
2308
2310
|
result = Declarations::ModuleTypeParams::TypeParam.new(name: val[2].value.to_sym,
|
2309
2311
|
variance: val[1],
|
@@ -2313,49 +2315,49 @@ module_eval(<<'.,.,', 'parser.y', 576)
|
|
2313
2315
|
end
|
2314
2316
|
.,.,
|
2315
2317
|
|
2316
|
-
module_eval(<<'.,.,', 'parser.y',
|
2318
|
+
module_eval(<<'.,.,', 'parser.y', 584)
|
2317
2319
|
def _reduce_145(val, _values, result)
|
2318
2320
|
result = :invariant
|
2319
2321
|
result
|
2320
2322
|
end
|
2321
2323
|
.,.,
|
2322
2324
|
|
2323
|
-
module_eval(<<'.,.,', 'parser.y',
|
2325
|
+
module_eval(<<'.,.,', 'parser.y', 585)
|
2324
2326
|
def _reduce_146(val, _values, result)
|
2325
2327
|
result = :covariant
|
2326
2328
|
result
|
2327
2329
|
end
|
2328
2330
|
.,.,
|
2329
2331
|
|
2330
|
-
module_eval(<<'.,.,', 'parser.y',
|
2332
|
+
module_eval(<<'.,.,', 'parser.y', 586)
|
2331
2333
|
def _reduce_147(val, _values, result)
|
2332
2334
|
result = :contravariant
|
2333
2335
|
result
|
2334
2336
|
end
|
2335
2337
|
.,.,
|
2336
2338
|
|
2337
|
-
module_eval(<<'.,.,', 'parser.y',
|
2339
|
+
module_eval(<<'.,.,', 'parser.y', 589)
|
2338
2340
|
def _reduce_148(val, _values, result)
|
2339
2341
|
result = false
|
2340
2342
|
result
|
2341
2343
|
end
|
2342
2344
|
.,.,
|
2343
2345
|
|
2344
|
-
module_eval(<<'.,.,', 'parser.y',
|
2346
|
+
module_eval(<<'.,.,', 'parser.y', 590)
|
2345
2347
|
def _reduce_149(val, _values, result)
|
2346
2348
|
result = true
|
2347
2349
|
result
|
2348
2350
|
end
|
2349
2351
|
.,.,
|
2350
2352
|
|
2351
|
-
module_eval(<<'.,.,', 'parser.y',
|
2353
|
+
module_eval(<<'.,.,', 'parser.y', 593)
|
2352
2354
|
def _reduce_150(val, _values, result)
|
2353
2355
|
result = nil
|
2354
2356
|
result
|
2355
2357
|
end
|
2356
2358
|
.,.,
|
2357
2359
|
|
2358
|
-
module_eval(<<'.,.,', 'parser.y',
|
2360
|
+
module_eval(<<'.,.,', 'parser.y', 595)
|
2359
2361
|
def _reduce_151(val, _values, result)
|
2360
2362
|
val[1].each {|var| insert_bound_variable(var) }
|
2361
2363
|
|
@@ -2366,7 +2368,7 @@ module_eval(<<'.,.,', 'parser.y', 593)
|
|
2366
2368
|
end
|
2367
2369
|
.,.,
|
2368
2370
|
|
2369
|
-
module_eval(<<'.,.,', 'parser.y',
|
2371
|
+
module_eval(<<'.,.,', 'parser.y', 603)
|
2370
2372
|
def _reduce_152(val, _values, result)
|
2371
2373
|
result = [val[0].value.to_sym]
|
2372
2374
|
|
@@ -2374,7 +2376,7 @@ module_eval(<<'.,.,', 'parser.y', 601)
|
|
2374
2376
|
end
|
2375
2377
|
.,.,
|
2376
2378
|
|
2377
|
-
module_eval(<<'.,.,', 'parser.y',
|
2379
|
+
module_eval(<<'.,.,', 'parser.y', 606)
|
2378
2380
|
def _reduce_153(val, _values, result)
|
2379
2381
|
result = val[0].push(val[2].value.to_sym)
|
2380
2382
|
|
@@ -2382,7 +2384,7 @@ module_eval(<<'.,.,', 'parser.y', 604)
|
|
2382
2384
|
end
|
2383
2385
|
.,.,
|
2384
2386
|
|
2385
|
-
module_eval(<<'.,.,', 'parser.y',
|
2387
|
+
module_eval(<<'.,.,', 'parser.y', 611)
|
2386
2388
|
def _reduce_154(val, _values, result)
|
2387
2389
|
location = val[1].location + val[3].location
|
2388
2390
|
result = Members::Alias.new(
|
@@ -2398,7 +2400,7 @@ module_eval(<<'.,.,', 'parser.y', 609)
|
|
2398
2400
|
end
|
2399
2401
|
.,.,
|
2400
2402
|
|
2401
|
-
module_eval(<<'.,.,', 'parser.y',
|
2403
|
+
module_eval(<<'.,.,', 'parser.y', 622)
|
2402
2404
|
def _reduce_155(val, _values, result)
|
2403
2405
|
location = val[1].location + val[7].location
|
2404
2406
|
result = Members::Alias.new(
|
@@ -2414,7 +2416,7 @@ module_eval(<<'.,.,', 'parser.y', 620)
|
|
2414
2416
|
end
|
2415
2417
|
.,.,
|
2416
2418
|
|
2417
|
-
module_eval(<<'.,.,', 'parser.y',
|
2419
|
+
module_eval(<<'.,.,', 'parser.y', 635)
|
2418
2420
|
def _reduce_156(val, _values, result)
|
2419
2421
|
location = val[1].location + val[4].location
|
2420
2422
|
result = Declarations::Alias.new(name: val[2].value,
|
@@ -2427,7 +2429,7 @@ module_eval(<<'.,.,', 'parser.y', 633)
|
|
2427
2429
|
end
|
2428
2430
|
.,.,
|
2429
2431
|
|
2430
|
-
module_eval(<<'.,.,', 'parser.y',
|
2432
|
+
module_eval(<<'.,.,', 'parser.y', 645)
|
2431
2433
|
def _reduce_157(val, _values, result)
|
2432
2434
|
location = val[0].location + val[2].location
|
2433
2435
|
result = Declarations::Constant.new(name: val[0].value,
|
@@ -2439,7 +2441,7 @@ module_eval(<<'.,.,', 'parser.y', 643)
|
|
2439
2441
|
end
|
2440
2442
|
.,.,
|
2441
2443
|
|
2442
|
-
module_eval(<<'.,.,', 'parser.y',
|
2444
|
+
module_eval(<<'.,.,', 'parser.y', 652)
|
2443
2445
|
def _reduce_158(val, _values, result)
|
2444
2446
|
location = (val[0] || val[1]).location + val[2].location
|
2445
2447
|
name = TypeName.new(name: val[1].value, namespace: val[0]&.value || Namespace.empty)
|
@@ -2452,7 +2454,7 @@ module_eval(<<'.,.,', 'parser.y', 650)
|
|
2452
2454
|
end
|
2453
2455
|
.,.,
|
2454
2456
|
|
2455
|
-
module_eval(<<'.,.,', 'parser.y',
|
2457
|
+
module_eval(<<'.,.,', 'parser.y', 662)
|
2456
2458
|
def _reduce_159(val, _values, result)
|
2457
2459
|
location = val[0].location + val[2].location
|
2458
2460
|
result = Declarations::Global.new(name: val[0].value.to_sym,
|
@@ -2466,7 +2468,7 @@ module_eval(<<'.,.,', 'parser.y', 660)
|
|
2466
2468
|
|
2467
2469
|
# reduce 160 omitted
|
2468
2470
|
|
2469
|
-
module_eval(<<'.,.,', 'parser.y',
|
2471
|
+
module_eval(<<'.,.,', 'parser.y', 672)
|
2470
2472
|
def _reduce_161(val, _values, result)
|
2471
2473
|
types = case l = val[0]
|
2472
2474
|
when Types::Union
|
@@ -2481,7 +2483,7 @@ module_eval(<<'.,.,', 'parser.y', 670)
|
|
2481
2483
|
end
|
2482
2484
|
.,.,
|
2483
2485
|
|
2484
|
-
module_eval(<<'.,.,', 'parser.y',
|
2486
|
+
module_eval(<<'.,.,', 'parser.y', 682)
|
2485
2487
|
def _reduce_162(val, _values, result)
|
2486
2488
|
types = case l = val[0]
|
2487
2489
|
when Types::Intersection
|
@@ -2497,7 +2499,7 @@ module_eval(<<'.,.,', 'parser.y', 680)
|
|
2497
2499
|
end
|
2498
2500
|
.,.,
|
2499
2501
|
|
2500
|
-
module_eval(<<'.,.,', 'parser.y',
|
2502
|
+
module_eval(<<'.,.,', 'parser.y', 695)
|
2501
2503
|
def _reduce_163(val, _values, result)
|
2502
2504
|
result = Types::Bases::Void.new(location: val[0].location)
|
2503
2505
|
|
@@ -2505,7 +2507,7 @@ module_eval(<<'.,.,', 'parser.y', 693)
|
|
2505
2507
|
end
|
2506
2508
|
.,.,
|
2507
2509
|
|
2508
|
-
module_eval(<<'.,.,', 'parser.y',
|
2510
|
+
module_eval(<<'.,.,', 'parser.y', 698)
|
2509
2511
|
def _reduce_164(val, _values, result)
|
2510
2512
|
RBS.logger.warn "`any` type is deprecated. Use `untyped` instead. (#{val[0].location.to_s})"
|
2511
2513
|
result = Types::Bases::Any.new(location: val[0].location)
|
@@ -2514,7 +2516,7 @@ module_eval(<<'.,.,', 'parser.y', 696)
|
|
2514
2516
|
end
|
2515
2517
|
.,.,
|
2516
2518
|
|
2517
|
-
module_eval(<<'.,.,', 'parser.y',
|
2519
|
+
module_eval(<<'.,.,', 'parser.y', 702)
|
2518
2520
|
def _reduce_165(val, _values, result)
|
2519
2521
|
result = Types::Bases::Any.new(location: val[0].location)
|
2520
2522
|
|
@@ -2522,7 +2524,7 @@ module_eval(<<'.,.,', 'parser.y', 700)
|
|
2522
2524
|
end
|
2523
2525
|
.,.,
|
2524
2526
|
|
2525
|
-
module_eval(<<'.,.,', 'parser.y',
|
2527
|
+
module_eval(<<'.,.,', 'parser.y', 705)
|
2526
2528
|
def _reduce_166(val, _values, result)
|
2527
2529
|
result = Types::Bases::Bool.new(location: val[0].location)
|
2528
2530
|
|
@@ -2530,7 +2532,7 @@ module_eval(<<'.,.,', 'parser.y', 703)
|
|
2530
2532
|
end
|
2531
2533
|
.,.,
|
2532
2534
|
|
2533
|
-
module_eval(<<'.,.,', 'parser.y',
|
2535
|
+
module_eval(<<'.,.,', 'parser.y', 708)
|
2534
2536
|
def _reduce_167(val, _values, result)
|
2535
2537
|
result = Types::Bases::Nil.new(location: val[0].location)
|
2536
2538
|
|
@@ -2538,7 +2540,7 @@ module_eval(<<'.,.,', 'parser.y', 706)
|
|
2538
2540
|
end
|
2539
2541
|
.,.,
|
2540
2542
|
|
2541
|
-
module_eval(<<'.,.,', 'parser.y',
|
2543
|
+
module_eval(<<'.,.,', 'parser.y', 711)
|
2542
2544
|
def _reduce_168(val, _values, result)
|
2543
2545
|
result = Types::Bases::Top.new(location: val[0].location)
|
2544
2546
|
|
@@ -2546,7 +2548,7 @@ module_eval(<<'.,.,', 'parser.y', 709)
|
|
2546
2548
|
end
|
2547
2549
|
.,.,
|
2548
2550
|
|
2549
|
-
module_eval(<<'.,.,', 'parser.y',
|
2551
|
+
module_eval(<<'.,.,', 'parser.y', 714)
|
2550
2552
|
def _reduce_169(val, _values, result)
|
2551
2553
|
result = Types::Bases::Bottom.new(location: val[0].location)
|
2552
2554
|
|
@@ -2554,7 +2556,7 @@ module_eval(<<'.,.,', 'parser.y', 712)
|
|
2554
2556
|
end
|
2555
2557
|
.,.,
|
2556
2558
|
|
2557
|
-
module_eval(<<'.,.,', 'parser.y',
|
2559
|
+
module_eval(<<'.,.,', 'parser.y', 717)
|
2558
2560
|
def _reduce_170(val, _values, result)
|
2559
2561
|
result = Types::Bases::Self.new(location: val[0].location)
|
2560
2562
|
|
@@ -2562,7 +2564,7 @@ module_eval(<<'.,.,', 'parser.y', 715)
|
|
2562
2564
|
end
|
2563
2565
|
.,.,
|
2564
2566
|
|
2565
|
-
module_eval(<<'.,.,', 'parser.y',
|
2567
|
+
module_eval(<<'.,.,', 'parser.y', 720)
|
2566
2568
|
def _reduce_171(val, _values, result)
|
2567
2569
|
result = Types::Optional.new(type: Types::Bases::Self.new(location: val[0].location),
|
2568
2570
|
location: val[0].location)
|
@@ -2571,7 +2573,7 @@ module_eval(<<'.,.,', 'parser.y', 718)
|
|
2571
2573
|
end
|
2572
2574
|
.,.,
|
2573
2575
|
|
2574
|
-
module_eval(<<'.,.,', 'parser.y',
|
2576
|
+
module_eval(<<'.,.,', 'parser.y', 724)
|
2575
2577
|
def _reduce_172(val, _values, result)
|
2576
2578
|
result = Types::Bases::Instance.new(location: val[0].location)
|
2577
2579
|
|
@@ -2579,7 +2581,7 @@ module_eval(<<'.,.,', 'parser.y', 722)
|
|
2579
2581
|
end
|
2580
2582
|
.,.,
|
2581
2583
|
|
2582
|
-
module_eval(<<'.,.,', 'parser.y',
|
2584
|
+
module_eval(<<'.,.,', 'parser.y', 727)
|
2583
2585
|
def _reduce_173(val, _values, result)
|
2584
2586
|
result = Types::Bases::Class.new(location: val[0].location)
|
2585
2587
|
|
@@ -2587,7 +2589,7 @@ module_eval(<<'.,.,', 'parser.y', 725)
|
|
2587
2589
|
end
|
2588
2590
|
.,.,
|
2589
2591
|
|
2590
|
-
module_eval(<<'.,.,', 'parser.y',
|
2592
|
+
module_eval(<<'.,.,', 'parser.y', 730)
|
2591
2593
|
def _reduce_174(val, _values, result)
|
2592
2594
|
result = Types::Literal.new(literal: true, location: val[0].location)
|
2593
2595
|
|
@@ -2595,7 +2597,7 @@ module_eval(<<'.,.,', 'parser.y', 728)
|
|
2595
2597
|
end
|
2596
2598
|
.,.,
|
2597
2599
|
|
2598
|
-
module_eval(<<'.,.,', 'parser.y',
|
2600
|
+
module_eval(<<'.,.,', 'parser.y', 733)
|
2599
2601
|
def _reduce_175(val, _values, result)
|
2600
2602
|
result = Types::Literal.new(literal: false, location: val[0].location)
|
2601
2603
|
|
@@ -2603,7 +2605,7 @@ module_eval(<<'.,.,', 'parser.y', 731)
|
|
2603
2605
|
end
|
2604
2606
|
.,.,
|
2605
2607
|
|
2606
|
-
module_eval(<<'.,.,', 'parser.y',
|
2608
|
+
module_eval(<<'.,.,', 'parser.y', 736)
|
2607
2609
|
def _reduce_176(val, _values, result)
|
2608
2610
|
result = Types::Literal.new(literal: val[0].value, location: val[0].location)
|
2609
2611
|
|
@@ -2611,7 +2613,7 @@ module_eval(<<'.,.,', 'parser.y', 734)
|
|
2611
2613
|
end
|
2612
2614
|
.,.,
|
2613
2615
|
|
2614
|
-
module_eval(<<'.,.,', 'parser.y',
|
2616
|
+
module_eval(<<'.,.,', 'parser.y', 739)
|
2615
2617
|
def _reduce_177(val, _values, result)
|
2616
2618
|
result = Types::Literal.new(literal: val[0].value, location: val[0].location)
|
2617
2619
|
|
@@ -2619,7 +2621,7 @@ module_eval(<<'.,.,', 'parser.y', 737)
|
|
2619
2621
|
end
|
2620
2622
|
.,.,
|
2621
2623
|
|
2622
|
-
module_eval(<<'.,.,', 'parser.y',
|
2624
|
+
module_eval(<<'.,.,', 'parser.y', 742)
|
2623
2625
|
def _reduce_178(val, _values, result)
|
2624
2626
|
result = Types::Literal.new(literal: val[0].value, location: val[0].location)
|
2625
2627
|
|
@@ -2627,7 +2629,7 @@ module_eval(<<'.,.,', 'parser.y', 740)
|
|
2627
2629
|
end
|
2628
2630
|
.,.,
|
2629
2631
|
|
2630
|
-
module_eval(<<'.,.,', 'parser.y',
|
2632
|
+
module_eval(<<'.,.,', 'parser.y', 745)
|
2631
2633
|
def _reduce_179(val, _values, result)
|
2632
2634
|
name = val[0].value
|
2633
2635
|
args = []
|
@@ -2650,7 +2652,7 @@ module_eval(<<'.,.,', 'parser.y', 743)
|
|
2650
2652
|
end
|
2651
2653
|
.,.,
|
2652
2654
|
|
2653
|
-
module_eval(<<'.,.,', 'parser.y',
|
2655
|
+
module_eval(<<'.,.,', 'parser.y', 763)
|
2654
2656
|
def _reduce_180(val, _values, result)
|
2655
2657
|
name = val[0].value
|
2656
2658
|
args = val[2]
|
@@ -2672,7 +2674,7 @@ module_eval(<<'.,.,', 'parser.y', 761)
|
|
2672
2674
|
end
|
2673
2675
|
.,.,
|
2674
2676
|
|
2675
|
-
module_eval(<<'.,.,', 'parser.y',
|
2677
|
+
module_eval(<<'.,.,', 'parser.y', 780)
|
2676
2678
|
def _reduce_181(val, _values, result)
|
2677
2679
|
location = val[0].location + val[1].location
|
2678
2680
|
result = Types::Tuple.new(types: [], location: location)
|
@@ -2681,7 +2683,7 @@ module_eval(<<'.,.,', 'parser.y', 778)
|
|
2681
2683
|
end
|
2682
2684
|
.,.,
|
2683
2685
|
|
2684
|
-
module_eval(<<'.,.,', 'parser.y',
|
2686
|
+
module_eval(<<'.,.,', 'parser.y', 784)
|
2685
2687
|
def _reduce_182(val, _values, result)
|
2686
2688
|
location = val[0].location + val[2].location
|
2687
2689
|
types = val[1]
|
@@ -2691,7 +2693,7 @@ module_eval(<<'.,.,', 'parser.y', 782)
|
|
2691
2693
|
end
|
2692
2694
|
.,.,
|
2693
2695
|
|
2694
|
-
module_eval(<<'.,.,', 'parser.y',
|
2696
|
+
module_eval(<<'.,.,', 'parser.y', 789)
|
2695
2697
|
def _reduce_183(val, _values, result)
|
2696
2698
|
type = val[1].dup
|
2697
2699
|
type.instance_eval do
|
@@ -2703,7 +2705,7 @@ module_eval(<<'.,.,', 'parser.y', 787)
|
|
2703
2705
|
end
|
2704
2706
|
.,.,
|
2705
2707
|
|
2706
|
-
module_eval(<<'.,.,', 'parser.y',
|
2708
|
+
module_eval(<<'.,.,', 'parser.y', 796)
|
2707
2709
|
def _reduce_184(val, _values, result)
|
2708
2710
|
result = Types::ClassSingleton.new(name: val[2].value,
|
2709
2711
|
location: val[0].location + val[3].location)
|
@@ -2712,7 +2714,7 @@ module_eval(<<'.,.,', 'parser.y', 794)
|
|
2712
2714
|
end
|
2713
2715
|
.,.,
|
2714
2716
|
|
2715
|
-
module_eval(<<'.,.,', 'parser.y',
|
2717
|
+
module_eval(<<'.,.,', 'parser.y', 800)
|
2716
2718
|
def _reduce_185(val, _values, result)
|
2717
2719
|
result = Types::Proc.new(type: val[1].value, location: val[0].location + val[1].location)
|
2718
2720
|
|
@@ -2720,7 +2722,7 @@ module_eval(<<'.,.,', 'parser.y', 798)
|
|
2720
2722
|
end
|
2721
2723
|
.,.,
|
2722
2724
|
|
2723
|
-
module_eval(<<'.,.,', 'parser.y',
|
2725
|
+
module_eval(<<'.,.,', 'parser.y', 803)
|
2724
2726
|
def _reduce_186(val, _values, result)
|
2725
2727
|
result = Types::Optional.new(type: val[0], location: val[0].location + val[1].location)
|
2726
2728
|
|
@@ -2730,7 +2732,7 @@ module_eval(<<'.,.,', 'parser.y', 801)
|
|
2730
2732
|
|
2731
2733
|
# reduce 187 omitted
|
2732
2734
|
|
2733
|
-
module_eval(<<'.,.,', 'parser.y',
|
2735
|
+
module_eval(<<'.,.,', 'parser.y', 809)
|
2734
2736
|
def _reduce_188(val, _values, result)
|
2735
2737
|
result = [val[0]]
|
2736
2738
|
|
@@ -2738,7 +2740,7 @@ module_eval(<<'.,.,', 'parser.y', 807)
|
|
2738
2740
|
end
|
2739
2741
|
.,.,
|
2740
2742
|
|
2741
|
-
module_eval(<<'.,.,', 'parser.y',
|
2743
|
+
module_eval(<<'.,.,', 'parser.y', 812)
|
2742
2744
|
def _reduce_189(val, _values, result)
|
2743
2745
|
result = val[0] + [val[2]]
|
2744
2746
|
|
@@ -2746,7 +2748,7 @@ module_eval(<<'.,.,', 'parser.y', 810)
|
|
2746
2748
|
end
|
2747
2749
|
.,.,
|
2748
2750
|
|
2749
|
-
module_eval(<<'.,.,', 'parser.y',
|
2751
|
+
module_eval(<<'.,.,', 'parser.y', 817)
|
2750
2752
|
def _reduce_190(val, _values, result)
|
2751
2753
|
result = Types::Record.new(
|
2752
2754
|
fields: val[1],
|
@@ -2757,7 +2759,7 @@ module_eval(<<'.,.,', 'parser.y', 815)
|
|
2757
2759
|
end
|
2758
2760
|
.,.,
|
2759
2761
|
|
2760
|
-
module_eval(<<'.,.,', 'parser.y',
|
2762
|
+
module_eval(<<'.,.,', 'parser.y', 825)
|
2761
2763
|
def _reduce_191(val, _values, result)
|
2762
2764
|
result = val[0]
|
2763
2765
|
|
@@ -2765,7 +2767,7 @@ module_eval(<<'.,.,', 'parser.y', 823)
|
|
2765
2767
|
end
|
2766
2768
|
.,.,
|
2767
2769
|
|
2768
|
-
module_eval(<<'.,.,', 'parser.y',
|
2770
|
+
module_eval(<<'.,.,', 'parser.y', 828)
|
2769
2771
|
def _reduce_192(val, _values, result)
|
2770
2772
|
result = val[0].merge!(val[2])
|
2771
2773
|
|
@@ -2773,7 +2775,7 @@ module_eval(<<'.,.,', 'parser.y', 826)
|
|
2773
2775
|
end
|
2774
2776
|
.,.,
|
2775
2777
|
|
2776
|
-
module_eval(<<'.,.,', 'parser.y',
|
2778
|
+
module_eval(<<'.,.,', 'parser.y', 833)
|
2777
2779
|
def _reduce_193(val, _values, result)
|
2778
2780
|
result = { val[0].value => val[2] }
|
2779
2781
|
|
@@ -2781,7 +2783,7 @@ module_eval(<<'.,.,', 'parser.y', 831)
|
|
2781
2783
|
end
|
2782
2784
|
.,.,
|
2783
2785
|
|
2784
|
-
module_eval(<<'.,.,', 'parser.y',
|
2786
|
+
module_eval(<<'.,.,', 'parser.y', 836)
|
2785
2787
|
def _reduce_194(val, _values, result)
|
2786
2788
|
result = { val[0].value => val[2] }
|
2787
2789
|
|
@@ -2789,7 +2791,7 @@ module_eval(<<'.,.,', 'parser.y', 834)
|
|
2789
2791
|
end
|
2790
2792
|
.,.,
|
2791
2793
|
|
2792
|
-
module_eval(<<'.,.,', 'parser.y',
|
2794
|
+
module_eval(<<'.,.,', 'parser.y', 839)
|
2793
2795
|
def _reduce_195(val, _values, result)
|
2794
2796
|
result = { val[0].value => val[2] }
|
2795
2797
|
|
@@ -2797,7 +2799,7 @@ module_eval(<<'.,.,', 'parser.y', 837)
|
|
2797
2799
|
end
|
2798
2800
|
.,.,
|
2799
2801
|
|
2800
|
-
module_eval(<<'.,.,', 'parser.y',
|
2802
|
+
module_eval(<<'.,.,', 'parser.y', 842)
|
2801
2803
|
def _reduce_196(val, _values, result)
|
2802
2804
|
result = { val[0].value => val[1] }
|
2803
2805
|
|
@@ -2807,7 +2809,7 @@ module_eval(<<'.,.,', 'parser.y', 840)
|
|
2807
2809
|
|
2808
2810
|
# reduce 197 omitted
|
2809
2811
|
|
2810
|
-
module_eval(<<'.,.,', 'parser.y',
|
2812
|
+
module_eval(<<'.,.,', 'parser.y', 848)
|
2811
2813
|
def _reduce_198(val, _values, result)
|
2812
2814
|
result = val[0]
|
2813
2815
|
|
@@ -2823,7 +2825,7 @@ module_eval(<<'.,.,', 'parser.y', 846)
|
|
2823
2825
|
|
2824
2826
|
# reduce 202 omitted
|
2825
2827
|
|
2826
|
-
module_eval(<<'.,.,', 'parser.y',
|
2828
|
+
module_eval(<<'.,.,', 'parser.y', 855)
|
2827
2829
|
def _reduce_203(val, _values, result)
|
2828
2830
|
location = val[0].location + val[4].location
|
2829
2831
|
type = Types::Function.new(
|
@@ -2843,7 +2845,7 @@ module_eval(<<'.,.,', 'parser.y', 853)
|
|
2843
2845
|
end
|
2844
2846
|
.,.,
|
2845
2847
|
|
2846
|
-
module_eval(<<'.,.,', 'parser.y',
|
2848
|
+
module_eval(<<'.,.,', 'parser.y', 870)
|
2847
2849
|
def _reduce_204(val, _values, result)
|
2848
2850
|
location = val[0].location + val[1].location
|
2849
2851
|
type = Types::Function.new(
|
@@ -2854,7 +2856,7 @@ module_eval(<<'.,.,', 'parser.y', 868)
|
|
2854
2856
|
required_keywords: {},
|
2855
2857
|
optional_keywords: {},
|
2856
2858
|
rest_keywords: nil,
|
2857
|
-
return_type: val[
|
2859
|
+
return_type: val[1]
|
2858
2860
|
)
|
2859
2861
|
|
2860
2862
|
result = LocatedValue.new(value: type, location: location)
|
@@ -2863,7 +2865,7 @@ module_eval(<<'.,.,', 'parser.y', 868)
|
|
2863
2865
|
end
|
2864
2866
|
.,.,
|
2865
2867
|
|
2866
|
-
module_eval(<<'.,.,', 'parser.y',
|
2868
|
+
module_eval(<<'.,.,', 'parser.y', 887)
|
2867
2869
|
def _reduce_205(val, _values, result)
|
2868
2870
|
result = val[2]
|
2869
2871
|
result[0].unshift(val[0])
|
@@ -2872,7 +2874,7 @@ module_eval(<<'.,.,', 'parser.y', 885)
|
|
2872
2874
|
end
|
2873
2875
|
.,.,
|
2874
2876
|
|
2875
|
-
module_eval(<<'.,.,', 'parser.y',
|
2877
|
+
module_eval(<<'.,.,', 'parser.y', 891)
|
2876
2878
|
def _reduce_206(val, _values, result)
|
2877
2879
|
result = empty_params_result
|
2878
2880
|
result[0].unshift(val[0])
|
@@ -2883,7 +2885,7 @@ module_eval(<<'.,.,', 'parser.y', 889)
|
|
2883
2885
|
|
2884
2886
|
# reduce 207 omitted
|
2885
2887
|
|
2886
|
-
module_eval(<<'.,.,', 'parser.y',
|
2888
|
+
module_eval(<<'.,.,', 'parser.y', 898)
|
2887
2889
|
def _reduce_208(val, _values, result)
|
2888
2890
|
result = val[2]
|
2889
2891
|
result[1].unshift(val[0])
|
@@ -2892,7 +2894,7 @@ module_eval(<<'.,.,', 'parser.y', 896)
|
|
2892
2894
|
end
|
2893
2895
|
.,.,
|
2894
2896
|
|
2895
|
-
module_eval(<<'.,.,', 'parser.y',
|
2897
|
+
module_eval(<<'.,.,', 'parser.y', 902)
|
2896
2898
|
def _reduce_209(val, _values, result)
|
2897
2899
|
result = empty_params_result
|
2898
2900
|
result[1].unshift(val[0])
|
@@ -2903,7 +2905,7 @@ module_eval(<<'.,.,', 'parser.y', 900)
|
|
2903
2905
|
|
2904
2906
|
# reduce 210 omitted
|
2905
2907
|
|
2906
|
-
module_eval(<<'.,.,', 'parser.y',
|
2908
|
+
module_eval(<<'.,.,', 'parser.y', 909)
|
2907
2909
|
def _reduce_211(val, _values, result)
|
2908
2910
|
result = val[2]
|
2909
2911
|
result[2] = val[0]
|
@@ -2912,7 +2914,7 @@ module_eval(<<'.,.,', 'parser.y', 907)
|
|
2912
2914
|
end
|
2913
2915
|
.,.,
|
2914
2916
|
|
2915
|
-
module_eval(<<'.,.,', 'parser.y',
|
2917
|
+
module_eval(<<'.,.,', 'parser.y', 913)
|
2916
2918
|
def _reduce_212(val, _values, result)
|
2917
2919
|
result = empty_params_result
|
2918
2920
|
result[2] = val[0]
|
@@ -2923,7 +2925,7 @@ module_eval(<<'.,.,', 'parser.y', 911)
|
|
2923
2925
|
|
2924
2926
|
# reduce 213 omitted
|
2925
2927
|
|
2926
|
-
module_eval(<<'.,.,', 'parser.y',
|
2928
|
+
module_eval(<<'.,.,', 'parser.y', 920)
|
2927
2929
|
def _reduce_214(val, _values, result)
|
2928
2930
|
result = val[2]
|
2929
2931
|
result[3].unshift(val[0])
|
@@ -2932,7 +2934,7 @@ module_eval(<<'.,.,', 'parser.y', 918)
|
|
2932
2934
|
end
|
2933
2935
|
.,.,
|
2934
2936
|
|
2935
|
-
module_eval(<<'.,.,', 'parser.y',
|
2937
|
+
module_eval(<<'.,.,', 'parser.y', 924)
|
2936
2938
|
def _reduce_215(val, _values, result)
|
2937
2939
|
result = empty_params_result
|
2938
2940
|
result[3].unshift(val[0])
|
@@ -2943,7 +2945,7 @@ module_eval(<<'.,.,', 'parser.y', 922)
|
|
2943
2945
|
|
2944
2946
|
# reduce 216 omitted
|
2945
2947
|
|
2946
|
-
module_eval(<<'.,.,', 'parser.y',
|
2948
|
+
module_eval(<<'.,.,', 'parser.y', 931)
|
2947
2949
|
def _reduce_217(val, _values, result)
|
2948
2950
|
result = empty_params_result
|
2949
2951
|
|
@@ -2951,7 +2953,7 @@ module_eval(<<'.,.,', 'parser.y', 929)
|
|
2951
2953
|
end
|
2952
2954
|
.,.,
|
2953
2955
|
|
2954
|
-
module_eval(<<'.,.,', 'parser.y',
|
2956
|
+
module_eval(<<'.,.,', 'parser.y', 934)
|
2955
2957
|
def _reduce_218(val, _values, result)
|
2956
2958
|
result = val[2]
|
2957
2959
|
result[4].merge!(val[0])
|
@@ -2960,7 +2962,7 @@ module_eval(<<'.,.,', 'parser.y', 932)
|
|
2960
2962
|
end
|
2961
2963
|
.,.,
|
2962
2964
|
|
2963
|
-
module_eval(<<'.,.,', 'parser.y',
|
2965
|
+
module_eval(<<'.,.,', 'parser.y', 938)
|
2964
2966
|
def _reduce_219(val, _values, result)
|
2965
2967
|
result = empty_params_result
|
2966
2968
|
result[4].merge!(val[0])
|
@@ -2969,7 +2971,7 @@ module_eval(<<'.,.,', 'parser.y', 936)
|
|
2969
2971
|
end
|
2970
2972
|
.,.,
|
2971
2973
|
|
2972
|
-
module_eval(<<'.,.,', 'parser.y',
|
2974
|
+
module_eval(<<'.,.,', 'parser.y', 942)
|
2973
2975
|
def _reduce_220(val, _values, result)
|
2974
2976
|
result = val[2]
|
2975
2977
|
result[5].merge!(val[0])
|
@@ -2978,7 +2980,7 @@ module_eval(<<'.,.,', 'parser.y', 940)
|
|
2978
2980
|
end
|
2979
2981
|
.,.,
|
2980
2982
|
|
2981
|
-
module_eval(<<'.,.,', 'parser.y',
|
2983
|
+
module_eval(<<'.,.,', 'parser.y', 946)
|
2982
2984
|
def _reduce_221(val, _values, result)
|
2983
2985
|
result = empty_params_result
|
2984
2986
|
result[5].merge!(val[0])
|
@@ -2987,7 +2989,7 @@ module_eval(<<'.,.,', 'parser.y', 944)
|
|
2987
2989
|
end
|
2988
2990
|
.,.,
|
2989
2991
|
|
2990
|
-
module_eval(<<'.,.,', 'parser.y',
|
2992
|
+
module_eval(<<'.,.,', 'parser.y', 950)
|
2991
2993
|
def _reduce_222(val, _values, result)
|
2992
2994
|
result = empty_params_result
|
2993
2995
|
result[6] = val[0]
|
@@ -2996,7 +2998,7 @@ module_eval(<<'.,.,', 'parser.y', 948)
|
|
2996
2998
|
end
|
2997
2999
|
.,.,
|
2998
3000
|
|
2999
|
-
module_eval(<<'.,.,', 'parser.y',
|
3001
|
+
module_eval(<<'.,.,', 'parser.y', 956)
|
3000
3002
|
def _reduce_223(val, _values, result)
|
3001
3003
|
result = Types::Function::Param.new(type: val[0],
|
3002
3004
|
name: val[1]&.value&.to_sym)
|
@@ -3005,7 +3007,7 @@ module_eval(<<'.,.,', 'parser.y', 954)
|
|
3005
3007
|
end
|
3006
3008
|
.,.,
|
3007
3009
|
|
3008
|
-
module_eval(<<'.,.,', 'parser.y',
|
3010
|
+
module_eval(<<'.,.,', 'parser.y', 962)
|
3009
3011
|
def _reduce_224(val, _values, result)
|
3010
3012
|
result = Types::Function::Param.new(type: val[1],
|
3011
3013
|
name: val[2]&.value&.to_sym)
|
@@ -3014,7 +3016,7 @@ module_eval(<<'.,.,', 'parser.y', 960)
|
|
3014
3016
|
end
|
3015
3017
|
.,.,
|
3016
3018
|
|
3017
|
-
module_eval(<<'.,.,', 'parser.y',
|
3019
|
+
module_eval(<<'.,.,', 'parser.y', 968)
|
3018
3020
|
def _reduce_225(val, _values, result)
|
3019
3021
|
result = Types::Function::Param.new(type: val[1],
|
3020
3022
|
name: val[2]&.value&.to_sym)
|
@@ -3023,7 +3025,7 @@ module_eval(<<'.,.,', 'parser.y', 966)
|
|
3023
3025
|
end
|
3024
3026
|
.,.,
|
3025
3027
|
|
3026
|
-
module_eval(<<'.,.,', 'parser.y',
|
3028
|
+
module_eval(<<'.,.,', 'parser.y', 974)
|
3027
3029
|
def _reduce_226(val, _values, result)
|
3028
3030
|
param = Types::Function::Param.new(type: val[1],
|
3029
3031
|
name: val[2]&.value&.to_sym)
|
@@ -3033,7 +3035,7 @@ module_eval(<<'.,.,', 'parser.y', 972)
|
|
3033
3035
|
end
|
3034
3036
|
.,.,
|
3035
3037
|
|
3036
|
-
module_eval(<<'.,.,', 'parser.y',
|
3038
|
+
module_eval(<<'.,.,', 'parser.y', 981)
|
3037
3039
|
def _reduce_227(val, _values, result)
|
3038
3040
|
param = Types::Function::Param.new(type: val[2],
|
3039
3041
|
name: val[3]&.value&.to_sym)
|
@@ -3043,7 +3045,7 @@ module_eval(<<'.,.,', 'parser.y', 979)
|
|
3043
3045
|
end
|
3044
3046
|
.,.,
|
3045
3047
|
|
3046
|
-
module_eval(<<'.,.,', 'parser.y',
|
3048
|
+
module_eval(<<'.,.,', 'parser.y', 988)
|
3047
3049
|
def _reduce_228(val, _values, result)
|
3048
3050
|
result = Types::Function::Param.new(type: val[1],
|
3049
3051
|
name: val[2]&.value&.to_sym)
|
@@ -3060,7 +3062,7 @@ module_eval(<<'.,.,', 'parser.y', 986)
|
|
3060
3062
|
|
3061
3063
|
# reduce 232 omitted
|
3062
3064
|
|
3063
|
-
module_eval(<<'.,.,', 'parser.y',
|
3065
|
+
module_eval(<<'.,.,', 'parser.y', 997)
|
3064
3066
|
def _reduce_233(val, _values, result)
|
3065
3067
|
namespace = val[0]&.value || Namespace.empty
|
3066
3068
|
name = val[1].value.to_sym
|
@@ -3078,7 +3080,7 @@ module_eval(<<'.,.,', 'parser.y', 995)
|
|
3078
3080
|
|
3079
3081
|
# reduce 236 omitted
|
3080
3082
|
|
3081
|
-
module_eval(<<'.,.,', 'parser.y',
|
3083
|
+
module_eval(<<'.,.,', 'parser.y', 1009)
|
3082
3084
|
def _reduce_237(val, _values, result)
|
3083
3085
|
namespace = val[0]&.value || Namespace.empty
|
3084
3086
|
name = val[1].value.to_sym
|
@@ -3090,7 +3092,7 @@ module_eval(<<'.,.,', 'parser.y', 1007)
|
|
3090
3092
|
end
|
3091
3093
|
.,.,
|
3092
3094
|
|
3093
|
-
module_eval(<<'.,.,', 'parser.y',
|
3095
|
+
module_eval(<<'.,.,', 'parser.y', 1018)
|
3094
3096
|
def _reduce_238(val, _values, result)
|
3095
3097
|
namespace = val[0]&.value || Namespace.empty
|
3096
3098
|
name = val[1].value.to_sym
|
@@ -3102,7 +3104,7 @@ module_eval(<<'.,.,', 'parser.y', 1016)
|
|
3102
3104
|
end
|
3103
3105
|
.,.,
|
3104
3106
|
|
3105
|
-
module_eval(<<'.,.,', 'parser.y',
|
3107
|
+
module_eval(<<'.,.,', 'parser.y', 1027)
|
3106
3108
|
def _reduce_239(val, _values, result)
|
3107
3109
|
result = nil
|
3108
3110
|
|
@@ -3110,7 +3112,7 @@ module_eval(<<'.,.,', 'parser.y', 1025)
|
|
3110
3112
|
end
|
3111
3113
|
.,.,
|
3112
3114
|
|
3113
|
-
module_eval(<<'.,.,', 'parser.y',
|
3115
|
+
module_eval(<<'.,.,', 'parser.y', 1030)
|
3114
3116
|
def _reduce_240(val, _values, result)
|
3115
3117
|
result = LocatedValue.new(value: Namespace.root, location: val[0].location)
|
3116
3118
|
|
@@ -3118,7 +3120,7 @@ module_eval(<<'.,.,', 'parser.y', 1028)
|
|
3118
3120
|
end
|
3119
3121
|
.,.,
|
3120
3122
|
|
3121
|
-
module_eval(<<'.,.,', 'parser.y',
|
3123
|
+
module_eval(<<'.,.,', 'parser.y', 1033)
|
3122
3124
|
def _reduce_241(val, _values, result)
|
3123
3125
|
namespace = Namespace.parse(val[1].value).absolute!
|
3124
3126
|
result = LocatedValue.new(value: namespace, location: val[0].location + val[1].location)
|
@@ -3127,7 +3129,7 @@ module_eval(<<'.,.,', 'parser.y', 1031)
|
|
3127
3129
|
end
|
3128
3130
|
.,.,
|
3129
3131
|
|
3130
|
-
module_eval(<<'.,.,', 'parser.y',
|
3132
|
+
module_eval(<<'.,.,', 'parser.y', 1037)
|
3131
3133
|
def _reduce_242(val, _values, result)
|
3132
3134
|
namespace = Namespace.parse(val[0].value)
|
3133
3135
|
result = LocatedValue.new(value: namespace, location: val[0].location)
|