Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

283 lines (283 sloc) 8.715 kB
{ "name": "Aria Templates",
"scopeName": "source.tpl",
"fileTypes": ["tpl", "tml", "tpl.css"],
"patterns": [
{
"name": "source.template.tpl",
"comment" : "matches : {Template {options}} ... {/Template}",
"begin": "\\{(Template)\\s*",
"beginCaptures": {
"1": {"name": "support.function.tpl"}
},
"end": "\\{/(Template)\\}",
"endCaptures": {
"1": {"name": "support.function.tpl"}
},
"patterns": [
{"include": "$self"},
{"include": "source.js"}
]
},{
"name": "source.csstemplate.tpl",
"comment" : "matches CSSTemplate : {CSSTemplate {options}} ... {/CSSTemplate} . Separate rule since css and js kept conflicting",
"begin": "\\{(CSSTemplate)\\s*",
"beginCaptures": {
"1": {"name": "support.function.tpl"}
},
"end": "\\{/(CSSTemplate)\\}",
"endCaptures": {
"1": {"name": "support.function.tpl"}
},
"patterns": [
{"include": "$self"},
{"include": "source.css"},
{"include": "source.js"}
]
},
{
"name" : "source.tag.tpl",
"comment" : "Simplified HTML tags",
"begin" : "</?\\s*(\\w+)",
"beginCaptures": {
"1": {"name": "keyword.tag.tpl"}
},
"end" : ">",
"patterns" : [
{"include":"#tag-stuff"},
{"include":"$self"}
]
},
{
"name": "source.widget.tpl",
"comment" : "matches any widget + content : {@lib:Widget {options}} ... {/@lib:Widget} or {@lib:Widget {options}/}",
"begin": "\\{/?\\s*(@\\w+)\\:(\\w+)\\s*",
"beginCaptures": {
"1": {"name": "support.function.tpl"},
"2": {"name": "keyword.tag.tpl"}
},
"end": "\\}",
"patterns": [
{"include": "source.js"},
{"include": "$self"}
]
},{
"name": "source.macro.begin.tpl",
"comment": "match macro opening : {macro myMacro(args)}",
"match": "\\{(macro)\\s+([a-zA-Z_$]\\w*)\\s*\\((.*?)\\)\\s*\\}",
"captures": {
"1": {"name": "support.function.tpl"},
"3": {"name": "variable.parameter.function.tpl"}
}
},
{"include" : "#tpl-statement"},
{"include" : "#tpl-expression"},
{"include": "#tpl-keyword"},
{"include": "#comment"}
],
"repository": {
"tpl-statement" : {
"comment": "match statement opening or ending: {xyz ...}, {/xyz} and short version {xyz/}",
"begin": "\\{/?\\s*(\\w+)\\b",
"beginCaptures": {
"1": {"name": "support.function.tpl"}
},
"end": "\\}",
"patterns": [
{"include": "source.js"},
{"include": "#tpl-keyword"}
]
},
"tpl-expression" : {
"comment" : "matches single line expressions : ${ ... }.Matches $ not preceded by \\, followed by _{_ then _any_ until the first _}_ that precedes EOL or _{_ or // with no other _}_ ib between",
"match": "(?<!\\\\)\\$\\{.*?(\\})(?=[^\\}]*($|\\{|//))",
"captures": {
"0": {"name": "constant.other.tpl"}
}
},
"tpl-keyword" : {
"patterns": [
{"include": "#tpl-basic-keyword"},
{"include": "#tpl-fwk-keyword"}
]
},
"tpl-basic-keyword" : {
"match": "\\b(data|bind|bindRefreshTo|bindProcessingTo|to|inside|inArray|inView|inSortedView)\\b",
"name": "storage.tag.tpl"
},
"tpl-fwk-keyword" : {
"comment" : "matches all $ keywords",
"match": "\\$\\w+",
"name": "storage.tag.tpl"
},
"tag-entities": {
"patterns": [
{"include": "#tpl-statement"},
{"include": "#tpl-expression"},
{
"captures": {
"1": {
"name": "punctuation.definition.entity.html"
},
"3": {
"name": "punctuation.definition.entity.html"
}
},
"match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
"name": "constant.character.entity.html"
},
{
"match": "&",
"name": "invalid.illegal.bad-ampersand.html"
},
{
"match": ".",
"name": "string.quoted.double.html"
}
]
},
"tag-string-double-quoted": {
"begin": "\"",
"beginCaptures": {
"0": {
"name": "string.quoted.double.html"
}
},
"end": "\"",
"endCaptures": {
"0": {
"name": "string.quoted.double.html"
}
},
"patterns": [
{
"include": "#tag-entities"
}
]
},
"tag-string-single-quoted": {
"begin": "'",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.html"
}
},
"end": "'",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.html"
}
},
"name": "string.quoted.single.html",
"patterns": [
{
"include": "#tag-entities"
}
]
},
"tag-generic-attribute": {
"match": "\\b([a-zA-Z\\-:]+)",
"name": "entity.other.attribute-name.html"
},
"tag-id-attribute": {
"begin": "\\b(id)\\b\\s*(=)",
"captures": {
"1": {
"name": "entity.other.attribute-name.id.html"
},
"2": {
"name": "punctuation.separator.key-value.html"
}
},
"end": "(?<='|\")",
"name": "meta.attribute-with-value.id.html",
"patterns": [
{
"begin": "\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.html"
}
},
"contentName": "meta.toc-list.id.html",
"end": "\"",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.html"
}
},
"name": "string.quoted.double.html",
"patterns": [
{
"include": "#tag-entities"
}
]
},
{
"begin": "'",
"beginCaptures": {
"0": {"name": "punctuation.definition.string.begin.html"}
},
"contentName": "meta.toc-list.id.html",
"end": "'",
"endCaptures": {
"0": {"name": "punctuation.definition.string.end.html"}
},
"name": "string.quoted.single.html",
"patterns": [
{
"include": "#tag-entities"
}
]
}
]
},
"tag-stuff": {
"patterns": [
{"include": "#tag-id-attribute"},
{"include": "#tag-generic-attribute"},
{"include": "#tag-string-double-quoted"},
{"include": "#tag-string-single-quoted"}
]
},
"comment-block-documentation" : {
"begin": "/\\*\\*(?!/)",
"captures": {
"0": {"name": "punctuation.definition.comment.js"}
},
"end": "\\*/",
"name" : "comment.block.documentation.tpl"
},
"comment-block": {
"begin": "/\\*",
"captures": {
"0": {"name": "punctuation.definition.comment.js"}
},
"end": "\\*/",
"name" : "comment.block.tpl"
},
"comment-line-double-slash" : {
"captures": {
"1": {"name": "punctuation.definition.comment.js"}
},
"match": "(//).*$\\n?",
"name" : "comment.line.double.slash.tpl"
},
"comment-block-html" : {
"captures": {
"0": {"name": "punctuation.definition.comment.html.js"},
"2": {"name": "punctuation.definition.comment.html.js"}
},
"match": "(<!--|-->)",
"name" : "comment.block.html.tpl"
},
"comment" : {
"patterns": [
{"include": "#comment-block-documentation"},
{"include": "#comment-block"},
{"include": "#comment-line-double-slash"},
{"include": "#comment-block-html"}
]
}
},
"uuid": "45dd46f3-4ff9-41c2-be21-662389784e9a"
}
Jump to Line
Something went wrong with that request. Please try again.