"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/langDefs/haskell.lang" (12 May 2020, 1172 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="Haskell"
    3 
    4 Categories = {"source"}
    5 
    6 Keywords={
    7   -- Type-level keywords
    8   { Id=1,
    9     List={"class", "data", "deriving", "instance", "default", "type", "newtype"}
   10   },
   11   -- Module-level keywords
   12   { Id=2,
   13     List={"module", "import", "where", "foreign", "qualified", "as", "hiding", "infix", "infixl", "infixr"}
   14   },
   15   -- Expression-level keywords
   16   { Id=4,
   17     List={"if", "then", "else", "case", "of", "do", "let", "in"}
   18   },
   19   -- Special syntax
   20   { Id=3,
   21     Regex=[[ [\[\](),;}]+|{(?!-) ]]
   22   },
   23 }
   24 
   25 Strings={
   26   Delimiter=[["|']],
   27 }
   28 
   29 -- Escape sequences only occur inside strings
   30 -- strings ending with ' should not be confused with identifiers
   31 -- TDOD check ' and "
   32 function OnStateChange(oldState, newState, token, kwgroup)
   33   if newState==HL_ESC_SEQ and oldState~=HL_STRING or string.match(token, "%a+'" ) and oldState==HL_STRING then
   34     return HL_REJECT
   35   end
   36 
   37   return newState
   38 end
   39 
   40 Identifiers=[[ [a-zA-Z][a-zA-Z0-9_']* ]]
   41 
   42 IgnoreCase=false
   43 
   44 Comments={
   45   { Block=false,
   46     Delimiter= { [[--]] },
   47   },
   48   { Block=true,
   49     Nested=false,
   50     Delimiter= { [[\{\-]],[[\-\}]],}
   51   }
   52 }
   53 
   54 Operators=[[ `[a-z][a-zA-Z0-9_']*`|#(?!-})|[!$%&*+\./<=>?@^\|~-]+ ]]
   55