-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathtext.html.ftl.js
58 lines (56 loc) · 1.78 KB
/
text.html.ftl.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// This is a TextMate grammar distributed by `starry-night`.
// This grammar is licensed `mit`.
// See <https://github.com/wooorm/starry-night> for more info.
/**
* @import {Grammar} from '@wooorm/starry-night'
*/
/** @type {Grammar} */
const grammar = {
dependencies: ['text.html.basic'],
extensions: [],
names: ['freemarker', 'ftl'],
patterns: [
{
begin: '[<\\[]#--',
captures: {0: {name: 'punctuation.definition.comment.ftl'}},
end: '--[>\\]]',
name: 'comment.block.ftl'
},
{
captures: {
1: {name: 'punctuation.definition.function.ftl'},
2: {name: 'punctuation.definition.function.ftl'},
3: {name: 'entity.name.function.ftl'},
5: {name: 'variable.parameter.function.ftl'},
8: {name: 'entity.name.function.ftl'},
9: {name: 'punctuation.definition.function.ftl'}
},
match:
'([<\\[](#|@))(\\w+(\\.\\w+)*)((\\s+[^>\\]]+)*?)\\s*((\\/)?([>\\]]))',
name: 'meta.function.ftl'
},
{
captures: {
1: {name: 'punctuation.definition.function.ftl'},
2: {name: 'punctuation.definition.function.ftl'},
3: {name: 'entity.name.function.ftl'},
5: {name: 'punctuation.definition.function.ftl'}
},
match: '([<\\[]\\/(#|@))(\\w+(\\.\\w+)*)\\s*([>\\]])',
name: 'meta.function.ftl'
},
{
captures: {
1: {name: 'punctuation.definition.variable.ftl'},
3: {name: 'entity.name.function.ftl'},
4: {name: 'punctuation.definition.variable.ftl'}
},
match:
'(\\$\\{)\\.?[a-zA-Z_\\(][\\w\\(\\)+-\\/\\*]+(\\.?[\\w\\(\\)+-\\/\\*]+)*(.*?|\\?\\?|\\!)?(\\})',
name: 'variable.other.readwrite.local.ftl'
},
{include: 'text.html.basic'}
],
scopeName: 'text.html.ftl'
}
export default grammar