forked from PrismJS/prism
/
class-name_feature.test
59 lines (51 loc) · 1.14 KB
/
class-name_feature.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
struct foo;
enum bar;
struct foo var;
struct __attribute__ ((aligned (8))) S { short f[3]; };
// by name
uint32_t foo;
static dtrace_helptrace_t *bar;
----------------------------------------------------
[
["keyword", "struct"],
["class-name", "foo"],
["punctuation", ";"],
["keyword", "enum"],
["class-name", "bar"],
["punctuation", ";"],
["keyword", "struct"],
["class-name", "foo"],
" var",
["punctuation", ";"],
["keyword", "struct"],
["keyword", "__attribute__"],
["punctuation", "("],
["punctuation", "("],
["function", "aligned"],
["punctuation", "("],
["number", "8"],
["punctuation", ")"],
["punctuation", ")"],
["punctuation", ")"],
["class-name", "S"],
["punctuation", "{"],
["keyword", "short"],
" f",
["punctuation", "["],
["number", "3"],
["punctuation", "]"],
["punctuation", ";"],
["punctuation", "}"],
["punctuation", ";"],
["comment", "// by name"],
["class-name", "uint32_t"],
" foo",
["punctuation", ";"],
["keyword", "static"],
["class-name", "dtrace_helptrace_t"],
["operator", "*"],
"bar",
["punctuation", ";"]
]
----------------------------------------------------
Checks for structs and enums.