-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathcpp_preprocessor.h
More file actions
55 lines (45 loc) · 949 Bytes
/
Copy pathcpp_preprocessor.h
File metadata and controls
55 lines (45 loc) · 949 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Copyright (C) 2022 Satya Das and CppParser contributors
// SPDX-License-Identifier: MIT
#ifndef B40BB001_B9E3_4D83_8F99_6BD123813A0F
#define B40BB001_B9E3_4D83_8F99_6BD123813A0F
#include "cppast/cpp_entity.h"
namespace cppast {
enum class CppPreprocessorType
{
DEFINE,
UNDEF,
CONDITIONAL,
INCLUDE,
IMPORT,
WARNING,
ERROR,
LINE,
PRAGMA,
UNRECOGNIZED,
};
/**
* @brief Base class for all preprocessor directives.
*/
class CppPreprocessor : public CppEntity
{
public:
static constexpr auto EntityType()
{
return CppEntityType::PREPROCESSOR;
}
public:
CppPreprocessorType preprocessorType() const
{
return preprocessorType_;
}
protected:
CppPreprocessor(CppPreprocessorType preprocessorType)
: CppEntity(EntityType())
, preprocessorType_(preprocessorType)
{
}
private:
CppPreprocessorType preprocessorType_;
};
} // namespace cppast
#endif /* B40BB001_B9E3_4D83_8F99_6BD123813A0F */