-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjava.js
45 lines (45 loc) · 1.27 KB
/
java.js
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
module.exports = function(hljs) {
return {
keywords:
'false synchronized int abstract float private char boolean static null if const ' +
'for true while long throw strictfp finally protected import native final return void ' +
'enum else break transient new catch instanceof byte super volatile case assert short ' +
'package default double public try this switch continue throws',
contains: [
{
className: 'javadoc',
begin: '/\\*\\*', end: '\\*/',
contains: [{
className: 'javadoctag', begin: '(^|\\s)@[A-Za-z]+'
}],
relevance: 10
},
hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,
hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,
{
className: 'class',
beginWithKeyword: true, end: '{',
keywords: 'class interface',
excludeEnd: true,
illegal: ':',
contains: [
{
beginWithKeyword: true,
keywords: 'extends implements',
relevance: 10
},
{
className: 'title',
begin: hljs.UNDERSCORE_IDENT_RE
}
]
},
hljs.C_NUMBER_MODE,
{
className: 'annotation', begin: '@[A-Za-z]+'
}
]
};
};