"Fossies" - the Fresh Open Source Software Archive

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

    1 -- a highlight lang definition for coffeescript's block regexes, by Jess Austin
    2 Description = "Coffeescript Block Regex"
    3 
    4 Categories = {"source", "script"}
    5 
    6 
    7 Keywords = {
    8   { -- backslash literals
    9     Id = 1,
   10     Regex = [=[\\[][0-9'"\\.?()]]=]
   11   },
   12   { -- interpolation
   13     Id = 2,
   14     Regex = [[#\{.*}]]
   15   },
   16 
   17 }
   18 
   19 Comments = {
   20   {
   21     Block = false,
   22     Delimiter = { [[#]] }
   23   }
   24 }
   25 
   26 Strings = { -- actually, character sets
   27   DelimiterPairs = { { Open = "\\[\\^?", Close = "\\]" } },
   28   Escape = [=[\\u\{[[:xdigit:]]+\}|\\u[[:xdigit:]]{4}|\\x[[:xdigit:]]{2}|\\c[A-Z]|\\[[bBdDsSwWtrnvf0]]=]
   29 }
   30 
   31 Operators = [[\.|\+|\*|\^|\$|\||\?:|\?=|\?!|\?|\(|\)]]
   32 Digits = [[\{\d+,?\d*\}]] -- integer quantifiers
   33 
   34 -- maybe this would be a better way to do interpolation? I can't get it to work
   35 --NestedSections = {
   36 --  {
   37 --    Lang = "coffee",
   38 --    Delimiter = { [[#\{]], [[}]] }
   39 --  }
   40 --}