mirror of
https://github.com/cmur2/language-fluentd.git
synced 2024-12-22 02:54:25 +01:00
grammar: add support for escape sequenes in single, double and unquoted strings
This commit is contained in:
parent
f2d50423de
commit
ee37db2d42
@ -6,6 +6,7 @@ NEW FEATURES:
|
||||
|
||||
- Support folding markers for directives like `<source>...</source>`
|
||||
- Support toggling comments
|
||||
- Support escape sequenes like `foo\nbar` in single, double and unquoted strings
|
||||
|
||||
IMPROVEMENTS:
|
||||
|
||||
|
@ -77,6 +77,10 @@ repository:
|
||||
]
|
||||
values:
|
||||
patterns: [
|
||||
{
|
||||
match: '\\\\.'
|
||||
name: 'value.string.escape.fluentd'
|
||||
}
|
||||
{
|
||||
begin: '(")'
|
||||
beginCaptures:
|
||||
@ -87,6 +91,9 @@ repository:
|
||||
'1':
|
||||
name: 'punctuation.definition.string.end.fluentd'
|
||||
name: 'meta.value.string.quoted.double.fluentd'
|
||||
patterns: [
|
||||
{include: '#stringescapes'}
|
||||
]
|
||||
}
|
||||
{
|
||||
begin: "(')"
|
||||
@ -98,6 +105,9 @@ repository:
|
||||
'1':
|
||||
name: 'punctuation.definition.string.end.fluentd'
|
||||
name: 'meta.value.string.quoted.single.fluentd'
|
||||
patterns: [
|
||||
{include: '#stringescapes'}
|
||||
]
|
||||
}
|
||||
{
|
||||
match: '([^\\s]+?)'
|
||||
@ -107,3 +117,10 @@ repository:
|
||||
name: 'string.unquoted.fluentd'
|
||||
}
|
||||
]
|
||||
stringescapes:
|
||||
patterns: [
|
||||
{
|
||||
match: '\\\\.'
|
||||
name: 'constant.string.escape.fluentd'
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user