1 /* lexname=lua lexpfx=SCE_LUA_ lextag=SCLEX_LUA */
2 
3 static StyleDef lua_style[] = {
4   { "default", SCE_LUA_DEFAULT, _DEFLT_FG, _DEFLT_BG, Normal },
5   { "comment", SCE_LUA_COMMENT, COMMNT_FG, _DEFLT_BG, Italic },
6   { "commentline", SCE_LUA_COMMENTLINE, COMMNT_FG, _DEFLT_BG, Italic },
7   { "commentdoc", SCE_LUA_COMMENTDOC, COMMNT_FG, _DEFLT_BG, Italic },
8   { "number", SCE_LUA_NUMBER, NUMBER_FG, _DEFLT_BG, Normal },
9   { "word", SCE_LUA_WORD, _WORD1_FG, _DEFLT_BG, Bold },
10   { "string", SCE_LUA_STRING, STRING_FG, _DEFLT_BG, Normal },
11   { "character", SCE_LUA_CHARACTER, STRING_FG, _DEFLT_BG, Normal },
12   { "literalstring", SCE_LUA_LITERALSTRING, STRING_FG, _DEFLT_BG, Normal },
13   { "preprocessor", SCE_LUA_PREPROCESSOR, PREPRC_FG, _DEFLT_BG, Normal },
14   { "operator", SCE_LUA_OPERATOR, OPERTR_FG, _DEFLT_BG, Bold },
15   { "identifier", SCE_LUA_IDENTIFIER, _DEFLT_FG, _DEFLT_BG, Normal },
16   { "stringeol", SCE_LUA_STRINGEOL, STREOL_FG, _DEFLT_BG, Normal },
17   { "word2", SCE_LUA_WORD2, _WORD2_FG, _DEFLT_BG, Bold },
18   { "word3", SCE_LUA_WORD3, _WORD1_FG, _DEFLT_BG, Bold },
19   { "word4", SCE_LUA_WORD4, _WORD1_FG, _DEFLT_BG, Bold },
20   { "word5", SCE_LUA_WORD5, _WORD1_FG, _DEFLT_BG, Bold },
21   { "word6", SCE_LUA_WORD6, _WORD1_FG, _DEFLT_BG, Bold },
22   { "word7", SCE_LUA_WORD7, _WORD1_FG, _DEFLT_BG, Bold },
23   { "word8", SCE_LUA_WORD8, _WORD1_FG, _DEFLT_BG, Bold },
24   { "label", SCE_LUA_LABEL, _DEFLT_FG, _DEFLT_BG, Normal },
25   { NULL, 0, _DEFLT_FG, _DEFLT_BG, Normal }
26 };
27 
28 
29 static const char* lua_words[]= {
30   "and break do else elseif end for function if in local nil not or repeat return then until whilefalse truegoto",
31   "assert collectgarbage dofile error _G getmetatable ipairs loadfile next pairs pcall print rawequal rawget rawset setmetatable tonumber tostring type _VERSION xpcall string table math coroutine io os debuggetfenv gcinfo load loadlib loadstring require select setfenv unpack _LOADED LUA_PATH _REQUIREDNAME package rawlen package bit32 _ENV",
32   "string.byte string.char string.dump string.find string.format string.gsub string.len string.lower string.rep string.sub string.upper table.concat table.insert table.remove table.sort math.abs math.acos math.asin math.atan math.atan2 math.ceil math.cos math.deg math.exp math.floor math.frexp math.ldexp math.log math.max math.min math.pi math.pow math.rad math.random math.randomseed math.sin math.sqrt math.tanstring.gfind string.gmatch string.match string.reverse table.foreach table.foreachi table.getn table.setn table.maxn table.pack table.unpack math.cosh math.fmod math.huge math.log10 math.modf math.mod math.sinh math.tanh bit32.arshift bit32.band bit32.bnot bit32.bor bit32.btest bit32.bxor bit32.extract bit32.replace bit32.lrotate bit32.lshift bit32.rrotate bit32.rshift",
33   "coroutine.create coroutine.resume coroutine.status coroutine.wrap coroutine.yield io.close io.flush io.input io.lines io.open io.output io.read io.tmpfile io.type io.write io.stdin io.stdout io.stderr os.clock os.date os.difftime os.execute os.exit os.getenv os.remove os.rename os.setlocale os.time os.tmpnamecoroutine.running io.popen module package.loaders package.seeall package.config package.searchers package.searchpath require package.cpath package.loaded package.loadlib package.path package.preload",
34   "",
35   "",
36   "",
37   "",
38   NULL
39 };
40 
41 
42 static const char* lua_mask = "*.lua";
43 
44 
45 static const char* lua_apps = "lua";
46 
47 
48 static LangStyle LangLua = {
49   "lua",
50   SCLEX_LUA,
51   lua_style,
52   (char**)lua_words,
53   (char*)lua_mask,
54   (char*)lua_apps,
55   0,
56   TABS_DEFAULT,
57   0
58 };
59 
60 
61