commit 5965e80a38ccf86178c5df9fcfc778f1595b00b1
parent a794c3318b6ada6ec08b66e8c7637d5f965d4678
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 1 Jan 2018 15:33:18 +0100
tweaks: fold some regexes into one another, for conciseness
The anchored "^texture" appears to have been a mistake.
Inspired-by: Tom Levy <tomlevy93@gmail.com>
Diffstat:
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/syntax/go.nanorc b/syntax/go.nanorc
@@ -24,13 +24,9 @@ color brightcyan "\<(package|import)\>"
color brightcyan "//[[:space:]]*\+build[[:space:]]+(([a-zA-Z_0-9]+[[:space:]]*)+,[[:space:]]*)*[a-zA-Z_0-9]+"
# Literals.
-color red "\<[0-9]+\.[0-9]*([Ee][+-]?[0-9]+)?i?\>"
-color red "\<[0-9]+[Ee][+-]?[0-9]+i?\>"
+color red "\<[0-9]+(\.[0-9]*)?([Ee][+-]?[0-9]+)?i?\>"
color red "\B\.[0-9]+([Ee][+-]?[0-9]+)?i?\>"
-color red "\<[0-9]+i\>"
-color red "\<[1-9][0-9]*\>"
-color red "\<0[0-7]*\>"
-icolor red "\<0x[0-9a-f]+\>"
+color red "\<(0[0-7]*|[1-9][0-9]*|0[xX][0-9a-fA-F]+)\>"
# Strings and characters; slightly fuzzy.
color red "\<(true|false|nil|iota|_)\>"
diff --git a/syntax/pov.nanorc b/syntax/pov.nanorc
@@ -7,9 +7,7 @@ color brightcyan "^[[:space:]]*#[[:space:]]*(declare)"
color brightyellow "\<(sphere|cylinder|translate|matrix|rotate|scale)\>"
color brightyellow "\<(orthographic|location|up|right|direction|clipped_by)\>"
color brightyellow "\<(fog_type|fog_offset|fog_alt|rgb|distance|transform)\>"
-color brightred "^texture\>"
-color brightred "\<(light_source|background)\>"
-color brightred "\<(fog|object|camera)\>"
+color brightred "\<(background|camera|fog|light_source|object|texture)\>"
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
color brightmagenta "\<(union|group|subgroup)\>"