[gtksourceview] rust.lang: Add invalid char and byte highlight
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] rust.lang: Add invalid char and byte highlight
- Date: Sat, 27 Aug 2016 17:20:40 +0000 (UTC)
commit 4aa55473f7d5457bb119dc772126b85d0e03d68c
Author: Garrett Regier <garrettregier gmail com>
Date: Fri Aug 26 10:07:09 2016 -0700
rust.lang: Add invalid char and byte highlight
data/language-specs/rust.lang | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/data/language-specs/rust.lang b/data/language-specs/rust.lang
index 744cb38..8d0efea 100644
--- a/data/language-specs/rust.lang
+++ b/data/language-specs/rust.lang
@@ -270,10 +270,18 @@ except according to those terms.
<match extended="true">'([^\\']|\\\%{common-escape}|\\\%{unicode-escape})'</match>
</context>
+ <context id="invalid-char" style-ref="error">
+ <match extended="true">'([^\\']|\\\%{common-escape}|\\\%{unicode-escape}){2,}'</match>
+ </context>
+
<context id="byte" style-ref="char">
<match extended="true">b'([^\\']|\\\%{common-escape})'</match>
</context>
+ <context id="invalid-byte" style-ref="error">
+ <match extended="true">b'([^\\']|\\\%{common-escape}){2,}'</match>
+ </context>
+
<context id="attribute" style-ref="attribute" class="attribute">
<start extended="true">\#!?\[</start>
<end>\]</end>
@@ -302,7 +310,9 @@ except according to those terms.
<context ref="byte-string"/>
<context ref="raw-string"/>
<context ref="char"/>
+ <context ref="invalid-char"/>
<context ref="byte"/>
+ <context ref="invalid-byte"/>
<context ref="lifetime"/>
<context ref="attribute"/>
</include>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]