-
Notifications
You must be signed in to change notification settings - Fork 289
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
[FIX] Proper marking of flat compound statements while debugging #4766
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork). |
@@ -452,7 +451,7 @@ describe('Test editor box functionality', () => { | |||
cy.focused().type("repeat 1 times if x is x print 'a'\nelse print 'b'"); | |||
|
|||
cy.get('#debug_button').click(); | |||
cy.wait('@parse'); | |||
cy.wait('@parse') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed a semicolon and they magically worked again 😐
Description
Changes the regex that was used to group the different parts of the flat compound statements to be able to properly color nested flat statements. Also changes the way the line is computed.
A nested flat statement are
if
withrepeat
inside or viceversa. You cannot place anif
inside aif
, but you can place arepeat
inside arepeat
.Even though we say these statements are flat, it's possible to add newlines between them. And this is where the problem lied. When these statements where split between lines, the code did not account for beginning and end of statements properly.
**Fixes #4725 **
How to test
I added a couple of tests!