diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-12-22 12:21:31 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-12-22 12:21:31 -0800 |
commit | e31431140a7da60cdebdadbc36ad9bd75e504fea (patch) | |
tree | 75a99a1573e58a75ffd85f3a1785fa4fa01ca5e8 /tokenizer.cpp | |
parent | 8a66ba6c359d0a64419e7182efee1af040d5e092 (diff) |
Formatting
Diffstat (limited to 'tokenizer.cpp')
-rw-r--r-- | tokenizer.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/tokenizer.cpp b/tokenizer.cpp index 1be82a04..831197ee 100644 --- a/tokenizer.cpp +++ b/tokenizer.cpp @@ -677,7 +677,7 @@ bool move_word_state_machine_t::consume_char_punctuation(wchar_t c) s_alphanumeric, s_end }; - + bool consumed = false; while (state != s_end && ! consumed) { @@ -688,7 +688,7 @@ bool move_word_state_machine_t::consume_char_punctuation(wchar_t c) consumed = true; state = s_whitespace; break; - + case s_whitespace: if (iswspace(c)) { @@ -700,7 +700,7 @@ bool move_word_state_machine_t::consume_char_punctuation(wchar_t c) state = s_alphanumeric; } break; - + case s_alphanumeric: if (iswalnum(c)) { @@ -712,7 +712,7 @@ bool move_word_state_machine_t::consume_char_punctuation(wchar_t c) state = s_end; } break; - + case s_end: default: break; @@ -738,7 +738,7 @@ bool move_word_state_machine_t::consume_char_path_components(wchar_t c) s_path_component_characters, s_end }; - + //printf("state %d, consume '%lc'\n", state, c); bool consumed = false; while (state != s_end && ! consumed) @@ -752,7 +752,7 @@ bool move_word_state_machine_t::consume_char_path_components(wchar_t c) } state = s_whitespace; break; - + case s_whitespace: if (iswspace(c)) { @@ -820,9 +820,12 @@ bool move_word_state_machine_t::consume_char(wchar_t c) { switch (style) { - case move_word_style_punctuation: return consume_char_punctuation(c); - case move_word_style_path_components: return consume_char_path_components(c); - default: return false; + case move_word_style_punctuation: + return consume_char_punctuation(c); + case move_word_style_path_components: + return consume_char_path_components(c); + default: + return false; } } |