[gtksourceview/gtksourceview-4-8] Merge branch 'unicode-literals' into 'master'
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/gtksourceview-4-8] Merge branch 'unicode-literals' into 'master'
- Date: Wed, 27 Apr 2022 18:08:19 +0000 (UTC)
commit 7d7721221d941c7070f05ab6eb8df55ed123d36a
Author: Christian Hergert <christian hergert me>
Date: Wed Apr 27 18:08:04 2022 +0000
Merge branch 'unicode-literals' into 'master'
c.lang: highlight C11 Unicode literals
See merge request GNOME/gtksourceview!256
(cherry picked from commit e5166ad4625cf1f959537754768d7a40f38de4a3)
94592d7b c.lang: highlight C11 Unicode literals
67e44204 c.lang: highlight C99 Unicode escapes
data/language-specs/c.lang | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/data/language-specs/c.lang b/data/language-specs/c.lang
index ff6df3ae..dc5359c3 100644
--- a/data/language-specs/c.lang
+++ b/data/language-specs/c.lang
@@ -62,7 +62,9 @@
\\( # leading backslash
[\\\"\'nrbtfav\?] | # escaped character
[0-7]{1,3} | # one, two, or three octal digits
- x[0-9A-Fa-f]+ # 'x' followed by hex digits
+ x[0-9A-Fa-f]+ | # 'x' followed by hex digits
+ u[0-9A-Fa-f]{4} | # 'u' followed by 4 hex digits
+ U[0-9A-Fa-f]{8} # 'U' followed by 8 hex digits
)
</define-regex>
@@ -125,7 +127,7 @@
</context>
<context id="string" style-ref="string" end-at-line-end="true" class="string"
class-disabled="no-spell-check">
- <start>L?"</start>
+ <start>(L|u8|u|U)?"</start>
<end>"</end>
<include>
<context ref="printf"/>
@@ -137,7 +139,7 @@
</context>
<context id="char" style-ref="char" class="string">
- <match>L?'(\%{escaped-character}|.)'</match>
+ <match>(L|u8|u|U)?'(\%{escaped-character}|.)'</match>
</context>
<!-- http://www.lysator.liu.se/c/ANSI-C-grammar-l.html -->
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]