FHIR / vscode-fsh

A Visual Studio Code language extension for FHIR Shorthand (FSH)
Apache License 2.0
18 stars 3 forks source link

Add syntax highlight for double-bracketed parameters #68

Closed mint-thompson closed 1 year ago

mint-thompson commented 1 year ago

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]].