diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-03-12 14:15:56 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-03-12 14:15:56 +0100 |
commit | b392e6d2ea60191615771900690b37b52b47bcd3 (patch) | |
tree | 64904a45624d866ff0232dc2f5b50478b17d69ba /js/src/irregexp/RegExpCharacters-inl.h | |
parent | ba74a4174d2cd6ccbabbc5aa6f4ffdf74b48f45c (diff) | |
download | UXP-b392e6d2ea60191615771900690b37b52b47bcd3.tar UXP-b392e6d2ea60191615771900690b37b52b47bcd3.tar.gz UXP-b392e6d2ea60191615771900690b37b52b47bcd3.tar.lz UXP-b392e6d2ea60191615771900690b37b52b47bcd3.tar.xz UXP-b392e6d2ea60191615771900690b37b52b47bcd3.zip |
Generate irregexp character tables with make_unicode.py.
Diffstat (limited to 'js/src/irregexp/RegExpCharacters-inl.h')
-rw-r--r-- | js/src/irregexp/RegExpCharacters-inl.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/js/src/irregexp/RegExpCharacters-inl.h b/js/src/irregexp/RegExpCharacters-inl.h new file mode 100644 index 000000000..d001819fc --- /dev/null +++ b/js/src/irregexp/RegExpCharacters-inl.h @@ -0,0 +1,40 @@ +/* Generated by make_unicode.py DO NOT MODIFY */ +/* Unicode version: 9.0.0 */ +#ifndef V8_JSREGEXPCHARACTERS_INL_H_ +#define V8_JSREGEXPCHARACTERS_INL_H_ + +namespace js { + +namespace irregexp { + +static inline bool +RangeContainsLatin1Equivalents(CharacterRange range, bool unicode) +{ + if (unicode) { + // "LATIN SMALL LETTER LONG S" case folds to "LATIN SMALL LETTER S". + if (range.Contains(0x017F)) + return true; + // "LATIN CAPITAL LETTER SHARP S" case folds to "LATIN SMALL LETTER SHARP S". + if (range.Contains(0x1E9E)) + return true; + // "KELVIN SIGN" case folds to "LATIN SMALL LETTER K". + if (range.Contains(0x212A)) + return true; + // "ANGSTROM SIGN" case folds to "LATIN SMALL LETTER A WITH RING ABOVE". + if (range.Contains(0x212B)) + return true; + } + + // "GREEK CAPITAL LETTER MU" case maps to "MICRO SIGN". + // "GREEK SMALL LETTER MU" case maps to "MICRO SIGN". + if (range.Contains(0x039C) || range.Contains(0x03BC)) + return true; + // "LATIN CAPITAL LETTER Y WITH DIAERESIS" case maps to "LATIN SMALL LETTER Y WITH DIAERESIS". + if (range.Contains(0x0178)) + return true; + return false; +} + +} } // namespace js::irregexp + +#endif // V8_JSREGEXPCHARACTERS_INL_H_ |