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

SyntaxError in logical expressions fail for some cases #1629

Closed
MaBecker opened this issue Mar 7, 2019 · 4 comments
Closed

SyntaxError in logical expressions fail for some cases #1629

MaBecker opened this issue Mar 7, 2019 · 4 comments

Comments

@MaBecker
Copy link
Contributor

MaBecker commented Mar 7, 2019

add ( logical expressions ) for this test files

  • test_array_access.js
  • test_array_big_indices.js
  • test_function_length.js
  • test_object_proto.js
  • test_string_match.js
@gfwilliams
Copy link
Member

How are you uploading? Do you have your own tool?

The issue is the usual Espruino gotcha - if you copy/paste into the REPL then it'll execute after a newline unless there are more open brackets than closed.

If you upload with the Espruino CLI then those line endings get turned into Alt+Enter and it should all work great - so I'm not sure if this is something that we should really be tweaking tests for.

If you want a quick hack to get your own code uploading, just surround everything in { and }.

@MaBecker
Copy link
Contributor Author

MaBecker commented Mar 8, 2019

upload like described in #1490

@MaBecker
Copy link
Contributor Author

MaBecker commented Mar 8, 2019

but tested in console and WebIDE upload too.

@gfwilliams
Copy link
Member

Thanks - it was a CLI/WebIDE issue - if you use the latest from GitHub it should work now.

It's a good one to fix as I bet that's been tripping people up.

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