@@ -19,97 +19,58 @@ extension Unicode.Scalar {
19
19
// N1518: Recommendations for extended identifier characters for C and C++
20
20
// Proposed Annex X.1: Ranges of characters allowed
21
21
let c = self . value
22
-
23
- let first : Bool = Bool ( c == 0x00A8 )
24
- let second : Bool = Bool ( c == 0x00AA )
25
- let third : Bool = Bool ( c == 0x00AD )
26
- let fourth : Bool = Bool ( c == 0x00AF )
27
- let fifth : Bool = Bool ( Bool ( c >= 0x00B2 ) && Bool ( c <= 0x00B5 ) )
28
- let sixth : Bool = Bool ( Bool ( c >= 0x00B7 ) && Bool ( c <= 0x00BA ) )
29
- let seventh : Bool = Bool ( Bool ( c >= 0x00BC ) && Bool ( c <= 0x00BE ) )
30
- let eighth : Bool = Bool ( Bool ( c >= 0x00C0 ) && Bool ( c <= 0x00D6 ) )
31
- let nineth : Bool = Bool ( Bool ( c >= 0x00D8 ) && Bool ( c <= 0x00F6 ) )
32
- let tenth : Bool = Bool ( Bool ( c >= 0x00F8 ) && Bool ( c <= 0x00FF ) )
33
- let eleventh : Bool = Bool ( Bool ( c >= 0x0100 ) && Bool ( c <= 0x167F ) )
34
- let twelfth : Bool = Bool ( Bool ( c >= 0x1681 ) && Bool ( c <= 0x180D ) )
35
- let thirteenth : Bool = Bool ( Bool ( c >= 0x180F ) && Bool ( c <= 0x1FFF ) )
36
- let fourteenth : Bool = Bool ( Bool ( c >= 0x200B ) && Bool ( c <= 0x200D ) )
37
- let fifteenth : Bool = Bool ( Bool ( c >= 0x202A ) && Bool ( c <= 0x202E ) )
38
- let sixteenth : Bool = Bool ( Bool ( c >= 0x203F ) && Bool ( c <= 0x2040 ) )
39
- let seventeenth : Bool = Bool ( c == 0x2054 )
40
- let eighteenth : Bool = Bool ( Bool ( c >= 0x2060 ) && Bool ( c <= 0x206F ) )
41
- let nineteenth : Bool = Bool ( Bool ( c >= 0x2070 ) && Bool ( c <= 0x218F ) )
42
- let twentieth : Bool = Bool ( Bool ( c >= 0x2460 ) && Bool ( c <= 0x24FF ) )
43
- let twentyfirst : Bool = Bool ( Bool ( c >= 0x2776 ) && Bool ( c <= 0x2793 ) )
44
- let twentysecond : Bool = Bool ( Bool ( c >= 0x2C00 ) && Bool ( c <= 0x2DFF ) )
45
- let twentythird : Bool = Bool ( Bool ( c >= 0x2E80 ) && Bool ( c <= 0x2FFF ) )
46
- let twentyfourth : Bool = Bool ( Bool ( c >= 0x3004 ) && Bool ( c <= 0x3007 ) )
47
- let twentyfifth : Bool = Bool ( Bool ( c >= 0x3021 ) && Bool ( c <= 0x302F ) )
48
- let twentysixth : Bool = Bool ( Bool ( c >= 0x3031 ) && Bool ( c <= 0x303F ) )
49
- let twentyseventh : Bool = Bool ( Bool ( c >= 0x3040 ) && Bool ( c <= 0xD7FF ) )
50
- let twentyeighth : Bool = Bool ( Bool ( c >= 0xF900 ) && Bool ( c <= 0xFD3D ) )
51
- let twentyninth : Bool = Bool ( Bool ( c >= 0xFD40 ) && Bool ( c <= 0xFDCF ) )
52
- let thirtieth : Bool = Bool ( Bool ( c >= 0xFDF0 ) && Bool ( c <= 0xFE44 ) )
53
- let thirtyfirst : Bool = Bool ( Bool ( c >= 0xFE47 ) && Bool ( c <= 0xFFF8 ) )
54
- let thirtysecond : Bool = Bool ( Bool ( c >= 0x10000 ) && Bool ( c <= 0x1FFFD ) )
55
- let thirtythird : Bool = Bool ( Bool ( c >= 0x20000 ) && Bool ( c <= 0x2FFFD ) )
56
- let thirtyfourth : Bool = Bool ( Bool ( c >= 0x30000 ) && Bool ( c <= 0x3FFFD ) )
57
- let thirtyfifth : Bool = Bool ( Bool ( c >= 0x40000 ) && Bool ( c <= 0x4FFFD ) )
58
- let thirtysixth : Bool = Bool ( Bool ( c >= 0x50000 ) && Bool ( c <= 0x5FFFD ) )
59
- let thirtyseventh : Bool = Bool ( Bool ( c >= 0x60000 ) && Bool ( c <= 0x6FFFD ) )
60
- let thirtyeighth : Bool = Bool ( Bool ( c >= 0x70000 ) && Bool ( c <= 0x7FFFD ) )
61
- let thirtyninth : Bool = Bool ( Bool ( c >= 0x80000 ) && Bool ( c <= 0x8FFFD ) )
62
- let fortieth : Bool = Bool ( Bool ( c >= 0x90000 ) && Bool ( c <= 0x9FFFD ) )
63
- let fortyfirst : Bool = Bool ( Bool ( c >= 0xA0000 ) && Bool ( c <= 0xAFFFD ) )
64
- let fortysecond : Bool = Bool ( Bool ( c >= 0xB0000 ) && Bool ( c <= 0xBFFFD ) )
65
- let fortythird : Bool = Bool ( Bool ( c >= 0xC0000 ) && Bool ( c <= 0xCFFFD ) )
66
- let fortyfourth : Bool = Bool ( Bool ( c >= 0xD0000 ) && Bool ( c <= 0xDFFFD ) )
67
- let fortyfifth : Bool = Bool ( Bool ( c >= 0xE0000 ) && Bool ( c <= 0xEFFFD ) )
68
- return first
69
- || second
70
- || third
71
- || fourth
72
- || fifth
73
- || sixth
74
- || seventh
75
- || eighth
76
- || nineth
77
- || tenth
78
- || eleventh
79
- || twelfth
80
- || thirteenth
81
- || fourteenth
82
- || fifteenth
83
- || sixteenth
84
- || seventeenth
85
- || eighteenth
86
- || nineteenth
87
- || twentieth
88
- || twentyfirst
89
- || twentysecond
90
- || twentythird
91
- || twentyfourth
92
- || twentyfifth
93
- || twentysixth
94
- || twentyseventh
95
- || twentyeighth
96
- || twentyninth
97
- || thirtieth
98
- || thirtyfirst
99
- || thirtysecond
100
- || thirtythird
101
- || thirtyfourth
102
- || thirtyfifth
103
- || thirtysixth
104
- || thirtyseventh
105
- || thirtyeighth
106
- || thirtyninth
107
- || fortieth
108
- || fortyfirst
109
- || fortysecond
110
- || fortythird
111
- || fortyfourth
112
- || fortyfifth
22
+ return ( c == 0x00A8 ) as Bool
23
+ || ( c == 0x00AA ) as Bool
24
+ || ( c == 0x00AD ) as Bool
25
+ || ( c == 0x00AF ) as Bool
26
+ || ( c >= 0x00B2 && c <= 0x00B5 ) as Bool
27
+ || ( c >= 0x00B7 && c <= 0x00BA ) as Bool
28
+ || ( c >= 0x00BC && c <= 0x00BE ) as Bool
29
+ || ( c >= 0x00C0 && c <= 0x00D6 ) as Bool
30
+ || ( c >= 0x00D8 && c <= 0x00F6 ) as Bool
31
+ || ( c >= 0x00F8 && c <= 0x00FF ) as Bool
32
+
33
+ || ( c >= 0x0100 && c <= 0x167F ) as Bool
34
+ || ( c >= 0x1681 && c <= 0x180D ) as Bool
35
+ || ( c >= 0x180F && c <= 0x1FFF ) as Bool
36
+
37
+ || ( c >= 0x200B && c <= 0x200D ) as Bool
38
+ || ( c >= 0x202A && c <= 0x202E ) as Bool
39
+ || ( c >= 0x203F && c <= 0x2040 ) as Bool
40
+ || ( c == 0x2054 ) as Bool
41
+ || ( c >= 0x2060 && c <= 0x206F ) as Bool
42
+
43
+ || ( c >= 0x2070 && c <= 0x218F ) as Bool
44
+ || ( c >= 0x2460 && c <= 0x24FF ) as Bool
45
+ || ( c >= 0x2776 && c <= 0x2793 ) as Bool
46
+ || ( c >= 0x2C00 && c <= 0x2DFF ) as Bool
47
+ || ( c >= 0x2E80 && c <= 0x2FFF ) as Bool
48
+
49
+ || ( c >= 0x3004 && c <= 0x3007 ) as Bool
50
+ || ( c >= 0x3021 && c <= 0x302F ) as Bool
51
+ || ( c >= 0x3031 && c <= 0x303F ) as Bool
52
+
53
+ || ( c >= 0x3040 && c <= 0xD7FF ) as Bool
54
+
55
+ || ( c >= 0xF900 && c <= 0xFD3D ) as Bool
56
+ || ( c >= 0xFD40 && c <= 0xFDCF ) as Bool
57
+ || ( c >= 0xFDF0 && c <= 0xFE44 ) as Bool
58
+ || ( c >= 0xFE47 && c <= 0xFFF8 ) as Bool
59
+
60
+ || ( c >= 0x10000 && c <= 0x1FFFD ) as Bool
61
+ || ( c >= 0x20000 && c <= 0x2FFFD ) as Bool
62
+ || ( c >= 0x30000 && c <= 0x3FFFD ) as Bool
63
+ || ( c >= 0x40000 && c <= 0x4FFFD ) as Bool
64
+ || ( c >= 0x50000 && c <= 0x5FFFD ) as Bool
65
+ || ( c >= 0x60000 && c <= 0x6FFFD ) as Bool
66
+ || ( c >= 0x70000 && c <= 0x7FFFD ) as Bool
67
+ || ( c >= 0x80000 && c <= 0x8FFFD ) as Bool
68
+ || ( c >= 0x90000 && c <= 0x9FFFD ) as Bool
69
+ || ( c >= 0xA0000 && c <= 0xAFFFD ) as Bool
70
+ || ( c >= 0xB0000 && c <= 0xBFFFD ) as Bool
71
+ || ( c >= 0xC0000 && c <= 0xCFFFD ) as Bool
72
+ || ( c >= 0xD0000 && c <= 0xDFFFD ) as Bool
73
+ || ( c >= 0xE0000 && c <= 0xEFFFD ) as Bool
113
74
}
114
75
115
76
var isValidIdentifierStartCodePoint : Bool {
0 commit comments