aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlua/gap.lua
diff options
context:
space:
mode:
authormitchell <unknown>2020-07-14 10:09:33 -0400
committermitchell <unknown>2020-07-14 10:09:33 -0400
commita4a5a6907acf6361618a8aa723a4bacc489f270a (patch)
treed1a946fe3d01eb3403bd602ee06a241f4089426d /lexlua/gap.lua
parent6dcfbc6a747c0a20e21b53ef0a780bc0ad24da05 (diff)
downloadscintilla-mirror-a4a5a6907acf6361618a8aa723a4bacc489f270a.tar.gz
lexlua: Minor pattern refactoring.
Diffstat (limited to 'lexlua/gap.lua')
-rw-r--r--lexlua/gap.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lexlua/gap.lua b/lexlua/gap.lua
index 15cbc75dd..779a93e73 100644
--- a/lexlua/gap.lua
+++ b/lexlua/gap.lua
@@ -3,7 +3,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('gap')
@@ -28,7 +28,7 @@ lex:add_rule('string', token(lexer.STRING, sq_str + dq_str))
lex:add_rule('comment', token(lexer.COMMENT, lexer.to_eol('#')))
-- Numbers.
-lex:add_rule('number', token(lexer.NUMBER, lexer.digit^1 * -lexer.alpha))
+lex:add_rule('number', token(lexer.NUMBER, lexer.dec_num * -lexer.alpha))
-- Operators.
lex:add_rule('operator', token(lexer.OPERATOR, S('*+-,./:;<=>~^#()[]{}')))