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

Allow Forced New Lines #87

Closed
FlorianRappl opened this issue Feb 23, 2018 · 0 comments
Closed

Allow Forced New Lines #87

FlorianRappl opened this issue Feb 23, 2018 · 0 comments

Comments

@FlorianRappl
Copy link
Owner

As discussed in #86 there are cases where the REPL may be misused / misunderstood, e.g., if one wants to play the opening brace in a new line instead of the current line.

The origin of the error lies in the fact that the REPL is by-default single line and enter starts the evaluation. There are some techniques to check for a wanted line ending, but we only cover the simplest cases to continue in another line. Once a statement seems to be complete we trigger the evaluation.

In case of for (...) our simple checks do not tell us that something is missing. Actually, since for (...); is valid we cannot make an exception for this one (and similar cases).

The simplest counter measure is to allow forced new line (e.g., via shift enter). That way the user can just state "okay, now I do not want have the evaluation running, but I first want to supply more lines / information".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant