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

Function fxGetNextCharacter

xs/sources/xsLexical.c:137–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137void fxGetNextCharacter(txParser* parser)
138{
139 parser->character = parser->lookahead;
140 if (parser->character != (txU4)C_EOF) {
141 #if mxCESU8
142 txU4 character = parser->surrogate;
143 if (character)
144 parser->surrogate = 0;
145 else
146 character = fxGetNextCode(parser);
147 if ((0x0000D800 <= character) && (character <= 0x0000DBFF)) {
148 txU4 surrogate = fxGetNextCode(parser);
149 if ((0x0000DC00 <= surrogate) && (surrogate <= 0x0000DFFF))
150 character = 0x00010000 + ((character & 0x000003FF) << 10) + (surrogate & 0x000003FF);
151 else
152 parser->surrogate = surrogate;
153 }
154 parser->lookahead = character;
155 #else
156 parser->lookahead = fxGetNextCode(parser);
157 #endif
158 }
159}
160
161txU4 fxGetNextCode(txParser* parser)
162{

Callers 15

fxGetNextDigitsFunction · 0.85
fxGetNextDigitsBFunction · 0.85
fxGetNextDigitsDFunction · 0.85
fxGetNextDigitsEFunction · 0.85
fxGetNextDigitsOFunction · 0.85
fxGetNextDigitsXFunction · 0.85
fxGetNextIdentiferXFunction · 0.85
fxGetNextNumberBFunction · 0.85
fxGetNextNumberEFunction · 0.85
fxGetNextNumberOFunction · 0.85
fxGetNextNumberXFunction · 0.85
fxGetNextRegExpFunction · 0.85

Calls 1

fxGetNextCodeFunction · 0.85

Tested by

no test coverage detected