Commit b6ac0aa
committed
Reason v4 - 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 ce9fac6 commit b6ac0aa
File tree
20 files changed
+681
-265
lines changed- formatTest
- typeCheckedTests
- expected_output
- input
- unit_tests
- expected_output
- input
- src
- reason-parser
- reason-version
20 files changed
+681
-265
lines changedLines 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 | + | |
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 | | |
| |||
Lines changed: 18 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
| 49 | + | |
| 50 | + | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
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: 12 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 | + | |
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 | |
|---|---|---|---|
| |||
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 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
0 commit comments