From 5f70e8f6cdf7392f70db1ee1a1e0668d056ab527 Mon Sep 17 00:00:00 2001 From: Wang Xuerui Date: Thu, 21 Apr 2016 20:05:47 +0800 Subject: [PATCH] add confusable space characters --- src/libsyntax/parse/lexer/unicode_chars.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/libsyntax/parse/lexer/unicode_chars.rs b/src/libsyntax/parse/lexer/unicode_chars.rs index f74746fe885..96cfb4dfb2d 100644 --- a/src/libsyntax/parse/lexer/unicode_chars.rs +++ b/src/libsyntax/parse/lexer/unicode_chars.rs @@ -16,6 +16,22 @@ use super::StringReader; const UNICODE_ARRAY: &'static [(char, &'static str, char)] = &[ + (' ', "No-Break Space", ' '), + (' ', "Ogham Space Mark", ' '), + (' ', "En Quad", ' '), + (' ', "Em Quad", ' '), + (' ', "En Space", ' '), + (' ', "Em Space", ' '), + (' ', "Three-Per-Em Space", ' '), + (' ', "Four-Per-Em Space", ' '), + (' ', "Six-Per-Em Space", ' '), + (' ', "Figure Space", ' '), + (' ', "Punctuation Space", ' '), + (' ', "Thin Space", ' '), + (' ', "Hair Space", ' '), + (' ', "Narrow No-Break Space", ' '), + (' ', "Medium Mathematical Space", ' '), + (' ', "Ideographic Space", ' '), ('ߺ', "Nko Lajanyalan", '_'), ('﹍', "Dashed Low Line", '_'), ('﹎', "Centreline Low Line", '_'), @@ -173,6 +189,7 @@ ('Ⳇ', "Coptic Capital Letter Old Coptic Esh", '/'), ]; const ASCII_ARRAY: &'static [(char, &'static str)] = &[ + (' ', "Space"), ('_', "Underscore"), ('-', "Minus/Hyphen"), (',', "Comma"),