/usr/lib/nodejs/highlight/scala.js is in node-highlight 7.4+ds-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | module.exports = function(hljs) {
var ANNOTATION = {
className: 'annotation', begin: '@[A-Za-z]+'
};
var STRING = {
className: 'string',
begin: 'u?r?"""', end: '"""',
relevance: 10
};
return {
keywords:
'type yield lazy override def with val var false true sealed abstract private trait ' +
'object null if for while throw finally protected extends import final return else ' +
'break new catch super class case package default try this match continue throws',
contains: [
{
className: 'javadoc',
begin: '/\\*\\*', end: '\\*/',
contains: [{
className: 'javadoctag',
begin: '@[A-Za-z]+'
}],
relevance: 10
},
hljs.C_LINE_COMMENT_MODE, hljs.C_BLOCK_COMMENT_MODE,
hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, STRING,
{
className: 'class',
begin: '((case )?class |object |trait )', end: '({|$)', // beginWithKeyword won't work because a single "case" shouldn't start this mode
illegal: ':',
keywords: 'case class trait object',
contains: [
{
beginWithKeyword: true,
keywords: 'extends with',
relevance: 10
},
{
className: 'title',
begin: hljs.UNDERSCORE_IDENT_RE
},
{
className: 'params',
begin: '\\(', end: '\\)',
contains: [
hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, STRING,
ANNOTATION
]
}
]
},
hljs.C_NUMBER_MODE,
ANNOTATION
]
};
};
|