summaryrefslogtreecommitdiffstats
path: root/source/compiler-core/slang-token.cpp
blob: 576b08d66a0e7fc50a81c9b94f2969eea29198b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// slang-token.cpp
#include "slang-token.h"

//#include <assert.h>

namespace Slang {

char const* TokenTypeToString(TokenType type)
{
    switch( type )
    {
    default:
        SLANG_ASSERT(!"unexpected");
        return "<uknown>";

#define TOKEN(NAME, DESC) case TokenType::NAME: return DESC;
#include "slang-token-defs.h"
    }
}

} // namespace Slang