"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/langDefs/lua.lang" (12 May 2020, 1949 Bytes) of package /windows/www/highlight-3.57-x64.zip:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "lua.lang": 3.53_vs_3.54.

    1 
    2 Description="Lua"
    3 
    4 Categories = {"source"}
    5 
    6 Keywords={
    7   { Id=1,
    8     List={"and", "break", "do", "else", "elseif", "end", "false", "for",
    9           "function", "if", "in", "local", "nil", "not", "or", "repeat", "return", "then",
   10           "true", "until", "while"},
   11   },
   12   { Id=2,
   13     List={"number", "string", "function", "userdata", "table", "assert", "call",
   14           "collectgarbage", "copytagmethods", "dofile", "dostring", "error", "foreach",
   15           "foreachi", "getglobal", "getn", "gettagmethod", "globals", "newtag", "next",
   16           "print", "rawget", "rawset", "setglobal", "settag", "settagmethod", "sort",
   17           "tag", "tonumber", "tostring", "tinsert", "tremove", "type", "abs", "acos",
   18           "asin", "atan", "atan2", "ceil", "cos", "deg", "exp", "floor", "log", "log10",
   19           "max", "min", "mod", "rad", "sin", "sqrt", "tan", "frexp", "ldexp", "random",
   20           "randomseed", "openfile", "closefile", "readfrom", "writeto", "appendto",
   21           "remove", "rename", "flush", "seek", "tmpname", "read", "write", "clock",
   22           "date", "execute", "exit", "getenv", "setlocale", "strbyte", "strchar",
   23           "strfind", "strlen", "strlower", "strrep", "strsub", "strupper", "format",
   24           "gsub"},
   25   },
   26   { Id=4,
   27     Regex=[[(\w+)\s*\(]],
   28   },
   29 }
   30 
   31 Strings={
   32   Delimiter=[["|']],
   33   DelimiterPairs= {
   34     { Open=[[ \[=*\[ ]], Close=[[ \]=*\] ]], Raw=true }
   35   },
   36   AssertEqualLength=true
   37 }
   38 
   39 IgnoreCase=false
   40 
   41 Comments={
   42   { Block=false,
   43     Delimiter= { [[\-\-(?!\[\[) ]] },
   44   },
   45 
   46   { Block=true,
   47     Nested=false,
   48     Delimiter= { [[ \-\-\[\[ ]],[[ \]\] ]],}
   49   }
   50 }
   51 
   52 Operators=[[\(|\)|\{|\}|\[|\]|\,|\;|\.|\:|\&|<|>|\!|\=|\/|\*|\%|\+|\-|\~|\#|\\]]
   53 
   54 
   55 -- resolve issue with ]] close delimiter which ends comments and strings
   56 function OnStateChange(oldState, newState, token)
   57 
   58   if token=="]]" and oldState==HL_STRING and newState==HL_BLOCK_COMMENT_END then
   59     return HL_STRING_END
   60   end
   61 
   62   return newState
   63 end