From 1b7cfb25a28000a930c89cef369d49e0e3eda792 Mon Sep 17 00:00:00 2001 From: orbitalquark <70453897+orbitalquark@users.noreply.github.com> Date: Sun, 22 Dec 2024 23:22:36 -0500 Subject: Recognize float suffixes in C lexer --- lua/lexers/c.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/lexers') diff --git a/lua/lexers/c.lua b/lua/lexers/c.lua index eacae09..627334d 100644 --- a/lua/lexers/c.lua +++ b/lua/lexers/c.lua @@ -43,7 +43,7 @@ lex:add_rule('comment', lex:tag(lexer.COMMENT, line_comment + block_comment)) -- Numbers. local integer = lexer.integer * lexer.word_match('u l ll ul ull lu llu', true)^-1 -local float = lexer.float * P('f')^-1 +local float = lexer.float * lexer.word_match('f l df dd dl i j', true)^-1 lex:add_rule('number', lex:tag(lexer.NUMBER, float + integer)) -- Preprocessor. -- cgit v1.2.3