X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fidentifier.c;h=498f5ea966987e38f75eba3dd105f6e112ed69f5;hb=refs%2Fbuilds%2F20110315030503%2Fpspp;hp=1e149b8dc3ea9673c801be8ed7cb0010dbb546b5;hpb=691c25e36fd1ee722dd35419d6110e3876b99f9c;p=pspp diff --git a/src/data/identifier.c b/src/data/identifier.c index 1e149b8dc3..498f5ea966 100644 --- a/src/data/identifier.c +++ b/src/data/identifier.c @@ -31,6 +31,22 @@ #include "gl/c-ctype.h" +/* Tokens. */ + +const char * +token_type_to_string (enum token_type type) +{ + switch (type) + { +#define TOKEN_TYPE(TYPE) case T_##TYPE: return #TYPE; + TOKEN_TYPES +#undef TOKEN_TYPE + case TOKEN_N_TYPES: + default: + return "unknown token type"; + } +} + /* Recognizing identifiers. */ static bool