Blazebit / blaze-expression

Apache License 2.0
5 stars 6 forks source link

Introduce template language #22

Closed beikov closed 3 years ago

beikov commented 3 years ago

To support user defined text templates that can make use of the expression language, we should introduce a custom syntax to embedd the expression language in arbitrary text. I will use #{ and } for this purpose, where pre-text #{expression} post-text logically translates to 'pre-text ' + expression + ' post-text' + escaping of special tokens in the text.

Support for this should be added through a dedicated API that can parse that. A serializer that emits this template form should also be available. The monaco editor should also support this with special highlighting of the delimiters #{ and } and auto-completion support only within the delimiters.