blob: bb5015c2b21a33580f99d8ba1aaa2621f63125c5 (
plain)
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
|
#include "lang_analysis/symbol_property.h"
#include <string>
#include "lang_analysis/enum_type.h"
using namespace std;
namespace ov4
{
string symbol_enum2string(enum_token_type e)
{
for (auto &c : symbol_property)
{
// pair<string, T_property>
if (c.second.enum_type == e)
return c.first;
}
return "";
}
bool symbol_contains_enum_type(enum_token_type e)
{
return (symbol_enum2string(e) == "") ? false : true;
}
}
|