aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlua/nim.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/nim.lua
parent6dcfbc6a747c0a20e21b53ef0a780bc0ad24da05 (diff)
downloadscintilla-mirror-a4a5a6907acf6361618a8aa723a4bacc489f270a.tar.gz
lexlua: Minor pattern refactoring.
Diffstat (limited to 'lexlua/nim.lua')
-rw-r--r--lexlua/nim.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lexlua/nim.lua b/lexlua/nim.lua
index 8840aa8fc..a7220851e 100644
--- a/lexlua/nim.lua
+++ b/lexlua/nim.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('nim', {fold_by_indentation = true})
@@ -85,7 +85,7 @@ lex:add_rule('comment', token(lexer.COMMENT, lexer.to_eol('#', true)))
local dec = lexer.digit^1 * ('_' * lexer.digit^1)^0
local hex = '0' * S('xX') * lexer.xdigit^1 * ('_' * lexer.xdigit^1)^0
local bin = '0' * S('bB') * S('01')^1 * ('_' * S('01')^1)^0
-local oct = '0o' * R('07')^1
+local oct = '0o' * lpeg.R('07')^1
local integer = S('+-')^-1 * (bin + hex + oct + dec) *
("'" * S('iIuUfF') * (P('8') + '16' + '32' + '64'))^-1
local float = lexer.digit^1 * ('_' * lexer.digit^1)^0 *