-
Notifications
You must be signed in to change notification settings - Fork 4
/
tea.JSON-tmlanguage
152 lines (152 loc) · 5.58 KB
/
tea.JSON-tmlanguage
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
{
"fileTypes": [
"tea"
],
"foldingStartMarker": "(\\{\\s*(//.*)?$|^\\s*// \\{\\{\\{)",
"foldingStopMarker": "^\\s*(\\}|// \\}\\}\\}$)",
"name": "Tea",
"patterns": [
{
"begin": "<%",
"end": "%>",
"patterns": [
{ "include": "#language" }
]
},
{ "include": "text.html.basic" },
{ "include": "source.js" },
{ "include": "text.xml" }
],
"repository": {
"functions": {
"patterns": [
{
"match": "\\b(setLocale|getLocale|getAvailableLocales|nullFormat|getNullFormat|getDateFormat|getAvailableTimeZones|getDataFormatTimeZone|numberFormat|getNumberFormat|getNumberFormatInfinity|getNumberFormatNaN|currentDate|startsWith|endsWith|find|findFirst|substring|toLowerCase|toUpperCase|trim|trimLeading|trimTrailing|replace|replaceFirst|replaceLast|shortOrdinal|ordinal|cardinal)\\b(?=\\()",
"name": "support.function.tea"
}
]
},
"strings": {
"patterns": [
{
"begin": "\"",
"end": "\"",
"name": "string.quoted.double.tea",
"patterns": [
{
"match": "\\\\(x\\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)",
"name": "constant.character.escape.tea"
}
]
},
{
"begin": "'",
"end": "'",
"name": "string.quoted.single.tea",
"patterns": [
{
"match": "\\\\(x\\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)",
"name": "constant.character.escape.tea"
}
]
}
]
},
"language": {
"patterns": [
{ "include": "#strings" },
{ "include": "#functions" },
{
"name": "meta.template.tea",
"begin": "\\b(template)\\s+([a-zA-Z_$]\\w*)?\\s*(\\()",
"end": "(\\))",
"beginCaptures": {
"1": { "name": "storage.type.template.tea" },
"2": { "name": "entity.name.class.tea" }
},
"patterns": [
{
"match": "\\s*([a-zA-Z_$][\\w.]*)\\s+(\\w*)(?:,\\s*)?",
"captures": {
"1": { "name": "storage.type.tea" },
"2": { "name": "variable.parameter.template.tea" }
}
}
]
},
{
"name": "meta.template-call.tea",
"begin": "\\b(call)\\s+(.*?)\\(.*?",
"end": "\\)",
"beginCaptures": {
"1": { "name": "keyword.other.tea" },
"2": { "name": "entity.name.function.tea" }
},
"patterns": [
{ "include": "#functions" },
{ "include": "#strings" }
]
},
{
"match": "\\?:|\\?\\.|\\b(break|else|foreach|if|in|reverse)\\b",
"name": "keyword.control.tea"
},
{
"match": "#|##|\\.\\.|\\.\\.\\.|&|\\*\\.",
"name": "keyword.operator.tea"
},
{
"match": "(\\-|\\+|\\*|%)",
"name": "keyword.operator.arithmetic.tea"
},
{
"match": "(=)",
"name": "keyword.operator.assignment.tea"
},
{
"match": "(==|!=|<|>|<=|>=|<=>|\\b(and|not|or|isa)\\b)",
"name": "keyword.operator.comparison.tea"
},
{
"match": "(!)",
"name": "keyword.operator.logical.tea"
},
{
"match": "\\b(call|as|define)\\b",
"name": "keyword.other.tea"
},
{
"match": "\\b(true)\\b",
"name": "constant.language.boolean.true.tea"
},
{
"match": "\\b(false)\\b",
"name": "constant.language.boolean.false.tea"
},
{
"match": "\\b(null)\\b",
"name": "constant.language.null.tea"
},
{
"match": "\\b((0(x|X)[0-9a-fA-F]+)|([0-9]+(\\.[0-9]+)?))\\b",
"name": "constant.numeric.tea"
},
{
"match": "(//).*$\\n?",
"name": "comment.line.double-slash.tea"
},
{
"begin": "/\\*",
"end": "\\*/",
"name": "comment.block.tea"
},
{
"match": "\\;",
"name": "punctuation.terminator.statement.tea"
}
]
}
},
"scopeName": "source.tea",
"uuid": "89c32adb-9c57-4d3a-982a-3b2d3b6625fb"
}