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
Invalid JavaScript syntax: Unexpected end of file #606
Comments
Hi @inane, thanks for reporting. Unfortunately I'm unable to reproduce this bug. Please post a complete code example that causes the problem. Also, naming the version of JSDuck might help. |
Hi @nene it´s simple, if you add a line comment inside of a component, jsduck crash. I am running JsDuck in Mac osX 10.10 with the latest version. Thanks! |
Please provide an example of such a component. It's not as obvious to me as it might seem to you. |
Hello @nene here it goes the class.. if you look inside items you have line comment, and for me it is not working, I have deleted these lines in my code and it worked.. Ext.define('x.view.cart.Header', {
}); |
Problem solved? |
Yes @nene for me it is solved but I think this is a jsduck bug, now I have commented my previous line-comment for /* comment */ instead of //comment and its working as well.. Only for your information. Thanks for your support. Óscar. |
I tried parsing the given file with both JSDuck 5.3.4 and 6.0 beta. No errors in either case. This file contains no doc-comments, so JSDuck won't output anything. Added some doc comments, but also no failure. |
Tricky situation, I have tested with Windows and doesnt´work, same error.. Don´t care I have commented with this format /* comment */ and it works, and solved! Thank you. |
I had this same problem with 3 of the ~40 files in my project. I found that if I replaced all carriage returns (\r) with newlines (\n), the problem no longer occurred. I think jsduck is not seeing carriage returns as a new line so the following could occur:
which JSDuck is translating to:
which leads to the unexpected EOF error. |
@nene Maybe this issue should be reopened? I think either JSDuck should treat carriage returns as newlines or it should give a warning that makes the issue easier to diagnose. |
Hi @garie, this certainly looks like a bug, but it's a different issue - Would you mind opening a separate issue for this? PS. What's your reason for having lonely |
I commented here because I suspect that @inane had the same issue but didn't realize. I will try to open a separate issue. I am not positive how the |
I opened a new issue. |
Hi!! Awesome JSDuck, very useful for my daily work.. great!
I have a issue with a javascript code, in a Sencha-touch view I have different lines with comments inside this component, here an example:
If I delete the line-comment works properly, Why?? I think this is a bug, if we add comments inside view components, jsduck is not working..
Thank you in advance ..
The text was updated successfully, but these errors were encountered: