-
-
Notifications
You must be signed in to change notification settings - Fork 293
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
In REPL, codes cannot have multiple lines #345
Comments
Some sort of multi-line editing would make the REPL experience better, for sure. It seems like it might be a bit tricky to implement. I would probably want the parser to return some kind of error code to indicate when there is a parse error where we reached EOF unexpectedly, and then respond to that error code in the REPL by going down to the next line and continuing to accept input. Then this process could continue each time the user presses Enter -- either the code would be submitted successfully or we would go down to the next line. It looks like multi-line reading is supported in JLine 3, so we could leverage that, although it would require an upgrade from JLine 2 which we're currently using. I'm in the middle of a ground-up rewrite of the client in Go, so I'll explore options there when I get to reimplementing the REPL. In the meantime, adding multi-line support to the existing Java client would be a welcome contribution, if anyone wants to tackle it! |
Maybe it can be taken that: if the last character of the line is a backslash, let the repl parser continue to the next line. |
That's another possibility. And another option is to provide a separate mapping like |
I am new to alda-lang and I was about to report the same feature request. I feel that having this support will allow much quicker iterations for coder/musicians. (Otherwise we will be forced to first save code snippet to experiment to a file, then run Some approaches to implementing (potentially relatively easily) this that came to my mind:
|
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
It is really limiting the existence of complicated lisp codes in alda repl codes.
The text was updated successfully, but these errors were encountered: