Skip to content
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 highlighting for nested expression syntax #940

Merged
merged 2 commits into from
Feb 22, 2022

Conversation

dbanck
Copy link
Member

@dbanck dbanck commented Feb 18, 2022

This PR adds support for nested expressions.

Since all regular expressions used in grammar match rules must apply to a single line at a time, we can't reuse the existing for patterns. So instead, new patterns are added to the brackets and objects patterns to match for and if statements.

UX Change

Before
CleanShot 2022-02-18 at 19 25 32@2x

After
CleanShot 2022-02-18 at 19 24 57@2x

Closes #926

@jpogran jpogran added this to the 2.20.0 milestone Feb 18, 2022
@jpogran jpogran added the syntax label Feb 18, 2022
@dbanck dbanck added the bug Something isn't working label Feb 18, 2022
Since all regular expressions used in grammar match rules must apply
to a single line at a time, we can't reuse the existing `for` patterns.
New patterns are in included in the brackets and objects patterns to
match `for` and `if` statements.
@dbanck dbanck force-pushed the bug-nested-expression-syntax branch from c3e36be to e599d9b Compare February 18, 2022 19:17
@dbanck dbanck marked this pull request as ready for review February 18, 2022 19:20
@dbanck dbanck requested a review from a team February 18, 2022 19:20
@dbanck dbanck merged commit aa5af1b into main Feb 22, 2022
@dbanck dbanck deleted the bug-nested-expression-syntax branch February 22, 2022 14:29
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working syntax
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing highlighting for nested for expressions
3 participants