Commit 4612607
committed
Reason V4 [Stacked Diff 3/n #2614] [Parse Hashtags for polymorphic variants]
Summary:
Implements parsing for "hashtags" polymorphic variant constructors.
Since Reason Syntax still supports object syntax, we needed to rearrange
some syntactic real estate to make this work.
```reason
let red = #FF000;
let isRed = color => switch(color) {
| #FF0000 => true
| _ => false
};
let callAMethod = someObject::methodName(isRed, "testing red");
let templateLiteral = `
String template literals are still using backticks.
String template literals are still using backticks.
`;
```
Test Plan:
Reviewers:
CC:1 parent 5ee062e commit 4612607
File tree
49 files changed
+1914
-362
lines changed- formatTest
- typeCheckedTests
- expected_output
- input
- unit_tests
- expected_output
- input
- src
- reason-parser
- reason-version
- refmt
- rtop
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
49 files changed
+1914
-362
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | | - | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
Lines changed: 41 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
12 | 35 | | |
13 | 36 | | |
14 | 37 | | |
| |||
90 | 113 | | |
91 | 114 | | |
92 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
93 | 125 | | |
94 | 126 | | |
95 | 127 | | |
| |||
195 | 227 | | |
196 | 228 | | |
197 | 229 | | |
198 | | - | |
| 230 | + | |
199 | 231 | | |
200 | 232 | | |
201 | 233 | | |
| |||
204 | 236 | | |
205 | 237 | | |
206 | 238 | | |
207 | | - | |
| 239 | + | |
208 | 240 | | |
209 | 241 | | |
210 | 242 | | |
| |||
346 | 378 | | |
347 | 379 | | |
348 | 380 | | |
349 | | - | |
| 381 | + | |
350 | 382 | | |
351 | 383 | | |
352 | | - | |
353 | | - | |
| 384 | + | |
| 385 | + | |
354 | 386 | | |
355 | | - | |
| 387 | + | |
356 | 388 | | |
357 | 389 | | |
358 | 390 | | |
| |||
361 | 393 | | |
362 | 394 | | |
363 | 395 | | |
364 | | - | |
| 396 | + | |
365 | 397 | | |
366 | 398 | | |
367 | 399 | | |
| |||
398 | 430 | | |
399 | 431 | | |
400 | 432 | | |
401 | | - | |
| 433 | + | |
402 | 434 | | |
403 | 435 | | |
404 | 436 | | |
| |||
412 | 444 | | |
413 | 445 | | |
414 | 446 | | |
415 | | - | |
| 447 | + | |
416 | 448 | | |
417 | 449 | | |
418 | 450 | | |
| |||
0 commit comments