"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/langDefs/fsharp.lang" (12 May 2020, 1478 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 "fsharp.lang": 3.56_vs_3.57.

    1 
    2 Description="F#"
    3 
    4 Categories = {"source", "functional"}
    5 
    6 Digits=[[ (?:0x|0X|0b|0B|0o)[0-9a-fA-F]+?\w*|\d*[\.\_]?\d+(?:[eE][\-\+]\d+)?\w* ]]
    7 
    8 Keywords={
    9   { Id=1,
   10     List={"abstract", "lsl", "and", "lsr", "as", "lxor", "assert", "match", "member", "asr", "mod", "begin", "module",
   11     "class", "mutable", "namespace", "default", "new", "delegate", "null", "do", "of", "done", "open", "downcast", "or",
   12     "downto", "override", "else", "rec", "end", "sig", "exception", "static", "false", "struct", "finally", "then", "for",
   13     "to", "fun", "true", "function", "try", "if", "type", "in", "val", "inherit", "when", "inline", "upcast", "interface",
   14     "while", "land", "with", "lor", "let" , "use" },
   15   },
   16   { Id=2,
   17     List={"bool", "string", "int", "real", "word", "float", "unit", "option", "ref"},
   18   },
   19     { Id=3,
   20     Regex=[[ [use|let]\s+(mutable\s+)?(\w+)]], Group=2
   21   },
   22   { Id=4,
   23     Regex=[[\b[A-Z][a-zA-Z0-9_]*]],
   24   },
   25 }
   26 
   27 -- add keywords to list 3
   28 function OnStateChange(oldState, newState, token, kwgroup)
   29   if  newState==HL_KEYWORD and kwgroup==3 then
   30     AddKeyword(token, 3)
   31   end
   32   return newState
   33 end
   34 
   35 Strings={
   36   Delimiter=[["|']],
   37   RawPrefix="@",
   38   Interpolation=[[ \{\d+\}|%\w ]]
   39 }
   40 
   41 IgnoreCase=false
   42 
   43 Comments={
   44   { Block=false,
   45     Delimiter= { [[//]] },
   46   },
   47   { Block=true,
   48     Nested=true,
   49     Delimiter= { [[\(\*]],[[\*\)]],}
   50   }
   51 }
   52 
   53 PreProcessor={
   54   Prefix=[[#]],
   55 }
   56 
   57 Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\:|\&|<|>|\!|\=|\/|\*|\%|\+|\-|\.|\@|\?|\^|\|]]