tokenizer.c: Tokenize line separator codepoints as newline tokens.

This commit is contained in:
Reece H. Dunn
2017-04-28 07:16:38 +01:00
parent bf45e7ce36
commit d2d718d700
2 changed files with 13 additions and 12 deletions
+2 -1
View File
@@ -93,6 +93,7 @@ typedef enum {
#define ESPEAKNG_CTYPE_PROPERTY_MASK 0x0000000000000001ull
// Reference: http://www.unicode.org/reports/tr14/tr14-32.html -- Unicode Line Breaking Algorithm
static espeakng_CTYPE codepoint_type(uint32_t c)
{
// 1. Detect and classify specific codepoints.
@@ -110,7 +111,7 @@ static espeakng_CTYPE codepoint_type(uint32_t c)
ucd_category cat = ucd_lookup_category(c);
switch (cat)
{
case UCD_CATEGORY_Zl: return ESPEAKNG_CTYPE_WHITESPACE;
case UCD_CATEGORY_Zl: return ESPEAKNG_CTYPE_NEWLINE;
case UCD_CATEGORY_Zp: return ESPEAKNG_CTYPE_WHITESPACE;
case UCD_CATEGORY_Zs: return ESPEAKNG_CTYPE_WHITESPACE;
}