"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/langDefs/bat.lang" (12 May 2020, 2192 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 "bat.lang": 3.53_vs_3.54.

    1 
    2 Description="MS DOS Batch"
    3 
    4 Categories = {"source", "script"}
    5 
    6 Keywords={
    7   { Id=1,
    8     List={"do", "else", "end", "errorlevel", "exist", "exit", "for", "goto", "if", "not",
    9           "pause", "return", "say", "select", "then", "neq", "when"},
   10   },
   11   { Id=2,
   12     List={
   13       "ansi", "append", "assign", "attrib", "autofail", "backup", "basedev",
   14       "boot", "break", "buffers", "cache", "call", "cd", "chcp", "chdir", "chkdsk",
   15       "choice", "cls", "cmd", "codepage", "command", "comp", "copy", "country",
   16       "date", "ddinstal", "debug", "del", "detach", "device", "devicehigh", "devinfo",
   17       "dir", "diskcoache", "diskcomp", "diskcopy", "doskey", "dpath", "dumpprocess",
   18       "eautil", "endlocal", "erase", "exit_vdm", "extproc", "fcbs", "fdisk",
   19       "fdiskpm", "files", "find", "format", "fsaccess", "fsfilter", "graftabl",
   20       "iopl", "join", "keyb", "keys", "label", "lastdrive", "libpath", "lh",
   21       "loadhigh", "makeini", "maxwait", "md", "mem", "memman", "mkdir", "mode",
   22       "move", "net", "patch", "path", "pauseonerror", "picview", "pmrexx", "print",
   23       "printmonbufsize", "priority", "priority_disk_io", "prompt", "protectonly",
   24       "protshell", "pstat", "rd", "recover", "reipl", "ren", "rename", "replace",
   25       "restore", "rmdir", "rmsize", "run", "set", "setboot", "setlocal", "shell",
   26       "shift", "sort", "spool", "start",
   27       "subst", "suppresspopups", "swappath", "syslevel", "syslog", "threads", "time",
   28       "timeslice", "trace", "tracebuf", "tracefmt", "trapdump", "tree", "type",
   29       "undelete", "unpack", "use", "ver", "verify", "view", "vmdisk", "vol", "xcopy",
   30       "xcopy32", "xdfcopy", "echo"},
   31   },
   32   { Id=3,
   33     Regex=[[%\w+%]],
   34   },
   35   { Id=4,
   36     Regex=[[:\w+]],
   37   },
   38 }
   39 
   40 Strings={
   41   Delimiter=[["|']],
   42   Interpolation=[[ %\w+% ]],
   43 }
   44 
   45 IgnoreCase=true
   46 
   47 Comments={
   48   { Block=false,
   49     Delimiter= { [[^(rem|Rem|REM).*]] },
   50   },
   51 }
   52 
   53 Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\:|\&|<|>|\!|\=|\/|\*|\%|\+|\-]]
   54 
   55 -- fix recognition of $
   56 function OnStateChange(oldState, newState, token)
   57 
   58   if string.match(token, "%%.*%%") ~= nil and oldState==HL_STRING and newState==HL_KEYWORD then
   59     return HL_INTERPOLATION
   60   end
   61 
   62   return newState
   63 end