dp.sh.Brushes.Lua = function(){
    var keywords = 'break do end else elseif function if local nil not or repeat return and then until while this';
    var funcs = 'LocalPlayer error fopen dofile arg getmetatable ipairs loadfile loadlib loadstring longjmp print rawget rawset seek setmetatable assert tonumber tostring';
    var libs = 'render\\.\\w+ string\\.\\w+ resource\\.\\w+ package\\.\\w+ concommand\\.\\w+ undo\\.\\w+ os\\.\\w+ avi\\.\\w+ debugoverlay\\.\\w+ server_settings\\.\\w+ language\\.\\w+ ai_task\\.\\w+ player_manager\\.\\w+ hook\\.\\w+ debug\\.\\w+ cam\\.\\w+ numpad\\.\\w+ game\\.\\w+ markup\\.\\w+ math\\.\\w+ weapons\\.\\w+ player\\.\\w+ cvars\\.\\w+ vgui\\.\\w+ timer\\.\\w+ file\\.\\w+ vehicles\\.\\w+ http\\.\\w+ util\\.\\w+ duplicator\\.\\w+ scripted_ents\\.\\w+ umsg\\.\\w+ mtable\\.\\w+ filex\\.\\w+ team\\.\\w+ ComboBox_Emitter_Options\\.\\w+ table\\.\\w+ surface\\.\\w+ ents\\.\\w+ sql\\.\\w+ controlpanel\\.\\w+ spawnmenu\\.\\w+ coroutine\\.\\w+ usermessage\\.\\w+ schedule\\.\\w+ gamemode\\.\\w+ presets\\.\\w+ ai_schedule\\.\\w+ draw\\.\\w+ list\\.\\w+ cookie\\.\\w+ derma\\.\\w+ killicon\\.\\w+ effects\\.\\w+ cleanup\\.\\w+ gmod\\.\\w+ input\\.\\w+ saverestore\\.\\w+ constraint\\.\\w+ gui\\.\\w+';
	
    this.regexList = [{
        regex: new RegExp('--\\[\\[[\\s\\S]*\\]\\]--', 'gm'),
        css: 'comment'
    }, {
        regex: new RegExp('--[^\\[]{2}.*$', 'gm'),
        css: 'comment'
    }, // one line comments
    {
        regex: dp.sh.RegexLib.DoubleQuotedString,
        css: 'string'
    }, // strings
    {
        regex: dp.sh.RegexLib.SingleQuotedString,
        css: 'string'
    }, // strings
    {
        regex: dp.sh.RegexLib.SingleLineCComments,
        css: 'comment'
    }, // one line comments
    {
        regex: dp.sh.RegexLib.MultiLineCComments,
        css: 'comment'
    }, // multiline comments
    {
        regex: new RegExp(this.GetKeywords(keywords), 'gm'),
        css: 'keyword'
    }, // keyword
    {
        regex: new RegExp(this.GetKeywords(funcs), 'gm'),
        css: 'func'
    }, // functions
    {
		regex: new RegExp(this.GetKeywords(libs), 'gm'),
		css: 'func'
	}
 ];
    
    this.CssClass = 'dp-lua';
}

dp.sh.Brushes.Lua.prototype = new dp.sh.Highlighter();
dp.sh.Brushes.Lua.Aliases = ['lua'];
