Urara-Blog/node_modules/.pnpm-store/v3/files/db/7a4d613d17aea57d0f2d836e2b97b5c250413f0f6a010877a378c931f6dde5e9732962ce9f1b6a000126c483a2ff342bfe8a741e02dc4fe55a756fb95fbc04
2022-08-14 01:14:53 +08:00

241 lines
5.5 KiB
Text

{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "bicep",
"scopeName": "source.bicep",
"fileTypes": [".bicep"],
"patterns": [
{
"include": "#expression"
},
{
"include": "#comments"
}
],
"repository": {
"array-literal": {
"name": "meta.array-literal.bicep",
"begin": "\\[(?!(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*\\bfor\\b)",
"end": "]",
"patterns": [
{
"include": "#expression"
},
{
"include": "#comments"
}
]
},
"block-comment": {
"name": "comment.block.bicep",
"begin": "/\\*",
"end": "\\*/"
},
"comments": {
"patterns": [
{
"include": "#line-comment"
},
{
"include": "#block-comment"
}
]
},
"decorator": {
"name": "meta.decorator.bicep",
"begin": "@(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*(?=\\b[_$[:alpha:]][_$[:alnum:]]*\\b)",
"end": "",
"patterns": [
{
"include": "#expression"
},
{
"include": "#comments"
}
]
},
"escape-character": {
"name": "constant.character.escape.bicep",
"match": "\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|'|\\${)"
},
"expression": {
"patterns": [
{
"include": "#string-literal"
},
{
"include": "#string-verbatim"
},
{
"include": "#numeric-literal"
},
{
"include": "#named-literal"
},
{
"include": "#object-literal"
},
{
"include": "#array-literal"
},
{
"include": "#keyword"
},
{
"include": "#identifier"
},
{
"include": "#function-call"
},
{
"include": "#decorator"
}
]
},
"function-call": {
"name": "meta.function-call.bicep",
"begin": "(\\b[_$[:alpha:]][_$[:alnum:]]*\\b)(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*\\(",
"beginCaptures": {
"1": {
"name": "entity.name.function.bicep"
}
},
"end": "\\)",
"patterns": [
{
"include": "#expression"
},
{
"include": "#comments"
}
]
},
"identifier": {
"name": "variable.other.readwrite.bicep",
"match": "\\b[_$[:alpha:]][_$[:alnum:]]*\\b(?!(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*\\()"
},
"keyword": {
"name": "keyword.control.declaration.bicep",
"match": "\\b(targetScope|resource|module|param|var|output|for|in|if|existing|import|from)\\b"
},
"line-comment": {
"name": "comment.line.double-slash.bicep",
"match": "//.*(?=$)"
},
"named-literal": {
"name": "constant.language.bicep",
"match": "\\b(true|false|null)\\b"
},
"numeric-literal": {
"name": "constant.numeric.bicep",
"match": "[0-9]+"
},
"object-literal": {
"name": "meta.object-literal.bicep",
"begin": "{",
"end": "}",
"patterns": [
{
"include": "#object-property"
},
{
"include": "#comments"
}
]
},
"object-property": {
"name": "meta.object-property.bicep",
"begin": "(?<=^)(?!(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*})",
"end": "(?=$)",
"patterns": [
{
"include": "#object-property-key-identifier"
},
{
"include": "#string-literal"
},
{
"include": "#object-property-end"
},
{
"include": "#comments"
}
]
},
"object-property-end": {
"name": "meta.object-property-end.bicep",
"begin": ":((?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*)",
"beginCaptures": {
"1": {
"patterns": [
{
"include": "#line-comment"
},
{
"include": "#block-comment"
}
]
}
},
"end": "(?=(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*$)",
"patterns": [
{
"include": "#expression"
},
{
"include": "#comments"
}
]
},
"object-property-key-identifier": {
"name": "meta.object-property-key-identifier.bicep",
"match": "(\\b[_$[:alpha:]][_$[:alnum:]]*\\b)",
"captures": {
"1": {
"name": "variable.other.property.bicep"
}
}
},
"string-literal": {
"name": "string.quoted.single.bicep",
"begin": "'(?!'')",
"end": "'",
"patterns": [
{
"include": "#escape-character"
},
{
"include": "#string-literal-subst"
}
]
},
"string-literal-subst": {
"name": "meta.string-literal-subst.bicep",
"begin": "(?<!\\\\)(\\${)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.template-expression.begin.bicep"
}
},
"end": "(})",
"endCaptures": {
"1": {
"name": "punctuation.definition.template-expression.end.bicep"
}
},
"patterns": [
{
"include": "#expression"
},
{
"include": "#comments"
}
]
},
"string-verbatim": {
"name": "string.quoted.multi.bicep",
"begin": "'''",
"end": "'''",
"patterns": []
}
}
}