From 4ec908bc1e00a0d21437b61b0c94565a785f3b14 Mon Sep 17 00:00:00 2001 From: fgelm01 Date: Thu, 20 Jun 2024 02:55:01 -0400 Subject: [PATCH] Add support for binary integer literals. (#1819) --- data/plugins/language_cpp.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/data/plugins/language_cpp.lua b/data/plugins/language_cpp.lua index d2486736..4bd08477 100644 --- a/data/plugins/language_cpp.lua +++ b/data/plugins/language_cpp.lua @@ -21,6 +21,7 @@ syntax.add { { pattern = { '"', '"', '\\' }, type = "string" }, { pattern = { "'", "'", '\\' }, type = "string" }, { regex = "0x[0-9a-fA-f]+"..isuf, type = "number" }, + { regex = "0b[01]+"..isuf, type = "number" }, { regex = "0()[0-7]+"..isuf, type = { "keyword", "number" } }, { pattern = "%d+%.%d*[Ee]%d+"..fsuf, type = "number" }, { pattern = "%d+[Ee]%d+"..fsuf, type = "number" },