diff options
author | 2012-11-21 17:48:35 -0800 | |
---|---|---|
committer | 2012-11-21 17:48:35 -0800 | |
commit | f545fb2491d36e02dc6c4005ada86be8678bba78 (patch) | |
tree | 3237ef337b1723b24dc32618cc5e03360e30e13e /fish_indent.cpp | |
parent | e73be48d9622d06039926fd2ba4a4b68b675f34a (diff) |
Work towards refactoring tokenizer to be a real object
Diffstat (limited to 'fish_indent.cpp')
-rw-r--r-- | fish_indent.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fish_indent.cpp b/fish_indent.cpp index dedf11f2..c50eeba6 100644 --- a/fish_indent.cpp +++ b/fish_indent.cpp @@ -84,7 +84,6 @@ static void insert_tabs(wcstring &out, int indent) */ static int indent(wcstring &out, const wcstring &in, int flags) { - tokenizer tok; int res=0; int is_command = 1; int indent = 0; @@ -92,8 +91,7 @@ static int indent(wcstring &out, const wcstring &in, int flags) int prev_type = 0; int prev_prev_type = 0; - tok_init(&tok, in.c_str(), TOK_SHOW_COMMENTS); - + tokenizer_t tok(in.c_str(), TOK_SHOW_COMMENTS); for (; tok_has_next(&tok); tok_next(&tok)) { int type = tok_last_type(&tok); |