Skip to content
46 changes: 1 addition & 45 deletions packages/shiki/languages/astro.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
"name": "astro",
"scopeName": "source.astro",
"patterns": [
{
"include": "#astro:markdown"
},
{
"include": "#astro:expressions"
},
Expand Down Expand Up @@ -435,7 +432,7 @@
},
"html:attribute": {
"name": "meta.attribute.$1.html",
"match": "\\b(@?[a-zA-Z\\-:]+)(=?)",
"match": "([a-zA-Z\\-:@_.]+)(=?)",
"captures": {
"1": {
"name": "entity.other.attribute-name.html"
Expand Down Expand Up @@ -657,47 +654,6 @@
}
]
},
"astro:markdown": {
"begin": "(<)(Markdown)",
"end": "(</)(Markdown)\\s*(>)|(/>)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.tag.begin.astro"
},
"2": {
"name": "entity.name.tag.astro support.class.component.astro"
}
},
"endCaptures": {
"1": {
"name": "punctuation.definition.tag.begin.astro"
},
"2": {
"name": "entity.name.tag.astro support.class.component.astro"
},
"3": {
"name": "punctuation.definition.tag.end.astro"
},
"4": {
"name": "punctuation.definition.tag.end.astro"
}
},
"patterns": [
{
"begin": "(?<=>)(?!</)",
"end": "(?=</)",
"contentName": "text.html.markdown",
"patterns": [
{
"include": "text.html.markdown"
}
]
},
{
"include": "#html:tag-attributes"
}
]
},
"frontmatter": {
"comment": "The frontmatter is treated as comments in order to get the \"faded\" look",
"begin": "\\A(-{3})\\s*$",
Expand Down
95 changes: 45 additions & 50 deletions packages/shiki/languages/bicep.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,23 @@
}
]
},
"directive": {
"name": "meta.directive.bicep",
"begin": "#\\b[_a-zA-Z-0-9]+\\b",
"end": "$",
"patterns": [
{
"include": "#directive-variable"
},
{
"include": "#comments"
}
]
},
"directive-variable": {
"name": "keyword.control.declaration.bicep",
"match": "\\b[_a-zA-Z-0-9]+\\b"
},
"escape-character": {
"name": "constant.character.escape.bicep",
"match": "\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|'|\\${)"
Expand Down Expand Up @@ -88,6 +105,12 @@
},
{
"include": "#decorator"
},
{
"include": "#lambda-start"
},
{
"include": "#directive"
}
]
},
Expand Down Expand Up @@ -117,6 +140,24 @@
"name": "keyword.control.declaration.bicep",
"match": "\\b(targetScope|resource|module|param|var|output|for|in|if|existing|import|from)\\b"
},
"lambda-start": {
"name": "meta.lambda-start.bicep",
"begin": "(\\((?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*\\b[_$[:alpha:]][_$[:alnum:]]*\\b(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*(,(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*\\b[_$[:alpha:]][_$[:alnum:]]*\\b(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*)*\\)|\\((?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*\\)|(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*\\b[_$[:alpha:]][_$[:alnum:]]*\\b(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*)(?=(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*=>)",
"beginCaptures": {
"1": {
"name": "meta.undefined.bicep",
"patterns": [
{
"include": "#identifier"
},
{
"include": "#comments"
}
]
}
},
"end": "(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*=>"
},
"line-comment": {
"name": "comment.line.double-slash.bicep",
"match": "//.*(?=$)"
Expand All @@ -135,49 +176,8 @@
"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": "#object-property-key"
},
{
"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"
},
Expand All @@ -186,14 +186,9 @@
}
]
},
"object-property-key-identifier": {
"name": "meta.object-property-key-identifier.bicep",
"match": "(\\b[_$[:alpha:]][_$[:alnum:]]*\\b)",
"captures": {
"1": {
"name": "variable.other.property.bicep"
}
}
"object-property-key": {
"name": "variable.other.property.bicep",
"match": "\\b[_$[:alpha:]][_$[:alnum:]]*\\b(?=(?:[ \\t\\r\\n]|\\/\\*(?:\\*(?!\\/)|[^*])*\\*\\/)*:)"
},
"string-literal": {
"name": "string.quoted.single.bicep",
Expand Down
Loading