"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/langDefs/ocaml.lang" (12 May 2020, 1307 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.

    1 
    2 Description="Objective Caml"
    3 
    4 Categories = {"source"}
    5 
    6 Digits=[[ (?:0x|0X|0b|0B)[0-9a-fA-F]+|\d*[\.\_]?\d+(?:[eE][\-\+]\d+)?[lLuUbfdm]* ]]
    7 
    8 Keywords={
    9   { Id=1, List={"and", "as", "assert", "asr", "begin", "", "class",
   10     "constraint", "do", "done", "downto", "else", "end", "exception", "external",
   11     "false", "for", "fun", "function", "functor", "if", "in", "include", "inherit",
   12     "initializer", "land", "lazy", "let", "lor", "lsl", "lsr", "lxor", "match",
   13     "method", "mod", "module", "mutable", "new", "object", "of", "open", "or",
   14     "private", "rec", "sig", "struct", "then", "to", "true", "try", "type", "val",
   15     "virtual", "when", "while", "with", "value"}, },
   16   { Id=2,
   17     List={"bool", "string", "int", "real", "word", "float", "unit", "option", "ref"},
   18   },
   19   { Id=3,
   20     Regex=[[\b[A-Z][a-zA-Z0-9_]*(?=\.)]],
   21   },
   22   { Id=4,
   23     Regex=[[ let\s+(rec\s+)?(\w+)]], Group=2
   24   },
   25 }
   26 
   27 function OnStateChange(oldState, newState, token, kwgroup)
   28   if  newState==HL_KEYWORD and kwgroup==4 then
   29 
   30     AddKeyword(token, 4)
   31   end
   32   return newState
   33 end
   34 
   35 Strings={
   36   Delimiter=[["]],
   37   Interpolation=[[ %\w ]],
   38 }
   39 
   40 Comments={
   41 
   42   { Block=true,
   43     Nested=false,
   44     Delimiter= { [[\(\*]],[[\*\)]],}
   45   }
   46 }
   47 
   48 IgnoreCase=false
   49 
   50 Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\:|\&|<|>|\!|\=|\/|\*|\%|\+|\-|\.|\||@]]