From fbe7b5ed66ec7f31ffe2b116fb205d6bca4abcf8 Mon Sep 17 00:00:00 2001 From: Manuel Hentschel <53863351+ManuelHentschel@users.noreply.github.com> Date: Sun, 19 Dec 2021 00:53:23 +0100 Subject: [PATCH] Add raw string tokens (#922) --- syntax/r.json | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/syntax/r.json b/syntax/r.json index 821fadbe3..7ba9420ec 100644 --- a/syntax/r.json +++ b/syntax/r.json @@ -207,6 +207,96 @@ }, "strings": { "patterns": [ + { + "begin": "[rR]\"(-*)\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.raw.begin.r" + } + }, + "end": "\\]\\1\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.raw.end.r" + } + }, + "name": "string.quoted.double.raw.r" + }, + { + "begin": "[rR]'(-*)\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.raw.begin.r" + } + }, + "end": "\\]\\1'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.raw.end.r" + } + }, + "name": "string.quoted.single.raw.r" + }, + { + "begin": "[rR]\"(-*)\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.raw.begin.r" + } + }, + "end": "\\}\\1\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.raw.end.r" + } + }, + "name": "string.quoted.double.raw.r" + }, + { + "begin": "[rR]'(-*)\\{", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.raw.begin.r" + } + }, + "end": "\\}\\1'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.raw.end.r" + } + }, + "name": "string.quoted.single.raw.r" + }, + { + "begin": "[rR]\"(-*)\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.raw.begin.r" + } + }, + "end": "\\)\\1\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.raw.end.r" + } + }, + "name": "string.quoted.double.raw.r" + }, + { + "begin": "[rR]'(-*)\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.raw.begin.r" + } + }, + "end": "\\)\\1'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.raw.end.r" + } + }, + "name": "string.quoted.single.raw.r" + }, { "begin": "\"", "beginCaptures": {