question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unexpected token after do...while statement

See original GitHub issue

Hats off to the design and performance of this insanely great parser. 👍

It would be a great companion to Astring once this is resolved: the following code (which comes from here) provokes an error:

do;while(0) 0;

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
KFlashcommented, Jul 15, 2019

@davidbonnet I think I solved it. You can use the new specDeviation option. I also updated the REPL to accept the new option. Just enable Allow spec deviaton.

0reactions
davidbonnetcommented, Jul 15, 2019

It does, awesome!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incomprehensible unexpected token error in do...while loop
The parser is expecting to see an equals sign = after the identifier ( randomLetter ), but instead it unexpectedly sees the keyword...
Read more >
unexpected token `done' in while loop - Unix Stack Exchange
You either need a semicolon after true on the second line or to put do on the following line by itself. Either this:...
Read more >
SyntaxError: Unexpected token - JavaScript - MDN Web Docs
The JavaScript exceptions "unexpected token" occur when a specific language construct was expected, but something else was provided.
Read more >
2. While syntax. SyntaxError: Unexpected token, help please!
The while statement creates a loop that executes a specified statement as long as the test condition evaluates to true. The condition is ......
Read more >
Have a JavaScript Unexpected Token Error? Check Your Syntax
The parser finds our SyntaxError and reports on it before it evaluates our catch block. You can catch Unexpected Token errors, but doing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found