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

Add syntax highlight for double-bracketed parameters #68

Merged
merged 2 commits into from
Aug 14, 2023

Conversation

mint-thompson
Copy link
Collaborator

@mint-thompson mint-thompson commented Aug 10, 2023

Completes task CIMPL-1098.

The pattern for double-bracketed parameters is within the context of an insert rule with parameters, so double-brackets don't get highlighted in other situations. I tested this out with the insert rules with double-bracketed parameters used in SUSHI's FSHImporter tests. The lookbehind on the double-bracket begin rules is needed to highlight correctly when double-brackets follow an escaped ( or , character:

* insert SomeRules(123\, [[oh no]])

In this rule, the double-brackets do not indicate a double-bracketed parameter. There is one parameter with value 123, [[oh no]].

Copy link
Collaborator

@jafeltra jafeltra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! I also realized the highlighting got more messed up than I thought it did when you have quotation marks within the double brackets, and this fixes it! Yay!

@mint-thompson mint-thompson merged commit d696fdd into master Aug 14, 2023
14 checks passed
@mint-thompson mint-thompson deleted the cimpl-1098-highlight-double-bracket branch August 14, 2023 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants