From ff7a30e33a0a1d86a0c7d37fa551e257469575b8 Mon Sep 17 00:00:00 2001 From: Koroshiya <3969837+koroshiya@users.noreply.github.com> Date: Sun, 9 Dec 2018 21:53:06 +1100 Subject: [PATCH] Backtick support --- grammars/renpy.cson | 338 ++++++++++++++++++++++++++++++++++++++++- source/renpy.tmpl.cson | 336 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 673 insertions(+), 1 deletion(-) diff --git a/grammars/renpy.cson b/grammars/renpy.cson index a357ee3..ca9cd84 100644 --- a/grammars/renpy.cson +++ b/grammars/renpy.cson @@ -617,6 +617,9 @@ { 'include': '#string_quoted_double' } + { + 'include': '#string_quoted_backtick' + } { 'include': '#dotted_name' } @@ -765,6 +768,16 @@ } ] } + { + 'begin': '^\\s*(?=[uU]?[rR]?```)' + 'end': '(?<=```)' + 'name': 'comment.block.python.renpy' + 'patterns': [ + { + 'include': '#string_quoted_backtick' + } + ] + } ] 'dotted_name': 'begin': '(?=[A-Za-z_][A-Za-z0-9_]*(?:\\.[A-Za-z_][A-Za-z0-9_]*)*)' @@ -1583,6 +1596,326 @@ ] } ] + 'string_quoted_backtick': + 'patterns': [ + { + 'captures': + '1': + 'name': 'punctuation.definition.string.begin.python.renpy' + '2': + 'name': 'punctuation.definition.string.end.python.renpy' + '3': + 'name': 'meta.empty-string.single.python.renpy' + 'match': '(?