mirror of
https://github.com/cmur2/language-fluentd.git
synced 2024-09-07 16:50:15 +02:00
grammar: support some flavors of value types like array/hash (using JSON source), integer etc
This commit is contained in:
parent
ee37db2d42
commit
8396584552
@ -7,6 +7,8 @@ NEW FEATURES:
|
|||||||
- Support folding markers for directives like `<source>...</source>`
|
- Support folding markers for directives like `<source>...</source>`
|
||||||
- Support toggling comments
|
- Support toggling comments
|
||||||
- Support escape sequenes like `foo\nbar` in single, double and unquoted strings
|
- Support escape sequenes like `foo\nbar` in single, double and unquoted strings
|
||||||
|
- 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`)
|
||||||
|
|
||||||
IMPROVEMENTS:
|
IMPROVEMENTS:
|
||||||
|
|
||||||
|
@ -109,6 +109,46 @@ repository:
|
|||||||
{include: '#stringescapes'}
|
{include: '#stringescapes'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
begin: '(\\[)'
|
||||||
|
beginCaptures:
|
||||||
|
'1':
|
||||||
|
name: 'punctuation.definition.array.begin.fluentd'
|
||||||
|
end: '(\\])'
|
||||||
|
endCaptures:
|
||||||
|
'1':
|
||||||
|
name: 'punctuation.definition.array.end.fluentd'
|
||||||
|
name: 'meta.value.array.fluentd'
|
||||||
|
patterns: [
|
||||||
|
{include: 'source.json'}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
{
|
||||||
|
begin: '\\{'
|
||||||
|
beginCaptures:
|
||||||
|
'1':
|
||||||
|
name: 'punctuation.definition.hash.begin.fluentd'
|
||||||
|
end: '\\}'
|
||||||
|
endCaptures:
|
||||||
|
'1':
|
||||||
|
name: 'punctuation.definition.hash.end.fluentd'
|
||||||
|
name: 'meta.value.hash.fluentd'
|
||||||
|
patterns: [
|
||||||
|
{include: 'source.json'}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
{
|
||||||
|
match: '\\b(\\d+)\\b'
|
||||||
|
name: 'value.constant.integer.fluentd'
|
||||||
|
}
|
||||||
|
{
|
||||||
|
match: '\\b(\\d+[kmgtKMGT])\\b'
|
||||||
|
name: 'value.constant.size.fluentd'
|
||||||
|
}
|
||||||
|
{
|
||||||
|
match: '\\b(\\d+[smhd])\\b'
|
||||||
|
name: 'value.constant.time.fluentd'
|
||||||
|
}
|
||||||
{
|
{
|
||||||
match: '([^\\s]+?)'
|
match: '([^\\s]+?)'
|
||||||
name: 'meta.string.unquoted.fluentd'
|
name: 'meta.string.unquoted.fluentd'
|
||||||
|
Loading…
Reference in New Issue
Block a user