|
@@ -12,7 +12,7 @@
|
|
#include "llvm/Support/UnicodeCharRanges.h"
|
|
#include "llvm/Support/UnicodeCharRanges.h"
|
|
|
|
|
|
// C11 D.1, C++11 [charname.allowed]
|
|
// C11 D.1, C++11 [charname.allowed]
|
|
-static const UnicodeCharRange C11AllowedIDChars[] = {
|
|
|
|
|
|
+static const llvm::sys::UnicodeCharRange C11AllowedIDCharRanges[] = {
|
|
// 1
|
|
// 1
|
|
{ 0x00A8, 0x00A8 }, { 0x00AA, 0x00AA }, { 0x00AD, 0x00AD },
|
|
{ 0x00A8, 0x00A8 }, { 0x00AA, 0x00AA }, { 0x00AD, 0x00AD },
|
|
{ 0x00AF, 0x00AF }, { 0x00B2, 0x00B5 }, { 0x00B7, 0x00BA },
|
|
{ 0x00AF, 0x00AF }, { 0x00B2, 0x00B5 }, { 0x00B7, 0x00BA },
|
|
@@ -44,7 +44,7 @@ static const UnicodeCharRange C11AllowedIDChars[] = {
|
|
// C++03 [extendid]
|
|
// C++03 [extendid]
|
|
// Note that this is not the same as C++98, but we don't distinguish C++98
|
|
// Note that this is not the same as C++98, but we don't distinguish C++98
|
|
// and C++03 in Clang.
|
|
// and C++03 in Clang.
|
|
-static const UnicodeCharRange CXX03AllowedIDChars[] = {
|
|
|
|
|
|
+static const llvm::sys::UnicodeCharRange CXX03AllowedIDCharRanges[] = {
|
|
// Latin
|
|
// Latin
|
|
{ 0x00C0, 0x00D6 }, { 0x00D8, 0x00F6 }, { 0x00F8, 0x01F5 },
|
|
{ 0x00C0, 0x00D6 }, { 0x00D8, 0x00F6 }, { 0x00F8, 0x01F5 },
|
|
{ 0x01FA, 0x0217 }, { 0x0250, 0x02A8 },
|
|
{ 0x01FA, 0x0217 }, { 0x0250, 0x02A8 },
|
|
@@ -163,7 +163,7 @@ static const UnicodeCharRange CXX03AllowedIDChars[] = {
|
|
};
|
|
};
|
|
|
|
|
|
// C99 Annex D
|
|
// C99 Annex D
|
|
-static const UnicodeCharRange C99AllowedIDChars[] = {
|
|
|
|
|
|
+static const llvm::sys::UnicodeCharRange C99AllowedIDCharRanges[] = {
|
|
// Latin (1)
|
|
// Latin (1)
|
|
{ 0x00AA, 0x00AA },
|
|
{ 0x00AA, 0x00AA },
|
|
|
|
|
|
@@ -382,7 +382,7 @@ static const UnicodeCharRange C99AllowedIDChars[] = {
|
|
};
|
|
};
|
|
|
|
|
|
// C11 D.2, C++11 [charname.disallowed]
|
|
// C11 D.2, C++11 [charname.disallowed]
|
|
-static const UnicodeCharRange C11DisallowedInitialIDChars[] = {
|
|
|
|
|
|
+static const llvm::sys::UnicodeCharRange C11DisallowedInitialIDCharRanges[] = {
|
|
{ 0x0300, 0x036F }, { 0x1DC0, 0x1DFF }, { 0x20D0, 0x20FF },
|
|
{ 0x0300, 0x036F }, { 0x1DC0, 0x1DFF }, { 0x20D0, 0x20FF },
|
|
{ 0xFE20, 0xFE2F }
|
|
{ 0xFE20, 0xFE2F }
|
|
};
|
|
};
|
|
@@ -390,7 +390,7 @@ static const UnicodeCharRange C11DisallowedInitialIDChars[] = {
|
|
// C99 6.4.2.1p3: The initial character [of an identifier] shall not be a
|
|
// C99 6.4.2.1p3: The initial character [of an identifier] shall not be a
|
|
// universal character name designating a digit.
|
|
// universal character name designating a digit.
|
|
// C99 Annex D defines these characters as "Digits".
|
|
// C99 Annex D defines these characters as "Digits".
|
|
-static const UnicodeCharRange C99DisallowedInitialIDChars[] = {
|
|
|
|
|
|
+static const llvm::sys::UnicodeCharRange C99DisallowedInitialIDCharRanges[] = {
|
|
{ 0x0660, 0x0669 }, { 0x06F0, 0x06F9 }, { 0x0966, 0x096F },
|
|
{ 0x0660, 0x0669 }, { 0x06F0, 0x06F9 }, { 0x0966, 0x096F },
|
|
{ 0x09E6, 0x09EF }, { 0x0A66, 0x0A6F }, { 0x0AE6, 0x0AEF },
|
|
{ 0x09E6, 0x09EF }, { 0x0A66, 0x0A6F }, { 0x0AE6, 0x0AEF },
|
|
{ 0x0B66, 0x0B6F }, { 0x0BE7, 0x0BEF }, { 0x0C66, 0x0C6F },
|
|
{ 0x0B66, 0x0B6F }, { 0x0BE7, 0x0BEF }, { 0x0C66, 0x0C6F },
|
|
@@ -399,7 +399,7 @@ static const UnicodeCharRange C99DisallowedInitialIDChars[] = {
|
|
};
|
|
};
|
|
|
|
|
|
// Unicode v6.2, chapter 6.2, table 6-2.
|
|
// Unicode v6.2, chapter 6.2, table 6-2.
|
|
-static const UnicodeCharRange UnicodeWhitespaceChars[] = {
|
|
|
|
|
|
+static const llvm::sys::UnicodeCharRange UnicodeWhitespaceCharRanges[] = {
|
|
{ 0x0085, 0x0085 }, { 0x00A0, 0x00A0 }, { 0x1680, 0x1680 },
|
|
{ 0x0085, 0x0085 }, { 0x00A0, 0x00A0 }, { 0x1680, 0x1680 },
|
|
{ 0x180E, 0x180E }, { 0x2000, 0x200A }, { 0x2028, 0x2029 },
|
|
{ 0x180E, 0x180E }, { 0x2000, 0x200A }, { 0x2028, 0x2029 },
|
|
{ 0x202F, 0x202F }, { 0x205F, 0x205F }, { 0x3000, 0x3000 }
|
|
{ 0x202F, 0x202F }, { 0x205F, 0x205F }, { 0x3000, 0x3000 }
|