[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]+",