114 #ifdef DEBUG_TOKENIZER
115 const token &previous_token()
const
117 return previous_token_;
220 #ifdef DEBUG_TOKENIZER
221 token previous_token_;
Helper class for buffering a std::istream.
Helper class for buffering a std::istream.
int get()
Gets and consumes a character from the buffer.
int peek()
Gets a character from the buffer.
class responsible for parsing the provided text into tokens and tracking information about the curren...
bool is_space(int c) const
int peek_char()
return the next character without incrementing the current position in the istream
std::array< character_type, END_STANDARD_ASCII > char_types_
void skip_comment()
handles skipping over comments (inline and on a separate line) as well as the special processing need...
const std::string & textdomain() const
const token & next_token()
Reads characters off of in_ to return the next token type and its value.
bool skip_command(char const *cmd)
Returns true if the next characters are the one from cmd followed by a space.
bool is_alnum(int c) const
const token & current_token() const
void next_char()
increments the line number if the current character is a newline set current_ to the next character t...
void next_char_skip_cr()
set current_ to the next character skip the \r in the \r\n Windows-style line endings the test_cvs_20...
const std::string & get_file() const
character_type
the different types of characters while parsing TOK_NONE is also the default for anything beyond stan...
character_type char_type(unsigned c) const
int get_start_line() const
unsigned in
If equal to search_counter, the node is off the list.
constexpr unsigned char INLINED_PREPROCESS_DIRECTIVE_CHAR
constexpr int END_STANDARD_ASCII
contains the current text being parsed as well as the token_type of what's being parsed.
token_type
used for a token's type field
@ QSTRING
quoted string, contained within double quotes or by less than/greater than symbols
@ MISC
any characters that don't have special meaning
@ UNTERMINATED_QSTRING
reached end of file without finding the closing character for a QSTRING
@ END
set when EOF is returned by the input stream
source_chars
not used for a token's type field
std::string value
the token's value, can be either a single character or multiple characters