Closed rq-Chen closed 1 year ago
Thank you for pointing out this error! It should have been fixed in pre-release version 0.4.7. Please check and let me know if it's effective.
It seems like this update removed the multi-line functionality altogether despite fixing the aforementioned issue. Now if I do:
>>> for
and return, I got:
>>>
Error: At least one END is missing. The statement beginning here does not have a matching end.
The problem also occurs when I run code chunk with Ctrl+Enter or paste a chunk of code into the terminal.
It seems that this bug is not very easy to fix. I might need to implement a simple MATLAB code interpreter, which could take quite some time. Do you have any suggestions?
Should be fixed in pre-release 0.4.8.
The python backend supports multi-line input by detecting some control flow keywords (e.g., 'for') in the input (see here). However, that leads to a bug when the input contains a string/character array which contains these keywords. Example:
After pressing enter, the terminal will continue to wait for input until it sees an
end
.For the pre-released version, this issue also occurs when the keywords appear in the comments: