From 087321759fd65bb80ee10c88944a1bd15e792da8 Mon Sep 17 00:00:00 2001 From: Tom Levy Date: Sun, 31 Dec 2017 04:09:21 +0000 Subject: [PATCH 3/6] syntax: lua: hex literals: support fractional part and exponent As of Lua 5.2, "Hexadecimal constants also accept an optional fractional part plus an optional binary exponent, marked by a letter 'p' or 'P'." (from https://www.lua.org/manual/5.2/manual.html#3.1 , search for "numerical constant"). Signed-off-by: Tom Levy --- syntax/lua.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax/lua.nanorc b/syntax/lua.nanorc index 2c3ed848..400d79d5 100644 --- a/syntax/lua.nanorc +++ b/syntax/lua.nanorc @@ -61,4 +61,4 @@ color red "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'" ##color red start="\[\[" end="\]\]" # Hex literals -color red "\<0x[0-9a-fA-F]+\>" +icolor red "\<0x[0-9a-f]+(\.[0-9a-f]*)?(p[+-]?[0-9]+)?\>" -- 2.11.0