forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcpp_token.h
47 lines (36 loc) · 811 Bytes
/
cpp_token.h
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
37
38
39
40
41
42
43
44
45
46
47
/*******************************************************************\
Module: C++ Parser: Token
Author: Daniel Kroening, kroening@cs.cmu.edu
\*******************************************************************/
/// \file
/// C++ Parser: Token
#ifndef CPROVER_CPP_CPP_TOKEN_H
#define CPROVER_CPP_CPP_TOKEN_H
#include <algorithm>
#include <util/expr.h>
class cpp_tokent
{
public:
int kind;
exprt data;
std::string text;
unsigned line_no;
irep_idt filename;
void clear()
{
kind=0;
data.clear();
text="";
line_no=0;
filename="";
}
void swap(cpp_tokent &token)
{
std::swap(kind, token.kind);
data.swap(token.data);
text.swap(token.text);
std::swap(line_no, token.line_no);
filename.swap(token.filename);
}
};
#endif // CPROVER_CPP_CPP_TOKEN_H