| 135 | } |
| 136 | |
| 137 | void 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 | |
| 161 | txU4 fxGetNextCode(txParser* parser) |
| 162 | { |
no test coverage detected