@@ -44,12 +44,36 @@ local keyword = token(l.KEYWORD, word_match {
4444local special = token (" special" , word_match { " true" , " false" , " nil" })
4545
4646-- Functions.
47- local builtin = token (l .FUNCTION , word_match {
48- ' assert' , ' collectgarbage' , ' dofile' , ' error' , ' getfenv' , ' getmetatable' ,
49- ' ipairs' , ' load' , ' loadfile' , ' loadstring' , ' module' , ' next' , ' pairs' ,
50- ' pcall' , ' print' , ' rawequal' , ' rawget' , ' rawset' , ' require' , ' setfenv' ,
51- ' setmetatable' , ' tonumber' , ' tostring' , ' type' , ' unpack' , ' xpcall'
52- })
47+ local builtin = token (l .FUNCTION , word_match ({
48+ " _G" ," _VERSION" ," assert" ," collectgarbage" ," dofile" ," error" ," getfenv" ," getmetatable" ," ipairs" ," load" ,
49+ " loadfile" ," loadstring" ," module" ," next" ," pairs" ," pcall" ," print" ," rawequal" ," rawget" ," rawset" ," require" ,
50+ " select" ," setfenv" ," setmetatable" ," tonumber" ," tostring" ," type" ," unpack" ," xpcall" ,
51+
52+ " coroutine.create" ," coroutine.resume" ," coroutine.running" ," coroutine.status" ," coroutine.wrap" ," coroutine.yield" ,
53+
54+ " debug.debug" ," debug.getfenv" ," debug.gethook" ," debug.getinfo" ," debug.getlocal" ," debug.getmetatable" ,
55+ " debug.getregistry" ," debug.getupvalue" ," debug.setfenv" ," debug.sethook" ," debug.setlocal" ," debug.setmetatable" ,
56+ " debug.setupvalue" ," debug.traceback" ,
57+
58+ " io.close" ," io.flush" ," io.input" ," io.lines" ," io.open" ," io.output" ," io.popen" ," io.read" ," io.stderr" ," io.stdin" ,
59+ " io.stdout" ," io.tmpfile" ," io.type" ," io.write" ,
60+
61+ " math.abs" ," math.acos" ," math.asin" ," math.atan" ," math.atan2" ," math.ceil" ," math.cos" ," math.cosh" ," math.deg" ,
62+ " math.exp" ," math.floor" ," math.fmod" ," math.frexp" ," math.huge" ," math.ldexp" ," math.log" ," math.log10" ," math.max" ,
63+ " math.min" ," math.modf" ," math.pi" ," math.pow" ," math.rad" ," math.random" ," math.randomseed" ," math.sin" ," math.sinh" ,
64+ " math.sqrt" ," math.tan" ," math.tanh" ,
65+
66+ " os.clock" ," os.date" ," os.difftime" ," os.execute" ," os.exit" ," os.getenv" ," os.remove" ," os.rename" ," os.setlocale" ,
67+ " os.time" ," os.tmpname" ,
68+
69+ " package.cpath" ," package.loaded" ," package.loaders" ," package.loadlib" ," package.path" ," package.preload" ,
70+ " package.seeall" ,
71+
72+ " string.byte" ," string.char" ," string.dump" ," string.find" ," string.format" ," string.gmatch" ," string.gsub" ,
73+ " string.len" ," string.lower" ," string.match" ," string.rep" ," string.reverse" ," string.sub" ," string.upper" ,
74+
75+ " table.concat" ," table.insert" ," table.maxn" ," table.remove" ," table.sort"
76+ }, " %." ))
5377
5478-- Identifiers.
5579local identifier = token (l .IDENTIFIER , l .word )
@@ -95,6 +119,4 @@ _tokenstyles = {
95119 { ' symbol' , style_fndef },
96120 { ' special' , style_special },
97121 { ' tbl_key' , { fore = l .colors .red } },
98- { l .OPERATOR , { fore = l .colors .red , bold = true } },
99- { l .FUNCTION , { fore = l .colors .orange } },
100122}
0 commit comments