You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#5395
In a specific case, an end block (`#ENDBLOCK`) is parsed as a comment. This PR excludes end blocks from the definition of comments. Note comments are ignored in the parse tree, while end blocks are not. To ensure we will not leak an end block in an parse error message, I altered the textwithoutspaces to include a potential end block.
How to test
- Ensure that the following program does not produce an error in level 9
```
repeat 3 times
print 3
repeat 5 times
print 5
print 1
```
- Ensure that the following program does not show an error message which leaks a character from the endblock. It should mention that the unexpected character is a new line and not `#`:
```
for i in range 1 to 10
print i
```
Describe the bug
Adding an extra line in a nested block gives an error:
But without the final line, it does work:
The text was updated successfully, but these errors were encountered: