Skip to content

Commit

Permalink
moved TokensFrontBack from token.h to tokenlist.h
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Sep 29, 2022
1 parent 26e5459 commit 2cd1e14
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
11 changes: 1 addition & 10 deletions lib/token.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include "config.h"
#include "mathlib.h"
#include "tokenlist.h"
#include "valueflow.h"
#include "templatesimplifier.h"
#include "utils.h"
Expand All @@ -45,19 +46,9 @@ class Settings;
class Type;
class ValueType;
class Variable;
class TokenList;
class ConstTokenRange;
class Token;

/**
* @brief This struct stores pointers to the front and back tokens of the list this token is in.
*/
struct TokensFrontBack {
Token *front;
Token *back;
const TokenList* list;
};

struct ScopeInfo2 {
ScopeInfo2(std::string name_, const Token *bodyEnd_, std::set<std::string> usingNamespaces_ = std::set<std::string>()) : name(std::move(name_)), bodyEnd(bodyEnd_), usingNamespaces(std::move(usingNamespaces_)) {}
std::string name;
Expand Down
12 changes: 11 additions & 1 deletion lib/tokenlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
//---------------------------------------------------------------------------

#include "config.h"
#include "token.h"

#include <cstddef>
#include <iosfwd>
Expand All @@ -31,14 +30,25 @@
#include <vector>

class Settings;
class Token;

namespace simplecpp {
class TokenList;
}
class TokenList;

/// @addtogroup Core
/// @{

/**
* @brief This struct stores pointers to the front and back tokens of the list this token is in.
*/
struct TokensFrontBack {
Token *front;
Token *back;
const TokenList* list;
};

class CPPCHECKLIB TokenList {
public:
explicit TokenList(const Settings* settings);
Expand Down

0 comments on commit 2cd1e14

Please sign in to comment.