summaryrefslogtreecommitdiff
path: root/src/PropsData.zig
diff options
context:
space:
mode:
authorGravatar Jose Colon Rodriguez2024-06-26 13:56:44 -0400
committerGravatar Jose Colon Rodriguez2024-06-26 13:56:44 -0400
commit339eaebfe4242db4f30e41c13c5cd35cc80750b0 (patch)
treea9e55d10b6f504830de6a4882c131945f2d9ad07 /src/PropsData.zig
parentAdded changes when casefolded back (diff)
downloadzg-339eaebfe4242db4f30e41c13c5cd35cc80750b0.tar.gz
zg-339eaebfe4242db4f30e41c13c5cd35cc80750b0.tar.xz
zg-339eaebfe4242db4f30e41c13c5cd35cc80750b0.zip
Removed all inlines
Diffstat (limited to 'src/PropsData.zig')
-rw-r--r--src/PropsData.zig24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/PropsData.zig b/src/PropsData.zig
index f6c8370..b77bf30 100644
--- a/src/PropsData.zig
+++ b/src/PropsData.zig
@@ -81,62 +81,62 @@ pub fn deinit(self: *const Self) void {
81} 81}
82 82
83/// True if `cp` is a mathematical symbol. 83/// True if `cp` is a mathematical symbol.
84pub inline fn isMath(self: Self, cp: u21) bool { 84pub fn isMath(self: Self, cp: u21) bool {
85 return self.core_s2[self.core_s1[cp >> 8] + (cp & 0xff)] & 1 == 1; 85 return self.core_s2[self.core_s1[cp >> 8] + (cp & 0xff)] & 1 == 1;
86} 86}
87 87
88/// True if `cp` is an alphabetic character. 88/// True if `cp` is an alphabetic character.
89pub inline fn isAlphabetic(self: Self, cp: u21) bool { 89pub fn isAlphabetic(self: Self, cp: u21) bool {
90 return self.core_s2[self.core_s1[cp >> 8] + (cp & 0xff)] & 2 == 2; 90 return self.core_s2[self.core_s1[cp >> 8] + (cp & 0xff)] & 2 == 2;
91} 91}
92 92
93/// True if `cp` is a valid identifier start character. 93/// True if `cp` is a valid identifier start character.
94pub inline fn isIdStart(self: Self, cp: u21) bool { 94pub fn isIdStart(self: Self, cp: u21) bool {
95 return self.core_s2[self.core_s1[cp >> 8] + (cp & 0xff)] & 4 == 4; 95 return self.core_s2[self.core_s1[cp >> 8] + (cp & 0xff)] & 4 == 4;
96} 96}
97 97
98/// True if `cp` is a valid identifier continuation character. 98/// True if `cp` is a valid identifier continuation character.
99pub inline fn isIdContinue(self: Self, cp: u21) bool { 99pub fn isIdContinue(self: Self, cp: u21) bool {
100 return self.core_s2[self.core_s1[cp >> 8] + (cp & 0xff)] & 8 == 8; 100 return self.core_s2[self.core_s1[cp >> 8] + (cp & 0xff)] & 8 == 8;
101} 101}
102 102
103/// True if `cp` is a valid extended identifier start character. 103/// True if `cp` is a valid extended identifier start character.
104pub inline fn isXidStart(self: Self, cp: u21) bool { 104pub fn isXidStart(self: Self, cp: u21) bool {
105 return self.core_s2[self.core_s1[cp >> 8] + (cp & 0xff)] & 16 == 16; 105 return self.core_s2[self.core_s1[cp >> 8] + (cp & 0xff)] & 16 == 16;
106} 106}
107 107
108/// True if `cp` is a valid extended identifier continuation character. 108/// True if `cp` is a valid extended identifier continuation character.
109pub inline fn isXidContinue(self: Self, cp: u21) bool { 109pub fn isXidContinue(self: Self, cp: u21) bool {
110 return self.core_s2[self.core_s1[cp >> 8] + (cp & 0xff)] & 32 == 32; 110 return self.core_s2[self.core_s1[cp >> 8] + (cp & 0xff)] & 32 == 32;
111} 111}
112 112
113/// True if `cp` is a whitespace character. 113/// True if `cp` is a whitespace character.
114pub inline fn isWhitespace(self: Self, cp: u21) bool { 114pub fn isWhitespace(self: Self, cp: u21) bool {
115 return self.props_s2[self.props_s1[cp >> 8] + (cp & 0xff)] & 1 == 1; 115 return self.props_s2[self.props_s1[cp >> 8] + (cp & 0xff)] & 1 == 1;
116} 116}
117 117
118/// True if `cp` is a hexadecimal digit. 118/// True if `cp` is a hexadecimal digit.
119pub inline fn isHexDigit(self: Self, cp: u21) bool { 119pub fn isHexDigit(self: Self, cp: u21) bool {
120 return self.props_s2[self.props_s1[cp >> 8] + (cp & 0xff)] & 2 == 2; 120 return self.props_s2[self.props_s1[cp >> 8] + (cp & 0xff)] & 2 == 2;
121} 121}
122 122
123/// True if `cp` is a diacritic mark. 123/// True if `cp` is a diacritic mark.
124pub inline fn isDiacritic(self: Self, cp: u21) bool { 124pub fn isDiacritic(self: Self, cp: u21) bool {
125 return self.props_s2[self.props_s1[cp >> 8] + (cp & 0xff)] & 4 == 4; 125 return self.props_s2[self.props_s1[cp >> 8] + (cp & 0xff)] & 4 == 4;
126} 126}
127 127
128/// True if `cp` is numeric. 128/// True if `cp` is numeric.
129pub inline fn isNumeric(self: Self, cp: u21) bool { 129pub fn isNumeric(self: Self, cp: u21) bool {
130 return self.num_s2[self.num_s1[cp >> 8] + (cp & 0xff)] & 1 == 1; 130 return self.num_s2[self.num_s1[cp >> 8] + (cp & 0xff)] & 1 == 1;
131} 131}
132 132
133/// True if `cp` is a digit. 133/// True if `cp` is a digit.
134pub inline fn isDigit(self: Self, cp: u21) bool { 134pub fn isDigit(self: Self, cp: u21) bool {
135 return self.num_s2[self.num_s1[cp >> 8] + (cp & 0xff)] & 2 == 2; 135 return self.num_s2[self.num_s1[cp >> 8] + (cp & 0xff)] & 2 == 2;
136} 136}
137 137
138/// True if `cp` is decimal. 138/// True if `cp` is decimal.
139pub inline fn isDecimal(self: Self, cp: u21) bool { 139pub fn isDecimal(self: Self, cp: u21) bool {
140 return self.num_s2[self.num_s1[cp >> 8] + (cp & 0xff)] & 4 == 4; 140 return self.num_s2[self.num_s1[cp >> 8] + (cp & 0xff)] & 4 == 4;
141} 141}
142 142