grammars/source.httpspec.json in github-linguist-5.3.3 vs grammars/source.httpspec.json in github-linguist-6.0.0
- old
+ new
@@ -1,12 +1,8 @@
{
"name": "HTTP Spec",
"scopeName": "source.httpspec",
- "fileTypes": [
- "httpspec"
- ],
- "uuid": "7bb6ff35-8b8a-4480-91ec-20f2d3fcba9a",
"patterns": [
{
"name": "meta.request.httpspec",
"patterns": [
{
@@ -20,32 +16,51 @@
}
]
}
],
"repository": {
- "multiplex": {
- "begin": "(\\[)",
- "end": "\\]",
- "beginCaptures": {
- "0": {
- "name": "keyword.other"
+ "ampersand": {
+ "patterns": [
+ {
+ "name": "support.function.ampersand.httpspec",
+ "match": "(?\u003c!\\\u0026)\\\u0026(?!\\\u0026)"
}
- },
- "endCaptures": {
- "0": {
- "name": "keyword.other"
- }
- },
+ ]
+ },
+ "closingbracket": {
"patterns": [
{
- "include": "#uripart"
+ "name": "keyword.other.multiplexend.httpspec"
},
{
- "include": "#comma"
+ "match": "\\]"
}
]
},
+ "comma": {
+ "patterns": [
+ {
+ "name": "keyword.other.comma.httpspec.test",
+ "match": "\\,"
+ }
+ ]
+ },
+ "emptyline": {
+ "patterns": [
+ {
+ "match": "^\\s*$"
+ }
+ ]
+ },
+ "equals": {
+ "patterns": [
+ {
+ "name": "support.function.keyvaluepairseparator.httpspec",
+ "match": "\\="
+ }
+ ]
+ },
"header": {
"patterns": [
{
"name": "string.unquoted.uri.httpspec",
"match": "^([a-zA-Z\\-_]+\\:)\\s(.*)$",
@@ -55,58 +70,78 @@
}
}
}
]
},
- "response": {
+ "invalidcomma": {
"patterns": [
{
- "include": "#statusline"
+ "name": "invalid.illegal.comma.httpspec",
+ "match": "^\\,|\\,(?=\\s)"
+ }
+ ]
+ },
+ "jsonblock": {
+ "patterns": [
+ {
+ "include": "source.json"
+ }
+ ]
+ },
+ "methodlist": {
+ "patterns": [
+ {
+ "include": "#methodname"
},
{
- "include": "#header"
+ "include": "#invalidcomma"
},
{
- "include": "#jsonblock"
+ "include": "#comma"
}
]
},
- "jsonblock": {
+ "methodname": {
"patterns": [
{
- "include": "source.json"
+ "name": "keyword.other.method.httpspec",
+ "match": "(?:\\b)(OPTIONS|HEAD|GET|DELETE|PUT|PATCH|POST)"
}
]
},
- "statusline": {
+ "multiplex": {
+ "begin": "(\\[)",
+ "end": "\\]",
"patterns": [
{
- "match": "^(\\d\\d\\d)\\s(.*)$",
- "captures": {
- "0": {
- "name": "constant.language.statustext.httpspec"
- }
- }
+ "include": "#uripart"
+ },
+ {
+ "include": "#comma"
}
- ]
+ ],
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.other"
+ }
+ },
+ "endCaptures": {
+ "0": {
+ "name": "keyword.other"
+ }
+ }
},
- "request": {
+ "namevaluepair": {
"patterns": [
{
- "begin": "^(?=OPTIONS|HEAD|GET|DELETE|PUT|PATCH|POST)",
- "end": "^(?=\\d\\d\\d)",
- "patterns": [
- {
- "include": "#requestline"
- },
- {
- "include": "#header"
- },
- {
- "include": "#jsonblock"
- }
- ]
+ "include": "#uriqueryname"
+ },
+ {
+ "include": "#equals"
+ },
+ {
+ "include": "#uriqueryvalue"
}
]
},
"openingbracket": {
"patterns": [
@@ -114,24 +149,34 @@
"name": "keyword.other.multiplexstart.httpspec",
"match": "\\["
}
]
},
- "closingbracket": {
+ "questionmark": {
"patterns": [
{
- "name": "keyword.other.multiplexend.httpspec"
- },
- {
- "match": "\\]"
+ "name": "support.function.queryseparator.httpspec",
+ "match": "\\?"
}
]
},
- "emptyline": {
+ "request": {
"patterns": [
{
- "match": "^\\s*$"
+ "begin": "^(?=OPTIONS|HEAD|GET|DELETE|PUT|PATCH|POST)",
+ "end": "^(?=\\d\\d\\d)",
+ "patterns": [
+ {
+ "include": "#requestline"
+ },
+ {
+ "include": "#header"
+ },
+ {
+ "include": "#jsonblock"
+ }
+ ]
}
]
},
"requestline": {
"patterns": [
@@ -141,47 +186,35 @@
{
"include": "#uri"
}
]
},
- "methodlist": {
+ "response": {
"patterns": [
{
- "include": "#methodname"
+ "include": "#statusline"
},
{
- "include": "#invalidcomma"
+ "include": "#header"
},
{
- "include": "#comma"
+ "include": "#jsonblock"
}
]
},
- "methodname": {
+ "statusline": {
"patterns": [
{
- "name": "keyword.other.method.httpspec",
- "match": "(?:\\b)(OPTIONS|HEAD|GET|DELETE|PUT|PATCH|POST)"
+ "match": "^(\\d\\d\\d)\\s(.*)$",
+ "captures": {
+ "0": {
+ "name": "constant.language.statustext.httpspec"
+ }
+ }
}
]
},
- "comma": {
- "patterns": [
- {
- "name": "keyword.other.comma.httpspec.test",
- "match": "\\,"
- }
- ]
- },
- "invalidcomma": {
- "patterns": [
- {
- "name": "invalid.illegal.comma.httpspec",
- "match": "^\\,|\\,(?=\\s)"
- }
- ]
- },
"uri": {
"patterns": [
{
"include": "#uripath"
},
@@ -194,10 +227,17 @@
{
"include": "#uriquery"
}
]
},
+ "uripart": {
+ "patterns": [
+ {
+ "match": "([a-bA-B0-9\\-_/]+)"
+ }
+ ]
+ },
"uripath": {
"patterns": [
{
"name": "support.function.httpspec",
"begin": "(?:\\s)\\/",
@@ -211,77 +251,33 @@
}
]
}
]
},
- "uripart": {
- "patterns": [
- {
- "match": "([a-bA-B0-9\\-_/]+)"
- }
- ]
- },
- "questionmark": {
- "patterns": [
- {
- "name": "support.function.queryseparator.httpspec",
- "match": "\\?"
- }
- ]
- },
"uriquery": {
"patterns": [
{
"include": "#namevaluepair"
},
{
"include": "#ampersand"
}
]
},
- "namevaluepair": {
- "patterns": [
- {
- "include": "#uriqueryname"
- },
- {
- "include": "#equals"
- },
- {
- "include": "#uriqueryvalue"
- }
- ]
- },
"uriqueryname": {
"patterns": [
{
"name": "support.function.uriqueryname.httpspec",
- "match": "(?<=[?&])([^=&])+"
+ "match": "(?\u003c=[?\u0026])([^=\u0026])+"
}
]
},
- "equals": {
- "patterns": [
- {
- "name": "support.function.keyvaluepairseparator.httpspec",
- "match": "\\="
- }
- ]
- },
"uriqueryvalue": {
"patterns": [
{
"name": "support.function.uriqueryvalue.httpspec",
- "match": "(?<=\\=)([^=&]+)"
+ "match": "(?\u003c=\\=)([^=\u0026]+)"
}
]
- },
- "ampersand": {
- "patterns": [
- {
- "name": "support.function.ampersand.httpspec",
- "match": "(?<!\\&)\\&(?!\\&)"
- }
- ]
}
}
-}
\ No newline at end of file
+}