From a4a5a6907acf6361618a8aa723a4bacc489f270a Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 14 Jul 2020 10:09:33 -0400 Subject: lexlua: Minor pattern refactoring. --- lexlua/dot.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lexlua/dot.lua') diff --git a/lexlua/dot.lua b/lexlua/dot.lua index 906ce6b48..6b298b47a 100644 --- a/lexlua/dot.lua +++ b/lexlua/dot.lua @@ -4,7 +4,7 @@ local lexer = require('lexer') local token, word_match = lexer.token, lexer.word_match -local P, R, S = lpeg.P, lpeg.R, lpeg.S +local P, S = lpeg.P, lpeg.S local lex = lexer.new('dot') @@ -42,7 +42,7 @@ local block_comment = lexer.range('/*', '*/') lex:add_rule('comment', token(lexer.COMMENT, line_comment + block_comment)) -- Numbers. -lex:add_rule('number', token(lexer.NUMBER, lexer.digit^1 + lexer.float)) +lex:add_rule('number', token(lexer.NUMBER, lexer.dec_num + lexer.float)) -- Operators. lex:add_rule('operator', token(lexer.OPERATOR, S('->()[]{};'))) -- cgit v1.2.3