From 185b9cb08048728aae1ca83408006b0fa779e894 Mon Sep 17 00:00:00 2001 From: Robert Hildebrandt Date: Thu, 7 Sep 2023 01:54:52 +0200 Subject: [PATCH] Fixed C++14 digit separators (#1593) --- data/plugins/language_cpp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/plugins/language_cpp.lua b/data/plugins/language_cpp.lua index a26ce868..70489713 100644 --- a/data/plugins/language_cpp.lua +++ b/data/plugins/language_cpp.lua @@ -14,9 +14,9 @@ syntax.add { { pattern = { "/%*", "%*/" }, type = "comment" }, { pattern = { '"', '"', '\\' }, type = "string" }, { pattern = { "'", "'", '\\' }, type = "string" }, - { pattern = "0x%x+", type = "number" }, + { pattern = "0x%x+[%x']*", type = "number" }, { pattern = "%d+[%d%.'eE]*f?", type = "number" }, - { pattern = "%.?%d+f?", type = "number" }, + { pattern = "%.?%d+[%d']*f?", type = "number" }, { pattern = "[%+%-=/%*%^%%<>!~|:&]", type = "operator" }, { pattern = "##", type = "operator" }, { pattern = "struct%s()[%a_][%w_]*", type = {"keyword", "keyword2"} },