"Fossies" - the Fresh Open Source Software Archive

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

    1 
    2 -- a highlight lang definition for javascript regexes, by Jess Austin
    3 
    4 Description = "Javascript Regex"
    5 
    6 Categories = {"source", "script"}
    7 
    8 Keywords = {
    9   { -- backslash literals
   10     Id = 1,
   11     Regex = [=[\\.]]=]
   12   },
   13   { -- character classes
   14     Id = 2,
   15     Regex = [[ (\:(alnum|alpha|blank|cntrl|graph|print|punct|xdigit|unicode|word|space|digit|lower|upper)\:) ]], Group=1
   16   }
   17 }
   18 
   19 Strings = { -- character sets
   20   DelimiterPairs = { { Open = "\\[", Close = "\\]" } },
   21   Escape = [=[\\u\{[[:xdigit:]]+\}|\\u[[:xdigit:]]{4}|\\x[[:xdigit:]]{2}|\\c[A-Z]|\\[[bBdDsSwWtrnvf0]]=],
   22 }
   23 
   24 Operators = [[\.|\+|\*|\^|\$|\||\?:|\?=|\?!|\?|\(|\)]]
   25 Digits = [[\{\d+,?\d*\}]] -- integer quantifierso