aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlua/moonscript.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/moonscript.lua
parent6dcfbc6a747c0a20e21b53ef0a780bc0ad24da05 (diff)
downloadscintilla-mirror-a4a5a6907acf6361618a8aa723a4bacc489f270a.tar.gz
lexlua: Minor pattern refactoring.
Diffstat (limited to 'lexlua/moonscript.lua')
-rw-r--r--lexlua/moonscript.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lexlua/moonscript.lua b/lexlua/moonscript.lua
index c7c19834c..161736df0 100644
--- a/lexlua/moonscript.lua
+++ b/lexlua/moonscript.lua
@@ -3,7 +3,7 @@
local lexer = require('lexer')
local token, word_match = lexer.token, lexer.word_match
-local P, S, R = lpeg.P, lpeg.S, lpeg.R
+local P, S = lpeg.P, lpeg.S
local lex = lexer.new('moonscript', {fold_by_indentation = true})
@@ -103,7 +103,7 @@ lex:add_style('library', lexer.styles.type)
-- Identifiers.
local identifier = token(lexer.IDENTIFIER, lexer.word)
-local proper_ident = token('proper_ident', R('AZ') * lexer.word)
+local proper_ident = token('proper_ident', lexer.upper * lexer.word)
local tbl_key = token('tbl_key', lexer.word * ':' + ':' * lexer.word )
lex:add_rule('identifier', tbl_key + proper_ident + identifier)
lex:add_style('proper_ident', lexer.styles.class)