Commit e9ce425
simplify ternary transpilation (#310)
* simplify ternary transpilation
* remove ternary from lualib
* remove reference to ternary
* replace boxing with IIFE
* use boxing ternary in luajit transpiler
* add transpilation tests for ternary
* transpile unprotected ternary for non falsible whenTrue type
* resolve merge conflict
* add test for undefined whenTrue
* add test for literal and non-literal values
* add support for strictNullChecks
* handle union types
* add tests for strictNullChecks
* remove FocusTest
* added literal ternary test
* remove PossiblyFalsy flag check as it is not applicable to lua
* correctly handle null
* add Void and Never to falsible falgs
* refactor isNonFalsible() -> isFalisble()
* check for strict mode1 parent 4dad0e7 commit e9ce425
File tree
6 files changed
+78
-15
lines changed- src
- lualib
- targets
- test/unit
6 files changed
+78
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
456 | 480 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
783 | | - | |
| 783 | + | |
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
| |||
1030 | 1030 | | |
1031 | 1031 | | |
1032 | 1032 | | |
1033 | | - | |
| 1033 | + | |
1034 | 1034 | | |
1035 | 1035 | | |
1036 | 1036 | | |
| 1037 | + | |
| 1038 | + | |
1037 | 1039 | | |
1038 | | - | |
1039 | | - | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
1040 | 1049 | | |
1041 | 1050 | | |
1042 | 1051 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
47 | 55 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
195 | 225 | | |
196 | 226 | | |
197 | 227 | | |
| |||
260 | 290 | | |
261 | 291 | | |
262 | 292 | | |
263 | | - | |
| 293 | + | |
264 | 294 | | |
265 | 295 | | |
266 | 296 | | |
| |||
269 | 299 | | |
270 | 300 | | |
271 | 301 | | |
272 | | - | |
| 302 | + | |
273 | 303 | | |
274 | 304 | | |
275 | 305 | | |
276 | 306 | | |
277 | 307 | | |
278 | | - | |
| 308 | + | |
279 | 309 | | |
280 | 310 | | |
281 | 311 | | |
| |||
0 commit comments