summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/TokenKinds.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-27 17:53:17 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-27 17:53:17 +0000
commitb2fb6de9070fea9abc56c8e8d5469066e964cefe (patch)
tree43e23d4d24ae483d9f8113d57f06fedb19d239c5 /include/clang/Basic/TokenKinds.h
parent51a75d0cc7651753399efdc3176feaee6214c3ca (diff)
Clean up and document code modification hints.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65641 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/TokenKinds.h')
-rw-r--r--include/clang/Basic/TokenKinds.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/clang/Basic/TokenKinds.h b/include/clang/Basic/TokenKinds.h
index 6a14244362..62a9e428bf 100644
--- a/include/clang/Basic/TokenKinds.h
+++ b/include/clang/Basic/TokenKinds.h
@@ -43,8 +43,20 @@ enum ObjCKeywordKind {
NUM_OBJC_KEYWORDS
};
+/// \brief Determines the name of a token as used within the front end.
+///
+/// The name of a token will be an internal name (such as "l_square")
+/// and should not be used as part of diagnostic messages.
const char *getTokenName(enum TokenKind Kind);
-const char *getTokenSpelling(enum TokenKind Kind);
+
+/// \brief Determines the spelling of simple punctuation tokens like
+/// '!' or '%', and returns NULL for literal and annotation tokens.
+///
+/// This routine only retrieves the "simple" spelling of the token,
+/// and will not produce any alternative spellings (e.g., a
+/// digraph). For the actual spelling of a given Token, use
+/// Preprocessor::getSpelling().
+const char *getTokenSimpleSpelling(enum TokenKind Kind);
} // end namespace tok
} // end namespace clang