1
0
mirror of https://github.com/cmur2/language-fluentd.git synced 2024-12-22 02:54:25 +01:00

grammar: add (double quoted) string interpolations #{test} using Ruby

Related to adamchainz/fluentd.tmLanguage#3
This commit is contained in:
cn 2017-11-24 23:23:16 +01:00
parent 1d286163c9
commit cbdeef4bba
2 changed files with 13 additions and 0 deletions

View File

@ -10,6 +10,7 @@ NEW FEATURES:
- Support array and hash (using JSON source) value types like `["foo","bar"]` - Support array and hash (using JSON source) value types like `["foo","bar"]`
- Support integer, time and size value types (e.g. `property 100`, `bufsize 5M` or `finterval 5s`) - Support integer, time and size value types (e.g. `property 100`, `bufsize 5M` or `finterval 5s`)
- Support highlighting ${variables} (used by e.g. [record_transformer plugin](https://docs.fluentd.org/v0.12/articles/filter_record_transformer)) - Support highlighting ${variables} (used by e.g. [record_transformer plugin](https://docs.fluentd.org/v0.12/articles/filter_record_transformer))
- Support (double quoted) string interpolations like `#{Time.new.to_i + 1}` (using Ruby source)
IMPROVEMENTS: IMPROVEMENTS:

View File

@ -93,6 +93,7 @@ repository:
name: 'meta.value.string.quoted.double.fluentd' name: 'meta.value.string.quoted.double.fluentd'
patterns: [ patterns: [
{include: '#stringescapes'} {include: '#stringescapes'}
{include: '#stringinterpolations'}
] ]
} }
{ {
@ -168,3 +169,14 @@ repository:
name: 'constant.string.escape.fluentd' name: 'constant.string.escape.fluentd'
} }
] ]
stringinterpolations:
patterns: [
{
begin: '#\\{'
end: '\\}'
name: 'constant.string.interpolation.fluentd'
patterns: [
{include: 'source.ruby'}
]
}
]