blob: b75d334a6761cc24ecea7ad3115cdc5767e3eeb8 [file] [log] [blame]
Clement Escoffier07e8d6a2009-07-21 11:44:30 +00001dp.sh.Brushes.Java = function()
2{
3 var keywords = 'abstract assert boolean break byte case catch char class const' +
4 'continue default do double else enum extends false final finally float' +
5 'for goto if implements import instanceof inst interface log native' +
6 'new null package private protected public return short static strictfp super' +
7 'switch synchronized this throw throws transient true try void volatile while';
8
9 this.regexList = [
10 { regex: new RegExp('//.*$', 'gm'), css: 'comment' }, // one line comments
11 { regex: new RegExp('/\\*[\\s\\S]*?\\*/', 'g'), css: 'comment' }, // multiline comments
12 { regex: new RegExp('"(?:[^"\n]|[\"])*?"', 'g'), css: 'string' }, // double quoted strings
13 { regex: new RegExp("'(?:[^'\n]|[\'])*?'", 'g'), css: 'string' }, // single quoted strings
14 { regex: new RegExp('^\\s*@.*', 'gm'), css: 'preprocessor' }, // preprocessor tags like @see
15 { regex: new RegExp(this.GetKeywords(keywords), 'gm'), css: 'keyword' } // keywords
16 ];
17
18 this.CssClass = 'dp-c';
19}
20
21dp.sh.Brushes.Java.prototype = new dp.sh.Highlighter();
22dp.sh.Brushes.Java.Aliases = ['java'];