| 1 |
{ |
| 2 |
"name": "sparql", |
| 3 |
"scopeName": "source.sparql", |
| 4 |
"fileTypes": ["rq", "sparql", "sq"], |
| 5 |
"patterns": [ |
| 6 |
{ |
| 7 |
"include": "source.turtle" |
| 8 |
}, |
| 9 |
{ |
| 10 |
"include": "#query-keyword-operators" |
| 11 |
}, |
| 12 |
{ |
| 13 |
"include": "#functions" |
| 14 |
}, |
| 15 |
{ |
| 16 |
"include": "#variables" |
| 17 |
}, |
| 18 |
{ |
| 19 |
"include": "#expression-operators" |
| 20 |
} |
| 21 |
], |
| 22 |
"repository": { |
| 23 |
"query-keyword-operators": { |
| 24 |
"name": "keyword.control.sparql", |
| 25 |
"match": "\\b(?i:define|select|distinct|reduced|from|named|construct|ask|describe|where|graph|having|bind|as|filter|optional|union|order|by|group|limit|offset|values|insert data|delete data|with|delete|insert|clear|silent|default|all|create|drop|copy|move|add|to|using|service|not exists|exists|not in|in|minus|load)\\b" |
| 26 |
}, |
| 27 |
"functions": { |
| 28 |
"name": "support.function.sparql", |
| 29 |
"match": "\\b(?i:concat|regex|asc|desc|bound|isiri|isuri|isblank|isliteral|isnumeric|str|lang|datatype|sameterm|langmatches|avg|count|group_concat|separator|max|min|sample|sum|iri|uri|bnode|strdt|uuid|struuid|strlang|strlen|substr|ucase|lcase|strstarts|strends|contains|strbefore|strafter|encode_for_uri|replace|abs|round|ceil|floor|rand|now|year|month|day|hours|minutes|seconds|timezone|tz|md5|sha1|sha256|sha384|sha512|coalesce|if)\\b" |
| 30 |
}, |
| 31 |
"variables": { |
| 32 |
"name": "constant.variable.sparql.turtle", |
| 33 |
"match": "(?<!\\w)[?$]\\w+" |
| 34 |
}, |
| 35 |
"expression-operators": { |
| 36 |
"name": "support.class.sparql", |
| 37 |
"match": "(?:\\|\\||&&|=|!=|<|>|<=|>=|\\*|/|\\+|-|\\||\\^|\\?|\\!)" |
| 38 |
} |
| 39 |
} |
| 40 |
} |
| 41 |
|