MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxIsCIdentifier

Function fxIsCIdentifier

xs/tools/xsc.c:120–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118#endif
119
120txBoolean fxIsCIdentifier(txString string)
121{
122 static char gxIdentifierSet[128] = {
123 /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
124 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x */
125 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1x */
126 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0, /* 2x !"#$%&'()*+,-./ */
127 1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, /* 3x 0123456789:;<=>? */
128 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4x @ABCDEFGHIJKLMNO */
129 1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1, /* 5X PQRSTUVWXYZ[\]^_ */
130 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 6x `abcdefghijklmno */
131 1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0 /* 7X pqrstuvwxyz{|}~ */
132 };
133 txU1 c;
134 while ((c = *((txU1*)string))) {
135 if ((c > 127) || (gxIdentifierSet[c] == 0))
136 return 0;
137 string++;
138 }
139 return 1;
140}
141
142txString fxRealDirectoryPath(txParser* parser, txString path)
143{

Callers 2

fxWriteIDsFunction · 0.70
fxPrintIDFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected