mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[poincare/parser] Fix theta parsing
This commit is contained in:
@@ -176,17 +176,11 @@ Token Tokenizer::popToken() {
|
||||
result.setCodePoint(c);
|
||||
return result;
|
||||
}
|
||||
if (c == UCodePointGreekSmallLetterTheta) {
|
||||
if (c == UCodePointSquareRoot
|
||||
|| c == UCodePointGreekSmallLetterTheta)
|
||||
{
|
||||
Token result(Token::Identifier);
|
||||
result.setString(start, UTF8Decoder::CharSizeOfCodePoint(UCodePointGreekSmallLetterTheta));
|
||||
return result;
|
||||
}
|
||||
if (c == UCodePointSquareRoot) {
|
||||
Token result(Token::Identifier);
|
||||
// TODO compute size manually?
|
||||
constexpr int squareRootCharLength = 3;
|
||||
assert(UTF8Decoder::CharSizeOfCodePoint(UCodePointSquareRoot) == squareRootCharLength);
|
||||
result.setString(start, squareRootCharLength);
|
||||
result.setString(start, UTF8Decoder::CharSizeOfCodePoint(c));
|
||||
return result;
|
||||
}
|
||||
if (c == UCodePointEmpty) {
|
||||
|
||||
Reference in New Issue
Block a user