[gtksourceview/gnome-3-24] cpp.lang: added support for raw strings
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/gnome-3-24] cpp.lang: added support for raw strings
- Date: Mon, 13 Aug 2018 21:45:56 +0000 (UTC)
commit 627a35028a5448ace9b35cfec741f0424c81d3d2
Author: Ole Christian Eidheim <eidheim gmail com>
Date: Sun Aug 12 11:01:18 2018 +0000
cpp.lang: added support for raw strings
Reference: https://en.cppreference.com/w/cpp/language/string_literal
data/language-specs/cpp.lang | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/data/language-specs/cpp.lang b/data/language-specs/cpp.lang
index 2b2ddbc5..3525f4bf 100644
--- a/data/language-specs/cpp.lang
+++ b/data/language-specs/cpp.lang
@@ -3,9 +3,10 @@
This file is part of GtkSourceView
- Authors: Marco Barisione, Emanuele Aina
+ Authors: Marco Barisione, Emanuele Aina, Ole Christian Eidheim
Copyright (C) 2005-2007 Marco Barisione <barisione gmail com>
Copyright (C) 2005-2007 Emanuele Aina
+ Copyright (C) 2018 Ole Christian Eidheim <eidheim gmail com>
GtkSourceView is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -31,6 +32,7 @@
</metadata>
<styles>
+ <style id="raw-string" name="Raw String" map-to="def:string"/>
<style id="keyword" name="Keyword" map-to="c:keyword"/>
<style id="type" name="Data Type" map-to="c:type"/>
<style id="common-defines" name="Common Defines" map-to="c:common-defines"/>
@@ -40,6 +42,11 @@
<!-- C++-specific stuff (i.e. stuff which is not C) -->
<context id="cpp-proper">
<include>
+ <context id="raw-string" style-ref="raw-string" class="string"
class-disabled="no-spell-check">
+ <start>R"([^\(\)\\ ]*)\(</start>
+ <end>\)\%{1@start}"</end>
+ </context>
+
<context id="keywords" style-ref="keyword">
<keyword>alignas</keyword>
<keyword>alignof</keyword>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]