Skip to content

Commit

Permalink
small tokenize.h cleanup (#6250)
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Apr 6, 2024
1 parent 7a546a8 commit c802bab
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/tokenize.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,13 @@ enum class Severity;
/** @brief The main purpose is to tokenize the source code. It also has functions that simplify the token list */
class CPPCHECKLIB Tokenizer {

friend class TestSimplifyTokens;
friend class TestSimplifyTypedef;
friend class TestSimplifyUsing;
friend class TestTokenizer;
friend class SymbolDatabase;
friend class TestSimplifyTemplate;
friend class TemplateSimplifier;

friend class TestSimplifyTemplate;
friend class TestSimplifyTypedef;
friend class TestTokenizer;

public:
explicit Tokenizer(const Settings & settings, ErrorLogger *errorLogger, const Preprocessor *preprocessor = nullptr);
~Tokenizer();
Expand Down Expand Up @@ -105,6 +104,7 @@ class CPPCHECKLIB Tokenizer {
const char FileName[],
const std::string &configuration = emptyString);

private:
/** Set variable id */
void setVarId();
void setVarIdPass1();
Expand Down Expand Up @@ -139,7 +139,7 @@ class CPPCHECKLIB Tokenizer {
*/
void splitTemplateRightAngleBrackets(bool check);


public:
/**
* Calculates sizeof value for given type.
* @param type Token which will contain e.g. "int", "*", or string.
Expand All @@ -148,6 +148,7 @@ class CPPCHECKLIB Tokenizer {
nonneg int sizeOfType(const Token* type) const;
nonneg int sizeOfType(const std::string& type) const;

private:
void simplifyDebug();

/** Simplify assignment where rhs is a block : "x=({123;});" => "{x=123;}" */
Expand Down Expand Up @@ -351,6 +352,7 @@ class CPPCHECKLIB Tokenizer {
*/
static std::string simplifyString(const std::string &source);

public:
/**
* is token pointing at function head?
* @param tok A '(' or ')' token in a possible function head
Expand Down

0 comments on commit c802bab

Please sign in to comment.