FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cppparser/cppparser/src/lexer-helper.cpp at master · satya-das/cppparser · GitHub
satya-das
/
cppparser
Public
Notifications
You must be signed in to change notification settings
Fork
47
Star
379
Code
Issues
4
Pull requests
0
Discussions
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
cppparser
/
cppparser
/
src
/
lexer-helper.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
35 lines (27 loc) · 870 Bytes
Breadcrumbs
cppparser
/
cppparser
/
src
/
lexer-helper.cpp
Copy path
File metadata and controls
35 lines (27 loc) · 870 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#
include
"
lexer-helper.h
"
#
include
<
map
>
#
include
<
set
>
#
include
<
string
>
extern
std::set<std::string>
gMacroNames
;
extern
std::set<std::string>
gKnownApiDecorNames
;
extern
std::map<std::string,
int
>
gDefinedNames
;
extern
std::set<std::string>
gUndefinedNames
;
extern
std::set<std::string>
gIgnorableMacroNames
;
extern
std::map<std::string,
int
>
gRenamedKeywords
;
MacroDefineInfo
GetMacroDefineInfo
(
const
std::string& id)
{
if
(
gUndefinedNames
.
count
(id))
return
MacroDefineInfo::
kUndefined
;
if
(
gDefinedNames
.
count
(id))
return
MacroDefineInfo::
kDefined
;
return
MacroDefineInfo::
kNoInfo
;
}
std::optional<
int
>
GetIdValue
(
const
std::string& id)
{
if
(
gUndefinedNames
.
count
(id))
return
std::
nullopt
;
const
auto
itr =
gDefinedNames
.
find
(id);
if
(itr ==
gDefinedNames
.
end
())
return
std::
nullopt
;
return
itr->
second
;
}
Back
|
FazBrowse Home
|
New Git URL