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

Throwing error #25

Open
amitguptagwl opened this issue Jun 13, 2018 · 2 comments
Open

Throwing error #25

amitguptagwl opened this issue Jun 13, 2018 · 2 comments

Comments

@amitguptagwl
Copy link

    if (parent) { node.parent = parent; }
                              ^
TypeError: Cannot set property 'parent' of null
    at visit (/usr/local/lib/node_modules/js2php/index.js:47:31)
    at visit (/usr/local/lib/node_modules/js2php/index.js:424:18)
    at visit (/usr/local/lib/node_modules/js2php/index.js:52:20)
    at visit (/usr/local/lib/node_modules/js2php/index.js:387:18)
    at visit (/usr/local/lib/node_modules/js2php/index.js:396:22)
    at visit (/usr/local/lib/node_modules/js2php/index.js:396:22)
    at visit (/usr/local/lib/node_modules/js2php/index.js:396:22)
    at visit (/usr/local/lib/node_modules/js2php/index.js:52:20)
    at visit (/usr/local/lib/node_modules/js2php/index.js:266:27)
    at visit (/usr/local/lib/node_modules/js2php/index.js:483:17)

Initially it was causing issue due to throw statement. But it is failing even after commenting throw statement.

Here is the javascript code nimn.js. I had simplified template literals in normal string concatenation form in doubt if they are not supported.

@endel
Copy link
Owner

endel commented Sep 7, 2018

Hi @amitguptagwl, sorry the delay to answer. For some reason I wasn't receiving email updates about this project.

I couldn't reproduce the issue you described, though. I've successfully transpiled your nimn.js script without errors. (even though it's invalid PHP code)

@amitguptagwl
Copy link
Author

Thanks @endel . It's nice to hear that it worked. I'm updating nimn.js . So I'll try it with new version after some days.

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

2 participants