From fcf83dbf9effab3bd98bad2b83b2468b7eb05cfd Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Fri, 9 Jun 2017 11:34:21 -0700 Subject: Initial import of code. --- source/slang/token.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 source/slang/token.cpp (limited to 'source/slang/token.cpp') diff --git a/source/slang/token.cpp b/source/slang/token.cpp new file mode 100644 index 000000000..436a3a740 --- /dev/null +++ b/source/slang/token.cpp @@ -0,0 +1,22 @@ +// token.cpp +#include "token.h" + +#include + +namespace Slang { +namespace Compiler { + +char const* TokenTypeToString(TokenType type) +{ + switch( type ) + { + default: + assert(!"unexpected"); + return ""; + +#define TOKEN(NAME, DESC) case TokenType::NAME: return DESC; +#include "token-defs.h" + } +} + +}} -- cgit v1.2.3