From 1dbfae08992d04bfec5875e80505f1c17a8592eb Mon Sep 17 00:00:00 2001 From: Tom Levy Date: Mon, 8 Jan 2018 06:31:58 +0000 Subject: [PATCH] syntax: go: revert changes to number literal regexes There are still problems from the folding, change the regexes back and reorder them to closely match the Go language specification. Discussion on the mailing list: https://lists.gnu.org/archive/html/nano-devel/2018-01/msg00022.html Signed-off-by: Tom Levy --- syntax/go.nanorc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/syntax/go.nanorc b/syntax/go.nanorc index 451fd906..963bba79 100644 --- a/syntax/go.nanorc +++ b/syntax/go.nanorc @@ -24,9 +24,11 @@ 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([0-7]*|[xX][0-9a-fA-F]+)\>" -color red "(\<0+|\B)\.[0-9]+([Ee][+-]?[0-9]+)?i?\>" -color red "\<[1-9][0-9]*(\.[0-9]*)?([Ee][+-]?[0-9]+)?i?\>" +color red "\<([1-9][0-9]*|0[0-7]*|0[xX][0-9A-Fa-f]+)\>" +color red "\<[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?i?\>" +color red "\<[0-9]+[eE][+-]?[0-9]+i?\>" +color red "\B\.[0-9]+([eE][+-]?[0-9]+)?i?\>" +color red "\<[0-9]+i\>" # Strings and characters; slightly fuzzy. color red "\<(true|false|nil|iota|_)\>" -- 2.11.0