diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-07-11 17:01:13 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-07-11 17:01:13 +0000 |
commit | 5f016e2cb5d11daeb237544de1c5d59f20fe1a6e (patch) | |
tree | 8b6bfcb8783d16827f896d5facbd4549300e8a1e /include/clang/Basic/TokenKinds.h | |
parent | a5f182095bf2065ca94f1c86957ee91f9068964b (diff) |
Stage two of getting CFE top correct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39734 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/TokenKinds.h')
-rw-r--r-- | include/clang/Basic/TokenKinds.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/include/clang/Basic/TokenKinds.h b/include/clang/Basic/TokenKinds.h new file mode 100644 index 0000000000..e51f0c7f8a --- /dev/null +++ b/include/clang/Basic/TokenKinds.h @@ -0,0 +1,51 @@ +//===--- TokenKinds.h - Enum values for C Token Kinds -----------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by Chris Lattner and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines the TokenKind enum and support functions. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_CLANG_TOKENKINDS_H +#define LLVM_CLANG_TOKENKINDS_H + +namespace clang { + +namespace tok { + +/// TokenKind - This provides a simple uniform namespace for tokens from all C +/// languages. +enum TokenKind { +#define TOK(X) X, +#include "clang/Basic/TokenKinds.def" + NUM_TOKENS +}; + +/// PPKeywordKind - This provides a namespace for preprocessor keywords which +/// start with a '#' at the beginning of the line. +enum PPKeywordKind { +#define PPKEYWORD(X) pp_##X, +#include "clang/Basic/TokenKinds.def" + NUM_PP_KEYWORDS +}; + +/// ObjCKeywordKind - This provides a namespace for Objective-C keywords which +/// start with an '@'. +enum ObjCKeywordKind { +#define OBJC1_AT_KEYWORD(X) objc_##X, +#define OBJC2_AT_KEYWORD(X) objc_##X, +#include "clang/Basic/TokenKinds.def" + NUM_OBJC_KEYWORDS +}; + +const char *getTokenName(enum TokenKind Kind); + +} // end namespace tok +} // end namespace clang + +#endif |