-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Description
Related to #1051.
iex(4)> ["a]
...(4)> "
...(4)> "
...(4)> "
...(4)> "
...(4)> ]
...(4)> "
...(4)> ]
** (SyntaxError) iex:6: syntax error before: [<<"\n">>]
IEx is waiting for all missing tokens. However, my natural reaction after forgetting to put the closing quote and seeing that it didn't help is to try to put another quote. This leads to cascading effect.
The problem is that there is no way to leave this cycle other then by entering all closing characters. I understand that this mechanism is currently used to implemented do-blocks, but it's too harsh to force the user to quit the shell if they missed some character accidentally and are confused about what's going on.
A plausible solution, in my opinion, would be to catch ^D and break out of the loop with a syntax error. Is it technically possible?
Metadata
Metadata
Assignees
Labels
No labels