"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/langDefs/haml.lang" (12 May 2020, 915 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="Haml (HTML Abstraction Markup Language)"
    3 
    4 Categories = {"source"}
    5 
    6 Keywords={
    7 
    8   --tags:
    9   { Id=1,
   10     Regex=[[\%\w+]],
   11   },
   12 
   13   -- classes
   14   { Id=2,
   15     Regex=[[\.\w+]],
   16   },
   17 
   18   -- ids
   19   { Id=3,
   20     Regex=[[\#\w+]],
   21   },
   22 
   23   -- namespaces
   24   { Id=4,
   25     Regex=[[^\!\!\!.*]],
   26   },
   27 
   28 }
   29 
   30 Strings={
   31   Delimiter=[["]]
   32 }
   33 
   34 IgnoreCase=true
   35 
   36 Comments={
   37   { Block=false,
   38     Delimiter= { [[^\-\#|^\/]] },
   39   },
   40 }
   41 
   42 Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\:|\&|<|>|\=|\+|\|]]
   43 
   44 --tbd
   45 --NestedSections = {
   46 --  { Lang="ruby", Delimiter= { [[^\s+\=\s]], [[$]] } },
   47 --}
   48 
   49 
   50 commentMode=0
   51 lastLine=0
   52 
   53 function OnStateChange(oldState, newState, token, kwGroupID, lno, col)
   54 
   55   if commentMode==1 then
   56     if col==0 and newState ~= HL_LINE_COMMENT then
   57       commentMode=0
   58       return newState
   59     else
   60       return HL_LINE_COMMENT
   61     end
   62   end
   63 
   64   if newState==HL_LINE_COMMENT then
   65     commentMode=1
   66   end
   67 
   68   return newState
   69 
   70 end