Commit f2d57da
Ayaz Hafiz
Token hints for missing closing braces: classes, enums, jsx, modules, types
This commit adds token hints for missing close braces in
- Class definitions
- Enum definitions
- JSX expressions
- Module definitions (this includes augmentations and namespaces)
- Type member lists (this includes interfaces)
The token hint refers to the opening brace for which the parser expected
a corresponding closing brace.
Note that this commit *does not* update all occurences of an expectation
for a close brace to provide token hints. Constructs for which this
token hint is not provided include:
- Mapped types
- Switch statements
- Object binding patterns
- JSX spread attributes (`<div {...props}></div>`)
- JSDoc implements/augments tags (`/* @implements {SomeInterface} */`)
Part of #35597.1 parent 5e9c436 commit f2d57da
File tree
48 files changed
+349
-34
lines changed- src/compiler
- tests
- baselines/reference
- cases/compiler
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
48 files changed
+349
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1308 | 1308 | | |
1309 | 1309 | | |
1310 | 1310 | | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
1311 | 1328 | | |
1312 | 1329 | | |
1313 | 1330 | | |
| |||
2988 | 3005 | | |
2989 | 3006 | | |
2990 | 3007 | | |
| 3008 | + | |
2991 | 3009 | | |
2992 | 3010 | | |
2993 | | - | |
| 3011 | + | |
2994 | 3012 | | |
2995 | 3013 | | |
2996 | 3014 | | |
| |||
4654 | 4672 | | |
4655 | 4673 | | |
4656 | 4674 | | |
| 4675 | + | |
4657 | 4676 | | |
4658 | 4677 | | |
4659 | 4678 | | |
| |||
4666 | 4685 | | |
4667 | 4686 | | |
4668 | 4687 | | |
4669 | | - | |
| 4688 | + | |
4670 | 4689 | | |
4671 | 4690 | | |
4672 | | - | |
| 4691 | + | |
4673 | 4692 | | |
4674 | 4693 | | |
4675 | 4694 | | |
| |||
5121 | 5140 | | |
5122 | 5141 | | |
5123 | 5142 | | |
5124 | | - | |
5125 | | - | |
5126 | | - | |
5127 | | - | |
5128 | | - | |
5129 | | - | |
5130 | | - | |
5131 | | - | |
5132 | | - | |
| 5143 | + | |
5133 | 5144 | | |
5134 | 5145 | | |
5135 | 5146 | | |
| |||
5214 | 5225 | | |
5215 | 5226 | | |
5216 | 5227 | | |
5217 | | - | |
5218 | | - | |
5219 | | - | |
5220 | | - | |
5221 | | - | |
5222 | | - | |
5223 | | - | |
5224 | | - | |
5225 | | - | |
| 5228 | + | |
5226 | 5229 | | |
5227 | 5230 | | |
5228 | 5231 | | |
| |||
6262 | 6265 | | |
6263 | 6266 | | |
6264 | 6267 | | |
| 6268 | + | |
6265 | 6269 | | |
6266 | 6270 | | |
6267 | 6271 | | |
6268 | 6272 | | |
6269 | | - | |
| 6273 | + | |
6270 | 6274 | | |
6271 | 6275 | | |
6272 | 6276 | | |
| |||
6367 | 6371 | | |
6368 | 6372 | | |
6369 | 6373 | | |
| 6374 | + | |
6370 | 6375 | | |
6371 | 6376 | | |
6372 | | - | |
| 6377 | + | |
6373 | 6378 | | |
6374 | 6379 | | |
6375 | 6380 | | |
| |||
6379 | 6384 | | |
6380 | 6385 | | |
6381 | 6386 | | |
| 6387 | + | |
6382 | 6388 | | |
6383 | 6389 | | |
6384 | | - | |
| 6390 | + | |
6385 | 6391 | | |
6386 | 6392 | | |
6387 | 6393 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | | - | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| 56 | + | |
53 | 57 | | |
54 | 58 | | |
55 | 59 | | |
| |||
58 | 62 | | |
59 | 63 | | |
60 | 64 | | |
| 65 | + | |
61 | 66 | | |
62 | 67 | | |
63 | 68 | | |
| |||
70 | 75 | | |
71 | 76 | | |
72 | 77 | | |
| 78 | + | |
73 | 79 | | |
74 | 80 | | |
75 | 81 | | |
| |||
89 | 95 | | |
90 | 96 | | |
91 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
92 | 105 | | |
93 | 106 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
247 | 248 | | |
248 | 249 | | |
249 | 250 | | |
| |||
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 | + | |
0 commit comments