tm-grammars
Version:
Collecton of TextMate grammars in JSON
59 lines (58 loc) • 1.3 kB
JSON
{
"injectTo": [
"text.html.derivative",
"text.html.derivative.ng",
"source.ts.ng"
],
"injectionSelector": "L:text.html -comment -expression.ng -meta.tag -source.css -source.js",
"name": "angular-let-declaration",
"patterns": [
{
"include": "#letDeclaration"
}
],
"repository": {
"letDeclaration": {
"begin": "(@let)\\s+([$_[:alpha:]][$_[:alnum:]]*)\\s*(=)?",
"beginCaptures": {
"1": {
"name": "storage.type.ng"
},
"2": {
"name": "variable.other.constant.ng"
},
"3": {
"name": "keyword.operator.assignment.ng"
}
},
"end": "(?<=;)",
"name": "meta.definition.variable.ng",
"patterns": [
{
"include": "#letInitializer"
}
]
},
"letInitializer": {
"begin": "\\s*",
"beginCaptures": {
"0": {
"name": "keyword.operator.assignment.ng"
}
},
"contentName": "meta.definition.variable.initializer.ng",
"end": ";",
"endCaptures": {
"0": {
"name": "punctuation.terminator.statement.ng"
}
},
"patterns": [
{
"include": "expression.ng"
}
]
}
},
"scopeName": "template.let.ng"
}