From 67e6e388252c96f9568c983fe19c228e6c8913a7 Mon Sep 17 00:00:00 2001 From: Gabriel Ozouf Date: Fri, 18 Sep 2020 16:15:25 +0200 Subject: [PATCH] =?UTF-8?q?[poincare/parsing]=20Parse=20degree=20sign=20?= =?UTF-8?q?=C2=B0=20in=20units?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I518aba17214b049dfa8fd3b89f4ce124dbd6b41a --- ion/include/ion/unicode/code_point.h | 1 + poincare/src/parsing/tokenizer.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ion/include/ion/unicode/code_point.h b/ion/include/ion/unicode/code_point.h index d05688d55..200073737 100644 --- a/ion/include/ion/unicode/code_point.h +++ b/ion/include/ion/unicode/code_point.h @@ -53,6 +53,7 @@ static constexpr CodePoint UCodePointEmpty = 0x11; // Used to static constexpr CodePoint UCodePointLeftSystemParenthesis = 0x12; // Used for serialization static constexpr CodePoint UCodePointRightSystemParenthesis = 0x13; // Used for serialization +static constexpr CodePoint UCodePointDegreeSign = 0xb0; // ° static constexpr CodePoint UCodePointMiddleDot = 0xb7; // · static constexpr CodePoint UCodePointMultiplicationSign = 0xd7; // × static constexpr CodePoint UCodePointGreekSmallLetterTheta = 0x3b8; // θ diff --git a/poincare/src/parsing/tokenizer.cpp b/poincare/src/parsing/tokenizer.cpp index 4cf8dc99c..13ae60956 100644 --- a/poincare/src/parsing/tokenizer.cpp +++ b/poincare/src/parsing/tokenizer.cpp @@ -162,7 +162,7 @@ Token Tokenizer::popToken() { * reserved or custom identifier, popIdentifier is called in both cases. */ Token result(Token::Unit); - result.setString(start + 1, popIdentifier(UCodePointNull)); // + 1 for the underscore + result.setString(start + 1, popIdentifier(UCodePointDegreeSign)); // + 1 for the underscore return result; } if (c.isLatinLetter() ||