Skip to content

Commit

Permalink
Update new syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
RedCMD committed May 31, 2024
1 parent db61707 commit 61d9d23
Show file tree
Hide file tree
Showing 5 changed files with 977 additions and 247 deletions.
48 changes: 48 additions & 0 deletions syntaxes/yaml-1.0.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$schema": "https://raw.githubusercontent.com/RedCMD/TmLanguage-Syntax-Highlighter/main/vscode.tmLanguage.schema.json",
"scopeName": "source.yaml.1.0",
"name": "YAML 1.0",
"patterns": [ ],
"repository": {
"directive-YAML": {
"comment": "https://yaml.org/spec/1.2.2/#681-yaml-directives",
"begin": "(?=%YAML:1\\.0)",
"end": "\\G(?=%(?!YAML:1\\.0))",
"name": "yaml-1.0",
"patterns": [
{
"comment": "https://yaml.org/spec/1.2.2/#681-yaml-directives",
"begin": "\\G(%)(YAML)(:)(1\\.0)",
"while": "\\G(?!---(?> |\t|$))",
"beginCaptures": {
"0": { "name": "meta.directive.yaml" },
"1": { "name": "punctuation.definition.directive.begin.yaml" },
"2": { "name": "keyword.other.directive.yaml.yaml" },
"3": { "name": "punctuation.whitespace.separator.yaml" },
"4": { "name": "constant.numeric.yaml-version.yaml" }
},
"name": "directives",
"patterns": [
{
"match": "\\G\\.{3}(?= |\t|$)",
"name": "invalid.illegal.entity.other.document.end.yaml"
},
{ "include": "source.yaml#directive-invalid" },
{ "include": "source.yaml#directives" },
{ "include": "source.yaml#presentation-detail" }
]
},
{
"begin": "\\G(?=---(?> |\t|$))",
"while": "\\G(?!%)",
"name": "doc",
"patterns": [
{ "include": "source.yaml#document" },
{ "include": "source.yaml#presentation-detail" }
]
},
{ "include": "source.yaml#presentation-detail" }
]
}
}
}
48 changes: 48 additions & 0 deletions syntaxes/yaml-1.1.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$schema": "https://raw.githubusercontent.com/RedCMD/TmLanguage-Syntax-Highlighter/main/vscode.tmLanguage.schema.json",
"scopeName": "source.yaml.1.1",
"name": "YAML 1.1",
"patterns": [ ],
"repository": {
"directive-YAML": {
"comment": "https://yaml.org/spec/1.2.2/#681-yaml-directives",
"begin": "(?=%YAML[ \t]+1\\.1)",
"end": "\\G(?=%(?!YAML[ \t]+1\\.1))",
"name": "yaml-1.1",
"patterns": [
{
"comment": "https://yaml.org/spec/1.2.2/#681-yaml-directives",
"begin": "\\G(%)(YAML)([ \t]+)(1\\.1)",
"while": "\\G(?!---(?> |\t|$))",
"beginCaptures": {
"0": { "name": "meta.directive.yaml" },
"1": { "name": "punctuation.definition.directive.begin.yaml" },
"2": { "name": "keyword.other.directive.yaml.yaml" },
"3": { "name": "punctuation.whitespace.separator.yaml" },
"4": { "name": "constant.numeric.yaml-version.yaml" }
},
"name": "directives",
"patterns": [
{
"match": "\\G\\.{3}(?= |\t|$)",
"name": "invalid.illegal.entity.other.document.end.yaml"
},
{ "include": "source.yaml#directive-invalid" },
{ "include": "source.yaml#directives" },
{ "include": "source.yaml#presentation-detail" }
]
},
{
"begin": "\\G(?=---(?> |\t|$))",
"while": "\\G(?!%)",
"name": "doc",
"patterns": [
{ "include": "source.yaml#document" },
{ "include": "source.yaml#presentation-detail" }
]
},
{ "include": "source.yaml#presentation-detail" }
]
}
}
}
48 changes: 48 additions & 0 deletions syntaxes/yaml-1.2.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$schema": "https://raw.githubusercontent.com/RedCMD/TmLanguage-Syntax-Highlighter/main/vscode.tmLanguage.schema.json",
"scopeName": "source.yaml.1.2",
"name": "YAML 1.2",
"patterns": [ ],
"repository": {
"directive-YAML": {
"comment": "https://yaml.org/spec/1.2.2/#681-yaml-directives",
"begin": "(?=%YAML[ \t]+1\\.2)",
"end": "\\G(?=(?>\\.{3}|---)(?> |\t|$))",
"name": "yaml-1.2",
"patterns": [
{
"comment": "https://yaml.org/spec/1.2.2/#681-yaml-directives",
"begin": "\\G(%)(YAML)([ \t]+)(1\\.2)",
"end": "\\G(?=---(?> |\t|$))",
"beginCaptures": {
"0": { "name": "meta.directive.yaml" },
"1": { "name": "punctuation.definition.directive.begin.yaml" },
"2": { "name": "keyword.other.directive.yaml.yaml" },
"3": { "name": "punctuation.whitespace.separator.yaml" },
"4": { "name": "constant.numeric.yaml-version.yaml" }
},
"name": "meta.directive.yaml",
"patterns": [
{
"match": "\\G\\.{3}(?= |\t|$)",
"name": "invalid.illegal.entity.other.document.end.yaml"
},
{ "include": "source.yaml#directive-invalid" },
{ "include": "source.yaml#directives" },
{ "include": "source.yaml#presentation-detail" }
]
},
{
"begin": "(?=---(?> |\t|$))",
"while": "\\G(?!(?>\\.{3}|---)(?> |\t|$))",
"name": "doc",
"patterns": [
{ "include": "source.yaml#document" },
{ "include": "source.yaml#presentation-detail" }
]
},
{ "include": "source.yaml#presentation-detail" }
]
}
}
}
9 changes: 9 additions & 0 deletions syntaxes/yaml-1.3.tmLanguage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://raw.githubusercontent.com/RedCMD/TmLanguage-Syntax-Highlighter/main/vscode.tmLanguage.schema.json",
"scopeName": "source.yaml.1.3",
"name": "YAML 1.3",
"patterns": [ ],
"repository": {
"directive-YAML": { }
}
}
Loading

0 comments on commit 61d9d23

Please sign in to comment.