forked from mathieu/cppcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtokenize.h
More file actions
36 lines (25 loc) · 925 Bytes
/
Copy pathtokenize.h
File metadata and controls
36 lines (25 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//---------------------------------------------------------------------------
#ifndef tokenizeH
#define tokenizeH
//---------------------------------------------------------------------------
#include <string>
#include <vector>
extern std::vector<std::string> Files;
struct TOKEN
{
unsigned int FileIndex;
char *str;
unsigned int linenr;
struct TOKEN *next;
};
extern struct TOKEN *tokens, *tokens_back;
void Tokenize(const char FileName[]);
void TokenizeCode(std::istream &code, const unsigned int FileIndex=0);
// Deallocate lists..
void DeallocateTokens();
// Helper functions for handling the tokens list..
const TOKEN *findtoken(const TOKEN *tok1, const char *tokenstr[]);
const TOKEN *gettok(const TOKEN *tok, int index);
const char *getstr(const TOKEN *tok, int index);
//---------------------------------------------------------------------------
#endif