mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
b1201f1c8f
Support for (;;) by lowering the omitted test to true and omitting the synthetic HIR initializer during codegen. AI assistance was used to implement and verify this change.
18 lines
234 B
JavaScript
18 lines
234 B
JavaScript
function Component(props) {
|
|
let index = 0;
|
|
let total = 0;
|
|
|
|
for (;;) {
|
|
index++;
|
|
if (index < props.start) {
|
|
continue;
|
|
}
|
|
total += index;
|
|
if (index >= props.end) {
|
|
break;
|
|
}
|
|
}
|
|
|
|
return total;
|
|
}
|