-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Handling of comma at the end of the line in REPL #28506
Comments
This is probably related to whether it's waiting for a closing token, similar to how |
To my understanding the reason is that in REPL However, e.g. this |
Good news: this only seems to arise if
I don't think any source files are likely to end in a comma, so we can fix this without breaking anything. For example we even have:
|
If you enter an expression in REPL that terminates with a comma
,
then it is parsed immediately after newline , e.g.However in Julia script after
,
Julia tries to read continuation of the expression from a new line, e.g.This is inconsistent. The problem is apparent when you have a code and you copy paste it into REPL.
E.g. in the example above copy-pasting only the body of
f()
into REPL produces:I guess it is not intended as I would expect consistency between REPL?
I know that 100% consistency is not guaranteed - e.g. when multiple empty lines are present, but this case seems that it should give the same result
The text was updated successfully, but these errors were encountered: