add helper for assembling long scope lists
This commit is contained in:
parent
2a78eb3f2d
commit
a1a0750d6a
2 changed files with 18 additions and 8 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import embeddedLanguages from '../embeddedLanguages.mjs';
|
||||
import {merge} from '../util.mjs';
|
||||
import {merge, scopes} from '../util.mjs';
|
||||
|
||||
const elements = merge(embeddedLanguages.map(embeddedLanguage => ({
|
||||
[`tagged-template-literal-block-${embeddedLanguage.id}`]: {
|
||||
|
|
@ -7,18 +7,26 @@ const elements = merge(embeddedLanguages.map(embeddedLanguage => ({
|
|||
end: '`',
|
||||
beginCaptures: {
|
||||
1: {
|
||||
name:
|
||||
'entity.name.function.tagged-template.js entity.name.embedded-language',
|
||||
name: scopes(
|
||||
'entity.name.function.tagged-template.js',
|
||||
'entity.name.embedded-source',
|
||||
),
|
||||
},
|
||||
2: {
|
||||
name:
|
||||
'string.template.js punctuation.definition.string.template.begin.js punctuation.definition.embedded-source.begin',
|
||||
name: scopes(
|
||||
'string.template.js',
|
||||
'punctuation.definition.string.template.begin.js',
|
||||
'punctuation.definition.embedded-source.begin',
|
||||
),
|
||||
},
|
||||
},
|
||||
endCaptures: {
|
||||
0: {
|
||||
name:
|
||||
'string.template.js punctuation.definition.string.template.end.js punctuation.definition.embedded-source.end',
|
||||
name: scopes(
|
||||
'string.template.js',
|
||||
'punctuation.definition.string.template.end.js',
|
||||
'punctuation.definition.embedded-source.end',
|
||||
),
|
||||
},
|
||||
},
|
||||
contentName: embeddedLanguage.embedScopeBlock,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue