[r] update grammar

This commit is contained in:
Martin Aeschlimann 2017-10-24 11:02:37 +02:00
parent ad58f842ce
commit 7209cf604d
2 changed files with 21 additions and 17 deletions

View file

@ -4,7 +4,7 @@
"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/Ikuyadeu/vscode-R/commit/0ad8c770ea3836b15bc121fff4161a794d3deeaa",
"version": "https://github.com/Ikuyadeu/vscode-R/commit/b3ef459a3999160d97ea28f4754fda810417f99f",
"fileTypes": [
"R",
"r",
@ -178,11 +178,15 @@
"name": "keyword.operator.arithmetic.r"
},
{
"match": "(=|<-|<<-|->|->>)",
"match": "==",
"name": "keyword.operator.comarison.r"
},
{
"match": "(:=|<-|<<-|->|->>)",
"name": "keyword.operator.assignment.r"
},
{
"match": "(==|!=|<>|<|>|<=|>=)",
"match": "(!=|<>|<|>|<=|>=|%in%)",
"name": "keyword.operator.comparison.r"
},
{
@ -190,7 +194,7 @@
"name": "keyword.operator.logical.r"
},
{
"match": "(%in%|:=|%between%|%chin%|%like%|%\\+%|%\\+replace%|%:%|%do%|%dopar%|%>%|%<>%|%T>%|%\\$%)",
"match": "(%between%|%chin%|%like%|%\\+%|%\\+replace%|%:%|%do%|%dopar%|%>%|%<>%|%T>%|%\\$%)",
"name": "keyword.operator.other.r"
},
{
@ -337,7 +341,7 @@
"function-declarations": {
"patterns": [
{
"begin": "^\\s*([a-zA-Z0-9._:]*)\\s*(<<?-|=)\\s*(?=function\\s*\\()",
"begin": "^\\s*([a-zA-Z._][\\w.:]*)\\s*(<<?-|=)\\s*(?=function\\s*\\()",
"beginCaptures": {
"1": {
"name": "entity.name.function.r"
@ -349,7 +353,7 @@
"name": "keyword.control.r"
}
},
"end": "",
"end": "(?<=\\))",
"name": "meta.function.r",
"patterns": [
{
@ -384,7 +388,7 @@
"include": "#comments"
},
{
"match": "(?:[a-zA-Z._][a-zA-Z0-9._]*|`[^`]+`)",
"match": "(?:[a-zA-Z._][\\w.]*|`[^`]+`)",
"name": "variable.parameter.r"
},
{
@ -405,7 +409,7 @@
]
},
"function-calls": {
"begin": "(?:\\b|(?=\\.))((?:[a-zA-Z._][a-zA-Z0-9._]*|`[^`]+`))\\s*(\\()",
"begin": "(?:\\b|(?=\\.))((?:[a-zA-Z._][\\w.]*|`[^`]+`))\\s*(\\()",
"beginCaptures": {
"1": {
"name": "variable.function.r"
@ -435,7 +439,7 @@
"contentName": "meta.function-call.parameters.r"
},
{
"match": "(?:[a-zA-Z._][a-zA-Z0-9._]*|`[^`]+`)(?=\\s[^=])",
"match": "(?:[a-zA-Z._][\\w.]*|`[^`]+`)(?=\\s[^=])",
"name": "variable.parameter.r"
},
{
@ -483,7 +487,7 @@
"name": "variable.parameter.r"
}
},
"match": "(@param)\\s*((?:[a-zA-Z._][a-zA-Z0-9._]*|`[^`]+`))"
"match": "(@param)\\s*((?:[a-zA-Z._][\\w.]*|`[^`]+`))"
},
{
"match": "@[a-zA-Z0-9]+",

View file

@ -353,7 +353,7 @@
},
{
"c": "function",
"t": "source.r meta.function.r keyword.control.r",
"t": "source.r meta.function.r meta.function.r keyword.control.r",
"r": {
"dark_plus": "keyword.control: #C586C0",
"light_plus": "keyword.control: #AF00DB",
@ -364,7 +364,7 @@
},
{
"c": "(",
"t": "source.r meta.function.r punctuation.section.parens.begin.r",
"t": "source.r meta.function.r meta.function.r punctuation.section.parens.begin.r",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@ -375,7 +375,7 @@
},
{
"c": "x",
"t": "source.r meta.function.r meta.function.parameters.r variable.parameter.r",
"t": "source.r meta.function.r meta.function.r meta.function.parameters.r variable.parameter.r",
"r": {
"dark_plus": "variable: #9CDCFE",
"light_plus": "variable: #001080",
@ -386,7 +386,7 @@
},
{
"c": ",",
"t": "source.r meta.function.r meta.function.parameters.r punctuation.separator.parameters.r",
"t": "source.r meta.function.r meta.function.r meta.function.parameters.r punctuation.separator.parameters.r",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@ -397,7 +397,7 @@
},
{
"c": " ",
"t": "source.r meta.function.r meta.function.parameters.r",
"t": "source.r meta.function.r meta.function.r meta.function.parameters.r",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
@ -408,7 +408,7 @@
},
{
"c": "y",
"t": "source.r meta.function.r meta.function.parameters.r variable.parameter.r",
"t": "source.r meta.function.r meta.function.r meta.function.parameters.r variable.parameter.r",
"r": {
"dark_plus": "variable: #9CDCFE",
"light_plus": "variable: #001080",
@ -419,7 +419,7 @@
},
{
"c": ")",
"t": "source.r meta.function.r punctuation.section.parens.end.r",
"t": "source.r meta.function.r meta.function.r punctuation.section.parens.end.r",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",