Douglas Gregor | 92a524f | 2010-03-18 00:42:48 +0000 | [diff] [blame^] | 1 | #define BAR baz |
| 2 | #define WIBBLE(X, Y) |
| 3 | WIBBLE(int, float) |
| 4 | int BAR; |
| 5 | #include "foo.h" |
| 6 | |
| 7 | // RUN: c-index-test -test-annotate-tokens=%s:1:1:6:1 -I%S/Inputs %s | FileCheck %s |
| 8 | // CHECK: Punctuation: "#" [1:1 - 1:2] preprocessing directive= |
| 9 | // CHECK: Identifier: "define" [1:2 - 1:8] preprocessing directive= |
| 10 | // CHECK: Identifier: "BAR" [1:9 - 1:12] preprocessing directive= |
| 11 | // CHECK: Identifier: "baz" [1:13 - 1:16] preprocessing directive= |
| 12 | // CHECK: Punctuation: "#" [2:1 - 2:2] preprocessing directive= |
| 13 | // CHECK: Identifier: "define" [2:2 - 2:8] preprocessing directive= |
| 14 | // CHECK: Identifier: "WIBBLE" [2:9 - 2:15] preprocessing directive= |
| 15 | // CHECK: Punctuation: "(" [2:15 - 2:16] preprocessing directive= |
| 16 | // CHECK: Identifier: "X" [2:16 - 2:17] preprocessing directive= |
| 17 | // CHECK: Punctuation: "," [2:17 - 2:18] preprocessing directive= |
| 18 | // CHECK: Identifier: "Y" [2:19 - 2:20] preprocessing directive= |
| 19 | // CHECK: Punctuation: ")" [2:20 - 2:21] preprocessing directive= |
| 20 | // CHECK: Identifier: "WIBBLE" [3:1 - 3:7] |
| 21 | // CHECK: Punctuation: "(" [3:7 - 3:8] |
| 22 | // CHECK: Keyword: "int" [3:8 - 3:11] |
| 23 | // CHECK: Punctuation: "," [3:11 - 3:12] |
| 24 | // CHECK: Keyword: "float" [3:13 - 3:18] |
| 25 | // CHECK: Punctuation: ")" [3:18 - 3:19] |
| 26 | // CHECK: Keyword: "int" [4:1 - 4:4] |
| 27 | // CHECK: Identifier: "BAR" [4:5 - 4:8] |
| 28 | // CHECK: Punctuation: ";" [4:8 - 4:9] |
| 29 | // CHECK: Punctuation: "#" [5:1 - 5:2] preprocessing directive= |
| 30 | // CHECK: Identifier: "include" [5:2 - 5:9] preprocessing directive= |
| 31 | // CHECK: Literal: ""foo.h"" [5:10 - 5:17] preprocessing directive= |