Skip to content

Commit

Permalink
Overhaul block and flow nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
RedCMD committed Jun 5, 2024
1 parent 0a6f75e commit 2f81f85
Show file tree
Hide file tree
Showing 4 changed files with 616 additions and 442 deletions.
14 changes: 4 additions & 10 deletions syntaxes/yaml-1.0.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,28 @@
"comment": "https://yaml.org/spec/1.2.2/#681-yaml-directives",
"begin": "(?=%YAML:1\\.0)",
"end": "\\G(?=%(?!YAML:1\\.0))",
"name": "yaml-1.0",
"name": "meta.1.0.yaml",
"patterns": [
{
"comment": "https://yaml.org/spec/1.2.2/#681-yaml-directives",
"begin": "\\G(%)(YAML)(:)(1\\.0)",
"while": "\\G(?!---(?> |\t|$))",
"while": "\\G(?!---[\r\n\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",
"name": "meta.directives.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": "\\G(?=---(?> |\t|$))",
"begin": "\\G(?=---[\r\n\t ])",
"while": "\\G(?!%)",
"name": "doc",
"patterns": [
{ "include": "source.yaml#document" },
{ "include": "source.yaml#presentation-detail" }
Expand Down
14 changes: 4 additions & 10 deletions syntaxes/yaml-1.1.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,28 @@
"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",
"name": "meta.1.1.yaml",
"patterns": [
{
"comment": "https://yaml.org/spec/1.2.2/#681-yaml-directives",
"begin": "\\G(%)(YAML)([ \t]+)(1\\.1)",
"while": "\\G(?!---(?> |\t|$))",
"while": "\\G(?!---[\r\n\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",
"name": "meta.directives.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": "\\G(?=---(?> |\t|$))",
"begin": "\\G(?=---[\r\n\t ])",
"while": "\\G(?!%)",
"name": "doc",
"patterns": [
{ "include": "source.yaml#document" },
{ "include": "source.yaml#presentation-detail" }
Expand Down
24 changes: 5 additions & 19 deletions syntaxes/yaml-1.2.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,27 @@
"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",
"end": "\\G(?=(?>\\.{3}|---)[\r\n\t ])",
"name": "meta.1.2.yaml",
"patterns": [
{
"comment": "https://yaml.org/spec/1.2.2/#681-yaml-directives",
"begin": "\\G(%)(YAML)([ \t]+)(1\\.2)",
"end": "\\G(?=---(?> |\t|$))",
"end": "\\G(?=---[\r\n\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",
"name": "meta.directives.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" }
{ "include": "source.yaml#document" }
]
}
}
Expand Down
Loading

0 comments on commit 2f81f85

Please sign in to comment.