From c14bac42846506ab01090e1f6384a60126d7c596 Mon Sep 17 00:00:00 2001 From: Kurtis Rader Date: Tue, 3 May 2016 14:35:12 -0700 Subject: restyle tokenizer module to match project style Reduces lint errors from 70 to 46 (-34%). Line count from 1158 to 936 (-19%). Another step in resolving issue #2902. --- src/tokenizer.h | 208 ++++++++++++++++++++++---------------------------------- 1 file changed, 83 insertions(+), 125 deletions(-) (limited to 'src/tokenizer.h') diff --git a/src/tokenizer.h b/src/tokenizer.h index 3c3b6236..c223e438 100644 --- a/src/tokenizer.h +++ b/src/tokenizer.h @@ -1,191 +1,151 @@ -/** \file tokenizer.h - - A specialized tokenizer for tokenizing the fish language. In the - future, the tokenizer should be extended to support marks, - tokenizing multiple strings and disposing of unused string - segments. -*/ +// A specialized tokenizer for tokenizing the fish language. In the future, the tokenizer should be +// extended to support marks, tokenizing multiple strings and disposing of unused string segments. #ifndef FISH_TOKENIZER_H #define FISH_TOKENIZER_H -#include #include +#include #include "common.h" -/** - Token types -*/ -enum token_type -{ - TOK_NONE, /**< Tokenizer not yet constructed */ - TOK_ERROR, /**< Error reading token */ - TOK_STRING,/**< String token */ - TOK_PIPE,/**< Pipe token */ - TOK_END,/**< End token (semicolon or newline, not literal end) */ - TOK_REDIRECT_OUT, /**< redirection token */ - TOK_REDIRECT_APPEND,/**< redirection append token */ - TOK_REDIRECT_IN,/**< input redirection token */ - TOK_REDIRECT_FD,/**< redirection to new fd token */ - TOK_REDIRECT_NOCLOB, /**