diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-11-23 11:12:22 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-11-23 11:12:22 -0800 |
commit | 4837a2d0dfef1f2a7370b2765a9442a5deab4f36 (patch) | |
tree | 816bcb90df7f4c67d37ba8aca5a344c336ea0a5b /tokenizer.cpp | |
parent | be80e1a86389271d87d333001d0625c13647ba00 (diff) |
Replaced some usage of wchar_t * with wcstring in complete(). Some style fixes.
Diffstat (limited to 'tokenizer.cpp')
-rw-r--r-- | tokenizer.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tokenizer.cpp b/tokenizer.cpp index e2e515bf..01c562ad 100644 --- a/tokenizer.cpp +++ b/tokenizer.cpp @@ -227,7 +227,8 @@ static void read_string(tokenizer_t *tok) start = tok->buff; bool is_first = true; - enum tok_mode_t { + enum tok_mode_t + { mode_regular_text = 0, // regular text mode_subshell = 1, // inside of subshell mode_array_brackets = 2, // inside of array brackets @@ -260,7 +261,7 @@ static void read_string(tokenizer_t *tok) tok->buff++; continue; } - + switch (mode) { case mode_regular_text: @@ -358,7 +359,7 @@ static void read_string(tokenizer_t *tok) break; } break; - + case mode_array_brackets: switch (*tok->buff) { @@ -410,7 +411,7 @@ static void read_comment(tokenizer_t *tok) start = tok->buff; while (*(tok->buff)!= L'\n' && *(tok->buff)!= L'\0') tok->buff++; - + size_t len = tok->buff - start; tok->last_token.assign(start, len); |