mirror of
https://github.com/cmur2/language-fluentd.git
synced 2024-12-22 12:54:26 +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 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
|
||||||
|
|
||||||
IMPROVEMENTS:
|
IMPROVEMENTS:
|
||||||
|
|
||||||
|
@ -77,6 +77,10 @@ repository:
|
|||||||
]
|
]
|
||||||
values:
|
values:
|
||||||
patterns: [
|
patterns: [
|
||||||
|
{
|
||||||
|
match: '\\\\.'
|
||||||
|
name: 'value.string.escape.fluentd'
|
||||||
|
}
|
||||||
{
|
{
|
||||||
begin: '(")'
|
begin: '(")'
|
||||||
beginCaptures:
|
beginCaptures:
|
||||||
@ -87,6 +91,9 @@ repository:
|
|||||||
'1':
|
'1':
|
||||||
name: 'punctuation.definition.string.end.fluentd'
|
name: 'punctuation.definition.string.end.fluentd'
|
||||||
name: 'meta.value.string.quoted.double.fluentd'
|
name: 'meta.value.string.quoted.double.fluentd'
|
||||||
|
patterns: [
|
||||||
|
{include: '#stringescapes'}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
begin: "(')"
|
begin: "(')"
|
||||||
@ -98,6 +105,9 @@ repository:
|
|||||||
'1':
|
'1':
|
||||||
name: 'punctuation.definition.string.end.fluentd'
|
name: 'punctuation.definition.string.end.fluentd'
|
||||||
name: 'meta.value.string.quoted.single.fluentd'
|
name: 'meta.value.string.quoted.single.fluentd'
|
||||||
|
patterns: [
|
||||||
|
{include: '#stringescapes'}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
match: '([^\\s]+?)'
|
match: '([^\\s]+?)'
|
||||||
@ -107,3 +117,10 @@ repository:
|
|||||||
name: 'string.unquoted.fluentd'
|
name: 'string.unquoted.fluentd'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
stringescapes:
|
||||||
|
patterns: [
|
||||||
|
{
|
||||||
|
match: '\\\\.'
|
||||||
|
name: 'constant.string.escape.fluentd'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user