Skip to content

Commit

Permalink
Recognize float suffixes in C lexer.
Browse files Browse the repository at this point in the history
  • Loading branch information
orbitalquark committed Dec 23, 2024
1 parent afdd708 commit 14d10e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lexers/c.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 14d10e4

Please sign in to comment.