[gtksourceview] cmake.lang: clean up the "operator" and "constant" contexts
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] cmake.lang: clean up the "operator" and "constant" contexts
- Date: Thu, 16 Nov 2017 14:49:32 +0000 (UTC)
commit dde1d7b67b684ab3f88701de4a2f01849089f6f1
Author: Роман Донченко <dpb corrigendum ru>
Date: Sun Nov 12 22:14:51 2017 +0300
cmake.lang: clean up the "operator" and "constant" contexts
CACHE and BOOL are clearly not constants, but they _are_ keywords used
by the set command, so move them to "operator". Several boolean constants
recognized by the if command are missing from "constant", so add them.
https://bugzilla.gnome.org/show_bug.cgi?id=790345
data/language-specs/cmake.lang | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/data/language-specs/cmake.lang b/data/language-specs/cmake.lang
index c79541a..c9e8dc2 100644
--- a/data/language-specs/cmake.lang
+++ b/data/language-specs/cmake.lang
@@ -156,15 +156,16 @@
<context id="constant" style-ref="constant">
<prefix>(?i)\b</prefix> <!-- case insensitive -->
- <keyword>BOOL</keyword>
- <keyword>CACHE</keyword>
<keyword>FALSE</keyword>
+ <keyword>IGNORE</keyword>
<keyword>N</keyword>
<keyword>NO</keyword>
- <keyword>ON</keyword>
+ <keyword>(\w+-)?NOTFOUND</keyword>
<keyword>OFF</keyword>
- <keyword>NOTFOUND</keyword>
+ <keyword>ON</keyword>
<keyword>TRUE</keyword>
+ <keyword>Y</keyword>
+ <keyword>YES</keyword>
</context>
<context id="builtin-variable" style-ref="builtin-variable">
@@ -645,6 +646,8 @@
<context id="operator" style-ref="operator">
<keyword>AND</keyword>
+ <keyword>BOOL</keyword>
+ <keyword>CACHE</keyword>
<keyword>COMMAND</keyword>
<keyword>DEFINED</keyword>
<keyword>DOC</keyword>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]