From 9653729be9644d4120e2e624e7a0dc68dd7c622f Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 23 Nov 2011 10:34:46 +0800 Subject: add comments --- src/storage/pinyin_parser2.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/storage/pinyin_parser2.cpp') diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp index a59bbb5..56c56ab 100644 --- a/src/storage/pinyin_parser2.cpp +++ b/src/storage/pinyin_parser2.cpp @@ -394,11 +394,11 @@ bool FullPinyinParser2::post_process(guint32 options, return true; } +#define IS_KEY(x) (('a' <= x && x <= 'z') || x == ';') bool DoublePinyinParser2::parse_one_key (guint32 options, ChewingKey & key, ChewingKeyRest & key_rest, const char *str, int len) const{ -#define IS_KEY(x) (('a' <= x && x <= 'z') || x == ';') if (1 == len) { if (!(options & PINYIN_INCOMPLETE)) @@ -477,18 +477,19 @@ bool DoublePinyinParser2::parse_one_key (guint32 options, ChewingKey & key, } -#undef IS_KEY - return false; } +/* only 'a'-'z' and ';' are accepted here. */ int DoublePinyinParser2::parse (guint32 options, ChewingKeyVector & keys, ChewingKeyRestVector & key_rests, const char *str, int len) const{ assert(FALSE); } +#undef IS_KEY + bool DoublePinyinParser2::set_scheme(DoublePinyinScheme scheme) { switch (scheme) { -- cgit