Closed ytoml closed 2 years ago
Describe the bug In REPL, a new line is always evaluated immedately, and it prevent us from defining procedures/functions with multiple lines or method for classes.
Reproducible code
X = Class {.inner = Int} X. # press enter here
we observe:
Error[#0000]: File <string>, line 1 1│ X. ^ SyntaxError: invalid syntax
Also, new lines just after = is respected:
=
>>> fib n = ...
but it's not respected with whitespaces:
>>> fib n ={some whitespaces} Error[#0000]: File <string>, line 1 1│ fib n = ^ SyntaxError: invalid syntax
Expected behavior REPL waits for next input in case new lines follows
.
Actually I could fix it locally and now try to respect comment, I mean enabling:
fib n = # fibonnacci ...
I will open PR later.
Describe the bug In REPL, a new line is always evaluated immedately, and it prevent us from defining procedures/functions with multiple lines or method for classes.
Reproducible code
we observe:
Also, new lines just after
=
is respected:but it's not respected with whitespaces:
Expected behavior REPL waits for next input in case new lines follows
.
(and whitespaces) after class name=
, even with whitespaces