Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback to functions _get and _set if types are unknown #17

Open
daurnimator opened this issue Mar 28, 2017 · 0 comments
Open

Fallback to functions _get and _set if types are unknown #17

daurnimator opened this issue Mar 28, 2017 · 0 comments

Comments

@daurnimator
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant