diff options
Diffstat (limited to 'Code/Blocks/syntax/scripts/shBrushScala.js')
-rw-r--r-- | Code/Blocks/syntax/scripts/shBrushScala.js | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Code/Blocks/syntax/scripts/shBrushScala.js b/Code/Blocks/syntax/scripts/shBrushScala.js new file mode 100644 index 0000000..4b0b6f0 --- /dev/null +++ b/Code/Blocks/syntax/scripts/shBrushScala.js | |||
@@ -0,0 +1,51 @@ | |||
1 | /** | ||
2 | * SyntaxHighlighter | ||
3 | * http://alexgorbatchev.com/SyntaxHighlighter | ||
4 | * | ||
5 | * SyntaxHighlighter is donationware. If you are using it, please donate. | ||
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html | ||
7 | * | ||
8 | * @version | ||
9 | * 3.0.83 (July 02 2010) | ||
10 | * | ||
11 | * @copyright | ||
12 | * Copyright (C) 2004-2010 Alex Gorbatchev. | ||
13 | * | ||
14 | * @license | ||
15 | * Dual licensed under the MIT and GPL licenses. | ||
16 | */ | ||
17 | ;(function() | ||
18 | { | ||
19 | // CommonJS | ||
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; | ||
21 | |||
22 | function Brush() | ||
23 | { | ||
24 | // Contributed by Yegor Jbanov and David Bernard. | ||
25 | |||
26 | var keywords = 'val sealed case def true trait implicit forSome import match object null finally super ' + | ||
27 | 'override try lazy for var catch throw type extends class while with new final yield abstract ' + | ||
28 | 'else do if return protected private this package false'; | ||
29 | |||
30 | var keyops = '[_:=><%#@]+'; | ||
31 | |||
32 | this.regexList = [ | ||
33 | { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments | ||
34 | { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments | ||
35 | { regex: SyntaxHighlighter.regexLib.multiLineSingleQuotedString, css: 'string' }, // multi-line strings | ||
36 | { regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' }, // double-quoted string | ||
37 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings | ||
38 | { regex: /0x[a-f0-9]+|\d+(\.\d+)?/gi, css: 'value' }, // numbers | ||
39 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords | ||
40 | { regex: new RegExp(keyops, 'gm'), css: 'keyword' } // scala keyword | ||
41 | ]; | ||
42 | } | ||
43 | |||
44 | Brush.prototype = new SyntaxHighlighter.Highlighter(); | ||
45 | Brush.aliases = ['scala']; | ||
46 | |||
47 | SyntaxHighlighter.brushes.Scala = Brush; | ||
48 | |||
49 | // CommonJS | ||
50 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null; | ||
51 | })(); | ||