aboutsummaryrefslogtreecommitdiff
path: root/src/lexer/symbol_property.cc
blob: c78dd61286357f96a9fc140e1223234f4d225146 (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 "lexer/symbol_property.h"

#include <string>

#include "lexer/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;
}

}