aboutsummaryrefslogtreecommitdiffhomepage
path: root/tokenizer.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-12-22 12:21:31 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-12-22 12:21:31 -0800
commite31431140a7da60cdebdadbc36ad9bd75e504fea (patch)
tree75a99a1573e58a75ffd85f3a1785fa4fa01ca5e8 /tokenizer.cpp
parent8a66ba6c359d0a64419e7182efee1af040d5e092 (diff)
Formatting
Diffstat (limited to 'tokenizer.cpp')
-rw-r--r--tokenizer.cpp21
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;
}
}