Skip to content

Commit 25fe94e

Browse files
committed
moved TokensFrontBack from token.h to tokenlist.h
1 parent fc6b6e9 commit 25fe94e

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

lib/token.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#include "config.h"
2525
#include "mathlib.h"
26+
#include "tokenlist.h"
2627
#include "valueflow.h"
2728
#include "templatesimplifier.h"
2829
#include "utils.h"
@@ -45,19 +46,9 @@ class Settings;
4546
class Type;
4647
class ValueType;
4748
class Variable;
48-
class TokenList;
4949
class ConstTokenRange;
5050
class Token;
5151

52-
/**
53-
* @brief This struct stores pointers to the front and back tokens of the list this token is in.
54-
*/
55-
struct TokensFrontBack {
56-
Token *front;
57-
Token *back;
58-
const TokenList* list;
59-
};
60-
6152
struct ScopeInfo2 {
6253
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_)) {}
6354
std::string name;

lib/tokenlist.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
//---------------------------------------------------------------------------
2323

2424
#include "config.h"
25-
#include "token.h"
2625

2726
#include <cstddef>
2827
#include <iosfwd>
@@ -31,14 +30,25 @@
3130
#include <vector>
3231

3332
class Settings;
33+
class Token;
3434

3535
namespace simplecpp {
3636
class TokenList;
3737
}
38+
class TokenList;
3839

3940
/// @addtogroup Core
4041
/// @{
4142

43+
/**
44+
* @brief This struct stores pointers to the front and back tokens of the list this token is in.
45+
*/
46+
struct TokensFrontBack {
47+
Token *front;
48+
Token *back;
49+
const TokenList* list;
50+
};
51+
4252
class CPPCHECKLIB TokenList {
4353
public:
4454
explicit TokenList(const Settings* settings);

0 commit comments

Comments
 (0)