andrei-markeev / ts2c

Convert Javascript/TypeScript to C
ISC License
1.26k stars 95 forks source link

Ain't work #96

Open Atybot opened 1 year ago

Atybot commented 1 year ago

`var indices = [1, 2, 3]; var values = ["1", "2", "3"]; var obj = { }; for(var x = 0; x < indices.length; x++) { obj[indices[x]] = values[x]; }

for(var y = 0; y < indices.length; y++) { console.log(obj[indices[y]]); }`

andriemc commented 6 months ago

aha, I see, you are trying to use an empty object ({}) but this doesn't support those currently as it says Unsupported use of object literal expression as a comment in the generated C source code.