LCOV - code coverage report
Current view: top level - js/src/irregexp - RegExpCharacters.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 16 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* Generated by make_unicode.py DO NOT MODIFY */
       2             : /* Unicode version: 9.0.0 */
       3             : #include "irregexp/RegExpCharacters.h"
       4             : 
       5             : #include "mozilla/Assertions.h"
       6             : 
       7             : char16_t
       8           0 : js::irregexp::ConvertNonLatin1ToLatin1(char16_t c, bool unicode)
       9             : {
      10           0 :     MOZ_ASSERT(c > 0xFF, "Character mustn't be Latin1");
      11           0 :     if (unicode) {
      12             :         // "LATIN SMALL LETTER LONG S" case folds to "LATIN SMALL LETTER S".
      13           0 :         if (c == 0x017F)
      14           0 :             return 0x73;
      15             :         // "LATIN CAPITAL LETTER SHARP S" case folds to "LATIN SMALL LETTER SHARP S".
      16           0 :         if (c == 0x1E9E)
      17           0 :             return 0xDF;
      18             :         // "KELVIN SIGN" case folds to "LATIN SMALL LETTER K".
      19           0 :         if (c == 0x212A)
      20           0 :             return 0x6B;
      21             :         // "ANGSTROM SIGN" case folds to "LATIN SMALL LETTER A WITH RING ABOVE".
      22           0 :         if (c == 0x212B)
      23           0 :             return 0xE5;
      24             :     }
      25             : 
      26             :     // "GREEK CAPITAL LETTER MU" case maps to "MICRO SIGN".
      27             :     // "GREEK SMALL LETTER MU" case maps to "MICRO SIGN".
      28           0 :     if (c == 0x039C || c == 0x03BC)
      29           0 :         return 0xB5;
      30             :     // "LATIN CAPITAL LETTER Y WITH DIAERESIS" case maps to "LATIN SMALL LETTER Y WITH DIAERESIS".
      31           0 :     if (c == 0x0178)
      32           0 :         return 0xFF;
      33           0 :     return 0;
      34             : }
      35             : 
      36             : const int js::irregexp::kSpaceRanges[] = {
      37             :     0x0009, 0x000D + 1, // CHARACTER TABULATION..CARRIAGE RETURN (CR)
      38             :     0x0020, 0x0020 + 1, // SPACE
      39             :     0x00A0, 0x00A0 + 1, // NO-BREAK SPACE
      40             :     0x1680, 0x1680 + 1, // OGHAM SPACE MARK
      41             :     0x2000, 0x200A + 1, // EN QUAD..HAIR SPACE
      42             :     0x2028, 0x2029 + 1, // LINE SEPARATOR..PARAGRAPH SEPARATOR
      43             :     0x202F, 0x202F + 1, // NARROW NO-BREAK SPACE
      44             :     0x205F, 0x205F + 1, // MEDIUM MATHEMATICAL SPACE
      45             :     0x3000, 0x3000 + 1, // IDEOGRAPHIC SPACE
      46             :     0xFEFF, 0xFEFF + 1, // ZERO WIDTH NO-BREAK SPACE
      47             :     0xFFFF + 1
      48             : };
      49             : const int js::irregexp::kSpaceRangeCount = 21;
      50             : 
      51             : const int js::irregexp::kSpaceAndSurrogateRanges[] = {
      52             :     0x0009, 0x000D + 1, // CHARACTER TABULATION..CARRIAGE RETURN (CR)
      53             :     0x0020, 0x0020 + 1, // SPACE
      54             :     0x00A0, 0x00A0 + 1, // NO-BREAK SPACE
      55             :     0x1680, 0x1680 + 1, // OGHAM SPACE MARK
      56             :     0x2000, 0x200A + 1, // EN QUAD..HAIR SPACE
      57             :     0x2028, 0x2029 + 1, // LINE SEPARATOR..PARAGRAPH SEPARATOR
      58             :     0x202F, 0x202F + 1, // NARROW NO-BREAK SPACE
      59             :     0x205F, 0x205F + 1, // MEDIUM MATHEMATICAL SPACE
      60             :     0x3000, 0x3000 + 1, // IDEOGRAPHIC SPACE
      61             :     0xD800, 0xDFFF + 1, // <Lead Surrogate Min>..<Trail Surrogate Max>
      62             :     0xFEFF, 0xFEFF + 1, // ZERO WIDTH NO-BREAK SPACE
      63             :     0xFFFF + 1
      64             : };
      65             : const int js::irregexp::kSpaceAndSurrogateRangeCount = 23;
      66             : 
      67             : const int js::irregexp::kWordRanges[] = {
      68             :     0x0030, 0x0039 + 1, // DIGIT ZERO..DIGIT NINE
      69             :     0x0041, 0x005A + 1, // LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER Z
      70             :     0x005F, 0x005F + 1, // LOW LINE
      71             :     0x0061, 0x007A + 1, // LATIN SMALL LETTER A..LATIN SMALL LETTER Z
      72             :     0xFFFF + 1
      73             : };
      74             : const int js::irregexp::kWordRangeCount = 9;
      75             : 
      76             : const int js::irregexp::kIgnoreCaseWordRanges[] = {
      77             :     0x0030, 0x0039 + 1, // DIGIT ZERO..DIGIT NINE
      78             :     0x0041, 0x005A + 1, // LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER Z
      79             :     0x005F, 0x005F + 1, // LOW LINE
      80             :     0x0061, 0x007A + 1, // LATIN SMALL LETTER A..LATIN SMALL LETTER Z
      81             :     0x017F, 0x017F + 1, // LATIN SMALL LETTER LONG S
      82             :     0x212A, 0x212A + 1, // KELVIN SIGN
      83             :     0xFFFF + 1
      84             : };
      85             : const int js::irregexp::kIgnoreCaseWordRangeCount = 13;
      86             : 
      87             : const int js::irregexp::kWordAndSurrogateRanges[] = {
      88             :     0x0030, 0x0039 + 1, // DIGIT ZERO..DIGIT NINE
      89             :     0x0041, 0x005A + 1, // LATIN CAPITAL LETTER A..LATIN CAPITAL LETTER Z
      90             :     0x005F, 0x005F + 1, // LOW LINE
      91             :     0x0061, 0x007A + 1, // LATIN SMALL LETTER A..LATIN SMALL LETTER Z
      92             :     0xD800, 0xDFFF + 1, // <Lead Surrogate Min>..<Trail Surrogate Max>
      93             :     0xFFFF + 1
      94             : };
      95             : const int js::irregexp::kWordAndSurrogateRangeCount = 11;
      96             : 
      97             : const int js::irregexp::kNegatedIgnoreCaseWordAndSurrogateRanges[] = {
      98             :     0x0000, 0x002F + 1, // NULL..SOLIDUS
      99             :     0x003A, 0x0040 + 1, // COLON..COMMERCIAL AT
     100             :     0x005B, 0x005E + 1, // LEFT SQUARE BRACKET..CIRCUMFLEX ACCENT
     101             :     0x0060, 0x0060 + 1, // GRAVE ACCENT
     102             :     0x007B, 0x017E + 1, // LEFT CURLY BRACKET..LATIN SMALL LETTER Z WITH CARON
     103             :     0x0180, 0x2129 + 1, // LATIN SMALL LETTER B WITH STROKE..TURNED GREEK SMALL LETTER IOTA
     104             :     0x212B, 0xD7FF + 1, // ANGSTROM SIGN..<Unused>
     105             :     0xE000, 0xFFFF + 1, // Private Use..<Unused>
     106             :     0xFFFF + 1
     107             : };
     108             : const int js::irregexp::kNegatedIgnoreCaseWordAndSurrogateRangeCount = 17;
     109             : 
     110             : const int js::irregexp::kDigitRanges[] = {
     111             :     0x0030, 0x0039 + 1, // DIGIT ZERO..DIGIT NINE
     112             :     0xFFFF + 1
     113             : };
     114             : const int js::irregexp::kDigitRangeCount = 3;
     115             : 
     116             : const int js::irregexp::kDigitAndSurrogateRanges[] = {
     117             :     0x0030, 0x0039 + 1, // DIGIT ZERO..DIGIT NINE
     118             :     0xD800, 0xDFFF + 1, // <Lead Surrogate Min>..<Trail Surrogate Max>
     119             :     0xFFFF + 1
     120             : };
     121             : const int js::irregexp::kDigitAndSurrogateRangeCount = 5;
     122             : 
     123             : const int js::irregexp::kSurrogateRanges[] = {
     124             :     0xD800, 0xDFFF + 1, // <Lead Surrogate Min>..<Trail Surrogate Max>
     125             :     0xFFFF + 1
     126             : };
     127             : const int js::irregexp::kSurrogateRangeCount = 3;
     128             : 
     129             : const int js::irregexp::kLineTerminatorRanges[] = {
     130             :     0x000A, 0x000A + 1, // LINE FEED (LF)
     131             :     0x000D, 0x000D + 1, // CARRIAGE RETURN (CR)
     132             :     0x2028, 0x2029 + 1, // LINE SEPARATOR..PARAGRAPH SEPARATOR
     133             :     0xFFFF + 1
     134             : };
     135             : const int js::irregexp::kLineTerminatorRangeCount = 7;
     136             : 
     137             : const int js::irregexp::kLineTerminatorAndSurrogateRanges[] = {
     138             :     0x000A, 0x000A + 1, // LINE FEED (LF)
     139             :     0x000D, 0x000D + 1, // CARRIAGE RETURN (CR)
     140             :     0x2028, 0x2029 + 1, // LINE SEPARATOR..PARAGRAPH SEPARATOR
     141             :     0xD800, 0xDFFF + 1, // <Lead Surrogate Min>..<Trail Surrogate Max>
     142             :     0xFFFF + 1
     143             : };
     144             : const int js::irregexp::kLineTerminatorAndSurrogateRangeCount = 9;

Generated by: LCOV version 1.13