 |
|
 |
|
| Files: |
1 |
|
Branches Taken: |
5.4% |
3 / 56 |
| Generated: |
2010-02-10 01:31 |
|
Branches Executed: |
100.0% |
56 / 56 |
| |
|
Line Coverage: |
83.3% |
5 / 6 |
| |
 |
|
 |
1 : //===--- TokenKinds.cpp - Token Kinds Support -----------------------------===//
2 : //
3 : // The LLVM Compiler Infrastructure
4 : //
5 : // This file is distributed under the University of Illinois Open Source
6 : // License. See LICENSE.TXT for details.
7 : //
8 : //===----------------------------------------------------------------------===//
9 : //
10 : // This file implements the TokenKind enum and support functions.
11 : //
12 : //===----------------------------------------------------------------------===//
13 :
14 : #include "clang/Basic/TokenKinds.h"
15 :
16 : #include <cassert>
17 : using namespace clang;
18 :
19 : static const char * const TokNames[] = {
20 : #define TOK(X) #X,
21 : #define KEYWORD(X,Y) #X,
22 : #include "clang/Basic/TokenKinds.def"
23 : 0
24 : };
25 :
26 37: const char *tok::getTokenName(enum TokenKind Kind) {
0: branch 0 not taken
37: branch 1 taken
27 37: assert(Kind < tok::NUM_TOKENS);
28 37: return TokNames[Kind];
29 : }
30 :
31 33: const char *tok::getTokenSimpleSpelling(enum TokenKind Kind) {
0: branch 0 not taken
0: branch 1 not taken
3: branch 2 taken
0: branch 3 not taken
0: branch 4 not taken
0: branch 5 not taken
0: branch 6 not taken
0: branch 7 not taken
0: branch 8 not taken
0: branch 9 not taken
0: branch 10 not taken
0: branch 11 not taken
0: branch 12 not taken
0: branch 13 not taken
0: branch 14 not taken
0: branch 15 not taken
0: branch 16 not taken
0: branch 17 not taken
0: branch 18 not taken
0: branch 19 not taken
0: branch 20 not taken
0: branch 21 not taken
0: branch 22 not taken
0: branch 23 not taken
0: branch 24 not taken
0: branch 25 not taken
0: branch 26 not taken
0: branch 27 not taken
0: branch 28 not taken
0: branch 29 not taken
0: branch 30 not taken
0: branch 31 not taken
0: branch 32 not taken
0: branch 33 not taken
0: branch 34 not taken
0: branch 35 not taken
0: branch 36 not taken
0: branch 37 not taken
0: branch 38 not taken
0: branch 39 not taken
0: branch 40 not taken
0: branch 41 not taken
30: branch 42 taken
0: branch 43 not taken
0: branch 44 not taken
0: branch 45 not taken
0: branch 46 not taken
0: branch 47 not taken
0: branch 48 not taken
0: branch 49 not taken
0: branch 50 not taken
0: branch 51 not taken
0: branch 52 not taken
0: branch 53 not taken
32 33: switch (Kind) {
33 : #define PUNCTUATOR(X,Y) case X: return Y;
34 : #include "clang/Basic/TokenKinds.def"
35 : default: break;
36 : }
37 :
38 0: return 0;
39 : }
Generated: 2010-02-10 01:31 by zcov