aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlua/diff.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/diff.lua
parent6dcfbc6a747c0a20e21b53ef0a780bc0ad24da05 (diff)
downloadscintilla-mirror-a4a5a6907acf6361618a8aa723a4bacc489f270a.tar.gz
lexlua: Minor pattern refactoring.
Diffstat (limited to 'lexlua/diff.lua')
-rw-r--r--lexlua/diff.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lexlua/diff.lua b/lexlua/diff.lua
index c5c6b8738..676865f08 100644
--- a/lexlua/diff.lua
+++ b/lexlua/diff.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('diff', {lex_by_line = true})
@@ -16,7 +16,7 @@ lex:add_rule('header', token('header', (P('*** ') + '--- ' + '+++ ') *
lex:add_style('header', lexer.styles.comment)
-- Location.
-lex:add_rule('location', token(lexer.NUMBER, ('@@' + lexer.digit^1 + '****') *
+lex:add_rule('location', token(lexer.NUMBER, ('@@' + lexer.dec_num + '****') *
lexer.any^1))
-- Additions, deletions, and changes.