diff options
author | Christian Hergert <christian@hergert.me> | 2022-04-27 18:08:04 +0000 |
---|---|---|
committer | Christian Hergert <christian@hergert.me> | 2022-04-27 18:08:18 +0000 |
commit | 7d7721221d941c7070f05ab6eb8df55ed123d36a (patch) | |
tree | 954efae7bdfb9f17becfdc9e1b593702a85383b7 | |
parent | c743b6b83985f2917782a1a425f7755c0d571b1b (diff) | |
download | gtksourceview-7d7721221d941c7070f05ab6eb8df55ed123d36a.tar.gz |
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
-rw-r--r-- | data/language-specs/c.lang | 8 |
1 files 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 --> |