Skip to content

Commit 711562b

Browse files
committed
[r] update grammar
1 parent 098d2db commit 711562b

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

extensions/r/syntaxes/r.tmLanguage.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
55
"Once accepted there, we are happy to receive an update request."
66
],
7-
"version": "https://github.com/Ikuyadeu/vscode-R/commit/b4fdb1db24cdd690e88bc2bbb7f608426e63da67",
7+
"version": "https://github.com/Ikuyadeu/vscode-R/commit/0ad8c770ea3836b15bc121fff4161a794d3deeaa",
88
"fileTypes": [
99
"R",
1010
"r",
@@ -281,7 +281,7 @@
281281
"name": "punctuation.section.brackets.single.begin.r"
282282
}
283283
},
284-
"end": "\\](?!\\])",
284+
"end": "\\]",
285285
"endCaptures": {
286286
"0": {
287287
"name": "punctuation.section.brackets.single.end.r"
@@ -381,7 +381,10 @@
381381
"contentName": "meta.function.parameters.r",
382382
"patterns": [
383383
{
384-
"match": "[a-zA-Z._][a-zA-Z0-9._]*",
384+
"include": "#comments"
385+
},
386+
{
387+
"match": "(?:[a-zA-Z._][a-zA-Z0-9._]*|`[^`]+`)",
385388
"name": "variable.parameter.r"
386389
},
387390
{
@@ -402,7 +405,7 @@
402405
]
403406
},
404407
"function-calls": {
405-
"begin": "(?:\\b|(?=\\.))([a-zA-Z._][a-zA-Z0-9._]*)\\s*(\\()",
408+
"begin": "(?:\\b|(?=\\.))((?:[a-zA-Z._][a-zA-Z0-9._]*|`[^`]+`))\\s*(\\()",
406409
"beginCaptures": {
407410
"1": {
408411
"name": "variable.function.r"
@@ -432,7 +435,7 @@
432435
"contentName": "meta.function-call.parameters.r"
433436
},
434437
{
435-
"match": "[a-zA-Z._][a-zA-Z0-9._]*(?=\\s[^=])",
438+
"match": "(?:[a-zA-Z._][a-zA-Z0-9._]*|`[^`]+`)(?=\\s[^=])",
436439
"name": "variable.parameter.r"
437440
},
438441
{
@@ -480,7 +483,7 @@
480483
"name": "variable.parameter.r"
481484
}
482485
},
483-
"match": "(@param)\\s*([a-zA-Z._][a-zA-Z0-9._]*)"
486+
"match": "(@param)\\s*((?:[a-zA-Z._][a-zA-Z0-9._]*|`[^`]+`))"
484487
},
485488
{
486489
"match": "@[a-zA-Z0-9]+",

0 commit comments

Comments
 (0)