diff options
Diffstat (limited to 'source/compiler-core/slang-token.cpp')
| -rw-r--r-- | source/compiler-core/slang-token.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source/compiler-core/slang-token.cpp b/source/compiler-core/slang-token.cpp new file mode 100644 index 000000000..576b08d66 --- /dev/null +++ b/source/compiler-core/slang-token.cpp @@ -0,0 +1,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 |
