mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
SQL Operations Studio Public Preview 1 (0.23) release source code
This commit is contained in:
316
extensions/r/syntaxes/R.plist
Normal file
316
extensions/r/syntaxes/R.plist
Normal file
@@ -0,0 +1,316 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>fileTypes</key>
|
||||
<array>
|
||||
<string>R</string>
|
||||
<string>r</string>
|
||||
<string>s</string>
|
||||
<string>S</string>
|
||||
<string>Rprofile</string>
|
||||
</array>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^~R</string>
|
||||
<key>name</key>
|
||||
<string>R</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>comment.line.pragma.r</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.pragma.name.r</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>^(#pragma[ \t]+mark)[ \t](.*)</string>
|
||||
<key>name</key>
|
||||
<string>comment.line.pragma-mark.r</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(^[ \t]+)?(?=#)</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.whitespace.comment.leading.r</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>(?!\G)</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>#</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.comment.r</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>\n</string>
|
||||
<key>name</key>
|
||||
<string>comment.line.number-sign.r</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(logical|numeric|character|complex|matrix|array|data\.frame|list|factor)(?=\s*\()</string>
|
||||
<key>name</key>
|
||||
<string>storage.type.r</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(function|if|break|next|repeat|else|for|return|switch|while|in|invisible)\b</string>
|
||||
<key>name</key>
|
||||
<string>keyword.control.r</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(i|L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.numeric.r</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(T|F|TRUE|FALSE|NULL|NA|Inf|NaN)\b</string>
|
||||
<key>name</key>
|
||||
<string>constant.language.r</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b(pi|letters|LETTERS|month\.abb|month\.name)\b</string>
|
||||
<key>name</key>
|
||||
<string>support.constant.misc.r</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(\-|\+|\*|\/|%\/%|%%|%\*%|%in%|%o%|%x%|\^)</string>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.arithmetic.r</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(=|<-|<<-|->|->>)</string>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.assignment.r</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(==|!=|<>|<|>|<=|>=)</string>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.comparison.r</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(!|&{1,2}|[|]{1,2})</string>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.logical.r</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(\.\.\.|\$|@|:|\~)</string>
|
||||
<key>name</key>
|
||||
<string>keyword.other.r</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>"</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.r</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>"</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.r</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.double.r</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\\.</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.escape.r</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>'</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.r</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>'</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.r</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>string.quoted.single.r</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\\.</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.escape.r</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function.r</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.assignment.r</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.control.r</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>([[:alpha:].][[:alnum:]._]*)\s*(<-)\s*(function)</string>
|
||||
<key>name</key>
|
||||
<string>meta.function.r</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.tag.r</string>
|
||||
</dict>
|
||||
<key>4</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.type.r</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(setMethod|setReplaceMethod|setGeneric|setGroupGeneric|setClass)\s*\(\s*([[:alpha:]\d]+\s*=\s*)?("|\x{27})([a-zA-Z._\[\$@][a-zA-Z0-9._\[]*?)\3.*</string>
|
||||
<key>name</key>
|
||||
<string>meta.method.declaration.r</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>([[:alpha:].][[:alnum:]._]*)\s*\(</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.parameter.r</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>keyword.operator.assignment.r</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>([[:alpha:].][[:alnum:]._]*)\s*(=)(?=[^=])</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b([\d_][[:alnum:]._]+)\b</string>
|
||||
<key>name</key>
|
||||
<string>invalid.illegal.variable.other.r</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b([[:alnum:]_]+)(?=::)</string>
|
||||
<key>name</key>
|
||||
<string>entity.namespace.r</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\b([[:alnum:]._]+)\b</string>
|
||||
<key>name</key>
|
||||
<string>variable.other.r</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>\{</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.section.block.begin.r</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>\}</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.section.block.end.r</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>name</key>
|
||||
<string>meta.block.r</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>include</key>
|
||||
<string>source.r</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scopeName</key>
|
||||
<string>source.r</string>
|
||||
<key>uuid</key>
|
||||
<string>B2E6B78D-6E70-11D9-A369-000D93B3A10E</string>
|
||||
</dict>
|
||||
</plist>
|
||||
209
extensions/r/syntaxes/r.tmLanguage.json
Normal file
209
extensions/r/syntaxes/r.tmLanguage.json
Normal file
@@ -0,0 +1,209 @@
|
||||
{
|
||||
"information_for_contributors": [
|
||||
"This file has been converted from https://github.com/textmate/r.tmbundle/blob/master/Syntaxes/R.plist",
|
||||
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
|
||||
"Once accepted there, we are happy to receive an update request."
|
||||
],
|
||||
"version": "https://github.com/textmate/r.tmbundle/commit/6b04ff3424f3f1cdfe64a9cfb71d8765959be250",
|
||||
"fileTypes": [
|
||||
"R",
|
||||
"r",
|
||||
"s",
|
||||
"S",
|
||||
"Rprofile"
|
||||
],
|
||||
"keyEquivalent": "^~R",
|
||||
"name": "R",
|
||||
"patterns": [
|
||||
{
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "comment.line.pragma.r"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.pragma.name.r"
|
||||
}
|
||||
},
|
||||
"match": "^(#pragma[ \\t]+mark)[ \\t](.*)",
|
||||
"name": "comment.line.pragma-mark.r"
|
||||
},
|
||||
{
|
||||
"begin": "(^[ \\t]+)?(?=#)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.whitespace.comment.leading.r"
|
||||
}
|
||||
},
|
||||
"end": "(?!\\G)",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "#",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.r"
|
||||
}
|
||||
},
|
||||
"end": "\\n",
|
||||
"name": "comment.line.number-sign.r"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"match": "\\b(logical|numeric|character|complex|matrix|array|data\\.frame|list|factor)(?=\\s*\\()",
|
||||
"name": "storage.type.r"
|
||||
},
|
||||
{
|
||||
"match": "\\b(function|if|break|next|repeat|else|for|return|switch|while|in|invisible)\\b",
|
||||
"name": "keyword.control.r"
|
||||
},
|
||||
{
|
||||
"match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(i|L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b",
|
||||
"name": "constant.numeric.r"
|
||||
},
|
||||
{
|
||||
"match": "\\b(T|F|TRUE|FALSE|NULL|NA|Inf|NaN)\\b",
|
||||
"name": "constant.language.r"
|
||||
},
|
||||
{
|
||||
"match": "\\b(pi|letters|LETTERS|month\\.abb|month\\.name)\\b",
|
||||
"name": "support.constant.misc.r"
|
||||
},
|
||||
{
|
||||
"match": "(\\-|\\+|\\*|\\/|%\\/%|%%|%\\*%|%in%|%o%|%x%|\\^)",
|
||||
"name": "keyword.operator.arithmetic.r"
|
||||
},
|
||||
{
|
||||
"match": "(=|<-|<<-|->|->>)",
|
||||
"name": "keyword.operator.assignment.r"
|
||||
},
|
||||
{
|
||||
"match": "(==|!=|<>|<|>|<=|>=)",
|
||||
"name": "keyword.operator.comparison.r"
|
||||
},
|
||||
{
|
||||
"match": "(!|&{1,2}|[|]{1,2})",
|
||||
"name": "keyword.operator.logical.r"
|
||||
},
|
||||
{
|
||||
"match": "(\\.\\.\\.|\\$|@|:|\\~)",
|
||||
"name": "keyword.other.r"
|
||||
},
|
||||
{
|
||||
"begin": "\"",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.begin.r"
|
||||
}
|
||||
},
|
||||
"end": "\"",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.end.r"
|
||||
}
|
||||
},
|
||||
"name": "string.quoted.double.r",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\\\.",
|
||||
"name": "constant.character.escape.r"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "'",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.begin.r"
|
||||
}
|
||||
},
|
||||
"end": "'",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.end.r"
|
||||
}
|
||||
},
|
||||
"name": "string.quoted.single.r",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\\\.",
|
||||
"name": "constant.character.escape.r"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.name.function.r"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.assignment.r"
|
||||
},
|
||||
"3": {
|
||||
"name": "keyword.control.r"
|
||||
}
|
||||
},
|
||||
"match": "([[:alpha:].][[:alnum:]._]*)\\s*(<-)\\s*(function)",
|
||||
"name": "meta.function.r"
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.r"
|
||||
},
|
||||
"4": {
|
||||
"name": "entity.name.type.r"
|
||||
}
|
||||
},
|
||||
"match": "(setMethod|setReplaceMethod|setGeneric|setGroupGeneric|setClass)\\s*\\(\\s*([[:alpha:]\\d]+\\s*=\\s*)?(\"|\\x{27})([a-zA-Z._\\[\\$@][a-zA-Z0-9._\\[]*?)\\3.*",
|
||||
"name": "meta.method.declaration.r"
|
||||
},
|
||||
{
|
||||
"match": "([[:alpha:].][[:alnum:]._]*)\\s*\\("
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.parameter.r"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.assignment.r"
|
||||
}
|
||||
},
|
||||
"match": "([[:alpha:].][[:alnum:]._]*)\\s*(=)(?=[^=])"
|
||||
},
|
||||
{
|
||||
"match": "\\b([\\d_][[:alnum:]._]+)\\b",
|
||||
"name": "invalid.illegal.variable.other.r"
|
||||
},
|
||||
{
|
||||
"match": "\\b([[:alnum:]_]+)(?=::)",
|
||||
"name": "entity.namespace.r"
|
||||
},
|
||||
{
|
||||
"match": "\\b([[:alnum:]._]+)\\b",
|
||||
"name": "variable.other.r"
|
||||
},
|
||||
{
|
||||
"begin": "\\{",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.block.begin.r"
|
||||
}
|
||||
},
|
||||
"end": "\\}",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.block.end.r"
|
||||
}
|
||||
},
|
||||
"name": "meta.block.r",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.r"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"scopeName": "source.r",
|
||||
"uuid": "B2E6B78D-6E70-11D9-A369-000D93B3A10E"
|
||||
}
|
||||
Reference in New Issue
Block a user