Indexing and indexed assignment have slightly different semantics in JS vs Lua. This will also help with #3.
Instead of compiling a = foo.bar to a = foo.bar, it should instead compile to a = _get(foo, "bar").
I had an attempt at this locally, and got it working for indexing and for method calls, but not for assignment; i.e. for a.b = c I got _get(a, "b") = c which is invalid lua code. I think getting this right will require changes to all the compile{Assignment,Update}Expression* functions
Indexing and indexed assignment have slightly different semantics in JS vs Lua. This will also help with #3.
Instead of compiling
a = foo.bar
toa = foo.bar
, it should instead compile toa = _get(foo, "bar")
.I had an attempt at this locally, and got it working for indexing and for method calls, but not for assignment; i.e. for
a.b = c
I got_get(a, "b") = c
which is invalid lua code. I think getting this right will require changes to all thecompile{Assignment,Update}Expression*
functions