|
21 | 21 | "templates": { |
22 | 22 | "patterns": [ |
23 | 23 | { |
24 | | - "include": "#section_start_tag" |
| 24 | + "include": "#section_start_default_tag" |
25 | 25 | }, |
26 | 26 | { |
27 | | - "include": "#section_end_tag" |
| 27 | + "include": "#section_end_default_tag" |
| 28 | + }, |
| 29 | + { |
| 30 | + "include": "#section_start_user_tag" |
| 31 | + }, |
| 32 | + { |
| 33 | + "include": "#section_end_user_tag" |
28 | 34 | }, |
29 | 35 | { |
30 | 36 | "include": "#double_bracket" |
|
79 | 85 | }, |
80 | 86 | "name": "string.unquoted.cdata.qute" |
81 | 87 | }, |
82 | | - "section_start_tag": { |
83 | | - "begin": "({)(#)(else\\sif|\\w+(\\.\\w+)*)", |
| 88 | + "section_start_default_tag": { |
| 89 | + "begin": "({)(#)((each|else|else\\sif|eval|for|if|include|insert|set|let|with|switch|case|is|when)\\b)", |
84 | 90 | "end": "(\\/)?((?<![\\\\])})", |
85 | 91 | "beginCaptures": { |
86 | 92 | "1": { |
|
107 | 113 | } |
108 | 114 | ] |
109 | 115 | }, |
110 | | - "section_end_tag": { |
111 | | - "begin": "({)(\\/)(\\w+(\\.\\w+)*)?\\s*", |
| 116 | + "section_end_default_tag": { |
| 117 | + "begin": "({)(\\/)((each|else|else\\sif|eval|for|if|include|insert|set|let|with|switch|case|is|when)\\b)", |
112 | 118 | "end": "((?<![\\\\])})", |
113 | 119 | "beginCaptures": { |
114 | 120 | "1": { |
|
127 | 133 | } |
128 | 134 | } |
129 | 135 | }, |
130 | | - "section_start_tag_content": { |
131 | | - "match": "((\\s+[^}\\/]+)*)\\s*", |
132 | | - "name": "variable.parameter.function.qute" |
| 136 | + "section_start_user_tag": { |
| 137 | + "begin": "({)(#)(\\w+(\\.\\w+)*)", |
| 138 | + "end": "(\\/)?((?<![\\\\])})", |
| 139 | + "beginCaptures": { |
| 140 | + "1": { |
| 141 | + "name": "support.constant.handlebars" |
| 142 | + }, |
| 143 | + "2": { |
| 144 | + "name": "entity.name.function.hash" |
| 145 | + }, |
| 146 | + "3": { |
| 147 | + "name": "entity.name.function.identifier" |
| 148 | + } |
| 149 | + }, |
| 150 | + "endCaptures": { |
| 151 | + "1": { |
| 152 | + "name": "keyword.control" |
| 153 | + }, |
| 154 | + "2": { |
| 155 | + "name": "support.constant.handlebars" |
| 156 | + } |
| 157 | + }, |
| 158 | + "patterns": [ |
| 159 | + { |
| 160 | + "include": "#code" |
| 161 | + } |
| 162 | + ] |
| 163 | + }, |
| 164 | + "section_end_user_tag": { |
| 165 | + "begin": "({)(\\/)(\\w+(\\.\\w+)*)?\\s*", |
| 166 | + "end": "((?<![\\\\])})", |
| 167 | + "beginCaptures": { |
| 168 | + "1": { |
| 169 | + "name": "support.constant.handlebars" |
| 170 | + }, |
| 171 | + "2": { |
| 172 | + "name": "entity.name.function.slash" |
| 173 | + }, |
| 174 | + "3": { |
| 175 | + "name": "entity.name.function.identifier" |
| 176 | + } |
| 177 | + }, |
| 178 | + "endCaptures": { |
| 179 | + "1": { |
| 180 | + "name": "support.constant.handlebars" |
| 181 | + } |
| 182 | + } |
133 | 183 | }, |
134 | 184 | "double_bracket": { |
135 | 185 | "match": "{{" |
|
321 | 371 | "match": "\\?|:", |
322 | 372 | "name": "keyword.control.ternary.java" |
323 | 373 | }, |
324 | | - { |
325 | | - "match": "\\b(return|break|case|continue|default|do|while|for|switch|if|else)\\b", |
326 | | - "name": "keyword.control.java" |
327 | | - }, |
328 | | - { |
329 | | - "match": "\\b(instanceof)\\b", |
330 | | - "name": "keyword.operator.instanceof.java" |
331 | | - }, |
332 | 374 | { |
333 | 375 | "match": "(<<|>>>?|~|\\^)", |
334 | 376 | "name": "keyword.operator.bitwise.java" |
|
365 | 407 | "match": "(\\||&)", |
366 | 408 | "name": "keyword.operator.bitwise.java" |
367 | 409 | }, |
368 | | - { |
369 | | - "match": "\\b(const|goto)\\b", |
370 | | - "name": "keyword.reserved.java" |
371 | | - }, |
372 | 410 | { |
373 | 411 | "match": "\\b(is|as|eq|ne|gt|ge|lt|le)\\b", |
374 | 412 | "name": "keyword.control.operator" |
|
0 commit comments