258 lines
5.6 KiB
JSON
258 lines
5.6 KiB
JSON
![]() |
{
|
||
|
"name": "turtle",
|
||
|
"scopeName": "source.turtle",
|
||
|
"fileTypes": ["turtle", "ttl", "acl"],
|
||
|
"patterns": [
|
||
|
{
|
||
|
"include": "#rule-constraint"
|
||
|
},
|
||
|
{
|
||
|
"include": "#iriref"
|
||
|
},
|
||
|
{
|
||
|
"include": "#prefix"
|
||
|
},
|
||
|
{
|
||
|
"include": "#prefixed-name"
|
||
|
},
|
||
|
{
|
||
|
"include": "#comment"
|
||
|
},
|
||
|
{
|
||
|
"include": "#special-predicate"
|
||
|
},
|
||
|
{
|
||
|
"include": "#literals"
|
||
|
},
|
||
|
{
|
||
|
"include": "#language-tag"
|
||
|
}
|
||
|
],
|
||
|
"uuid": "230498230498sdfkj8909-34df-23dfs",
|
||
|
"repository": {
|
||
|
"prefix": {
|
||
|
"name": "keyword.operator.turtle",
|
||
|
"match": "(?i:@?base|@?prefix)\\s"
|
||
|
},
|
||
|
"iriref": {
|
||
|
"name": "entity.name.type.iriref.turtle",
|
||
|
"match": "<[^\\x20-\\x20<>\"{}|^`\\\\]*>"
|
||
|
},
|
||
|
"prefixed-name": {
|
||
|
"name": "constant.complex.turtle",
|
||
|
"match": "(\\w*:)(\\w*)",
|
||
|
"captures": {
|
||
|
"1": {
|
||
|
"name": "storage.type.PNAME_NS.turtle"
|
||
|
},
|
||
|
"2": {
|
||
|
"name": "support.variable.PN_LOCAL.turtle"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"comment": {
|
||
|
"name": "comment.line.number-sign.turtle",
|
||
|
"match": "#.*$"
|
||
|
},
|
||
|
"special-predicate": {
|
||
|
"name": "meta.specialPredicate.turtle",
|
||
|
"match": "\\s(a)\\s",
|
||
|
"captures": {
|
||
|
"1": {
|
||
|
"name": "keyword.control.turtle"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"literals": {
|
||
|
"patterns": [
|
||
|
{
|
||
|
"include": "#string"
|
||
|
},
|
||
|
{
|
||
|
"include": "#numeric"
|
||
|
},
|
||
|
{
|
||
|
"include": "#boolean"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"string": {
|
||
|
"patterns": [
|
||
|
{
|
||
|
"include": "#triple-squote-string-literal"
|
||
|
},
|
||
|
{
|
||
|
"include": "#triple-dquote-string-literal"
|
||
|
},
|
||
|
{
|
||
|
"include": "#single-squote-string-literal"
|
||
|
},
|
||
|
{
|
||
|
"include": "#single-dquote-string-literal"
|
||
|
},
|
||
|
{
|
||
|
"include": "#triple-tick-string-literal"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"single-squote-string-literal": {
|
||
|
"name": "string.quoted.single.turtle",
|
||
|
"begin": "'",
|
||
|
"beginCaptures": {
|
||
|
"0": {
|
||
|
"name": "punctuation.definition.string.begin.turtle"
|
||
|
}
|
||
|
},
|
||
|
"end": "'",
|
||
|
"endCaptures": {
|
||
|
"1": {
|
||
|
"name": "punctuation.definition.string.end.turtle"
|
||
|
},
|
||
|
"2": {
|
||
|
"name": "invalid.illegal.newline.turtle"
|
||
|
}
|
||
|
},
|
||
|
"patterns": [
|
||
|
{
|
||
|
"include": "#string-character-escape"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"single-dquote-string-literal": {
|
||
|
"name": "string.quoted.double.turtle",
|
||
|
"begin": "\"",
|
||
|
"beginCaptures": {
|
||
|
"0": {
|
||
|
"name": "punctuation.definition.string.begin.turtle"
|
||
|
}
|
||
|
},
|
||
|
"end": "\"",
|
||
|
"endCaptures": {
|
||
|
"0": {
|
||
|
"name": "punctuation.definition.string.end.turtle"
|
||
|
}
|
||
|
},
|
||
|
"patterns": [
|
||
|
{
|
||
|
"include": "#string-character-escape"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"triple-squote-string-literal": {
|
||
|
"name": "string.quoted.triple.turtle",
|
||
|
"begin": "'''",
|
||
|
"end": "'''",
|
||
|
"beginCaptures": {
|
||
|
"0": {
|
||
|
"name": "punctuation.definition.string.begin.turtle"
|
||
|
}
|
||
|
},
|
||
|
"endCaptures": {
|
||
|
"0": {
|
||
|
"name": "punctuation.definition.string.end.turtle"
|
||
|
}
|
||
|
},
|
||
|
"patterns": [
|
||
|
{
|
||
|
"include": "#string-character-escape"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"triple-dquote-string-literal": {
|
||
|
"name": "string.quoted.triple.turtle",
|
||
|
"begin": "\"\"\"",
|
||
|
"end": "\"\"\"",
|
||
|
"beginCaptures": {
|
||
|
"0": {
|
||
|
"name": "punctuation.definition.string.begin.turtle"
|
||
|
}
|
||
|
},
|
||
|
"endCaptures": {
|
||
|
"0": {
|
||
|
"name": "punctuation.definition.string.end.turtle"
|
||
|
}
|
||
|
},
|
||
|
"patterns": [
|
||
|
{
|
||
|
"include": "#string-character-escape"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"triple-tick-string-literal": {
|
||
|
"name": "string.quoted.triple.turtle",
|
||
|
"begin": "```",
|
||
|
"end": "```",
|
||
|
"beginCaptures": {
|
||
|
"0": {
|
||
|
"name": "punctuation.definition.string.begin.turtle"
|
||
|
}
|
||
|
},
|
||
|
"endCaptures": {
|
||
|
"0": {
|
||
|
"name": "punctuation.definition.string.end.turtle"
|
||
|
}
|
||
|
},
|
||
|
"patterns": [
|
||
|
{
|
||
|
"include": "#string-character-escape"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"string-character-escape": {
|
||
|
"name": "constant.character.escape.turtle",
|
||
|
"match": "\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
|
||
|
},
|
||
|
"numeric": {
|
||
|
"patterns": [
|
||
|
{
|
||
|
"include": "#integer"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"integer": {
|
||
|
"name": "constant.numeric.turtle",
|
||
|
"match": "[+-]?(?:\\d+|[0-9]+\\.[0-9]*|\\.[0-9]+(?:[eE][+-]?\\d+)?)"
|
||
|
},
|
||
|
"boolean": {
|
||
|
"name": "constant.language.sparql",
|
||
|
"match": "\\b(?i:true|false)\\b"
|
||
|
},
|
||
|
"language-tag": {
|
||
|
"name": "meta.string-literal-language-tag.turtle",
|
||
|
"match": "@(\\w+)",
|
||
|
"captures": {
|
||
|
"1": {
|
||
|
"name": "entity.name.class.turtle"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"rule-constraint": {
|
||
|
"name": "meta.rule-constraint.turtle",
|
||
|
"begin": "(rule:content) (\"\"\")",
|
||
|
"beginCaptures": {
|
||
|
"1": {
|
||
|
"patterns": [
|
||
|
{
|
||
|
"include": "#prefixed-name"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"2": {
|
||
|
"name": "string.quoted.triple.turtle"
|
||
|
}
|
||
|
},
|
||
|
"end": "\"\"\"",
|
||
|
"endCaptures": {
|
||
|
"0": {
|
||
|
"name": "string.quoted.triple.turtle"
|
||
|
}
|
||
|
},
|
||
|
"patterns": [
|
||
|
{
|
||
|
"include": "source.srs"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
}
|