-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
text.html.ecr.js
38 lines (36 loc) · 1.11 KB
/
text.html.ecr.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// This is a TextMate grammar distributed by `starry-night`.
// This grammar is developed at
// <https://github.com/atom-crystal/language-crystal>
// and licensed `mit`.
// See <https://github.com/wooorm/starry-night> for more info.
/**
* @import {Grammar} from '@wooorm/starry-night'
*/
/** @type {Grammar} */
const grammar = {
dependencies: ['source.crystal', 'text.html.basic'],
extensions: ['.ecr'],
injections: {'text.html.ecr': {patterns: [{include: '#tags'}]}},
names: ['html+ecr', 'ecr'],
patterns: [{include: 'text.html.basic'}],
repository: {
tags: {
patterns: [
{
begin: '(<%)(=)?',
beginCaptures: {
0: {name: 'punctuation.section.embedded.begin.ecr'},
2: {name: 'punctuation.section.embedded.return.ecr'}
},
contentName: 'source.crystal.embedded.ecr',
end: '%>',
endCaptures: {0: {name: 'punctuation.section.embedded.end.ecr'}},
name: 'meta.embedded.line.ecr',
patterns: [{include: 'source.crystal'}]
}
]
}
},
scopeName: 'text.html.ecr'
}
export default grammar