-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
feat(REPL): improve interactive experience #362
Conversation
:clear is already implemented. erg/crates/erg_common/traits.rs Line 584 in ab1c45e
|
sorry |
It's so weird. |
Please squash commits that don't make much sense |
Yes, In merge commit |
Before this PR the Ubuntu CI also has a probability faild:https://github.com/erg-lang/erg/actions/runs/3984374464/jobs/6830520255 Local tests passed, but CI failed @mtshiba |
Arrow keys could not be used on Linux so, add REPL input handling by `crossterm` Improvement of detailed usability - possible to use arrow keys on Linux - Cursor shape change block to line - Ctrl+c is disable - Ctrl+z is the exit key command
95e83e9
to
beed07e
Compare
>>> C = Class {x = Int}
>>> C.
... method self = None
...
Error[#0126]: File <stdin>, line 1,
1 |
: -
: `- exists a similar name variable:
NameError: C is not defined
>>> @Inheritable
... D = Class {x = Int}
... D.
... method self = None
...
...
>>> This is not a mistake, but a request for improvement. If a class has a decorator, it is supposed to accept subsequent method definitions. I would like this to be the case even when decorators are not attached. P.S. >>> @id
... f x = x
... The behavior seems to be that if a decorator is attached, the methods' definition is expected, but this behavior is not strictly correct, since non-classes can also have decorators. It would be necessary to determine the class definition. It would be difficult to implement in earnest, but as a simple implementation, if a |
I have found a problem that if you type anything other than English in the repl, there will be a lot of problems (I will solve this problem). |
Class definition is now evaluated as chunk definition that come after the @ is error Flattened pattern match of BlockKind
Thank you so much! |
Change
1.Fixes #216 (modify the tip of failed to dump a. pyc file)
2.Fixes #26
3.Fixes #62
4.Fixes #56
5.Support up key browsing history
6.Added the paste function for Windows, WSL, Linux(need to install
xsel
) and MacOS7.Fixed countless crash bugs
8.improve the multi-line REPL operation
9.Improve REPL testing
10.add
--features full
11.Update README
Direct dependent change
add optional
crossterm = "0.25.0"
to erg_common