summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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) {