8 #ifndef SRC_TOOLS_TOKEN_H_ 9 #define SRC_TOOLS_TOKEN_H_ 37 Token (
const std::string& rawToken,
const char precedingDelim,
38 const char followingDelim);
45 const std::string&
getToken ()
const;
76 bool isToken (
const char delim)
const;
86 static bool isToken (
const std::string &candidate,
const char delim);
104 static bool isWhitespace (
const char c);
107 char m_precedingDelim;
108 char m_followingDelim;
const std::string & getToken() const
Gets the content of the Token.
Definition: Token.cpp:23
bool operator==(const Token &other) const
Checks for equality between tokens.
Definition: Token.cpp:73
const char getFollowingDelimiter() const
Gets the delimiter that came after this Token in the source string.
Definition: Token.cpp:68
const std::string & finalize()
Removes any Tokenizer-specific formatting.
Definition: Token.cpp:28
bool isToken(const char delim) const
Checks if this Token instance is also a Token for the given delimiter.
Definition: Token.cpp:78
Represents a single unit of a command language.
Definition: Token.h:23
Token(const std::string &rawToken, const char precedingDelim, const char followingDelim)
Creates a Token with the given content and surrounding delimiters.
Definition: Token.cpp:11
const char getPrecedingDelimiter() const
Gets the delimiter that came before this Token in the source string.
Definition: Token.cpp:63