summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-11-23 10:34:46 +0800
committerPeng Wu <alexepico@gmail.com>2011-11-23 10:34:46 +0800
commit9653729be9644d4120e2e624e7a0dc68dd7c622f (patch)
tree370babdc70b2f961b6254e0485bdd155782feeb9
parentbc1f11e11c308635197a05b9af4235d9e4640f82 (diff)
downloadlibpinyin-9653729be9644d4120e2e624e7a0dc68dd7c622f.tar.gz
libpinyin-9653729be9644d4120e2e624e7a0dc68dd7c622f.tar.xz
libpinyin-9653729be9644d4120e2e624e7a0dc68dd7c622f.zip
add comments
-rw-r--r--src/storage/pinyin_parser2.cpp7
1 files changed, 4 insertions, 3 deletions
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) {