0

Update to 7.1

This commit is contained in:
Rei
2012-08-14 22:13:27 +08:00
parent c48a19bb3f
commit 7d6da30689
84 changed files with 4179 additions and 2385 deletions

View File

@@ -3,7 +3,7 @@ Language: Scala
Author: Jan Berkel <jan.berkel@gmail.com>
*/
hljs.LANGUAGES.scala = function() {
hljs.LANGUAGES['scala'] = function(hljs) {
var ANNOTATION = {
className: 'annotation', begin: '@[A-Za-z]+'
};
@@ -14,7 +14,10 @@ hljs.LANGUAGES.scala = function() {
};
return {
defaultMode: {
keywords: { 'type': 1, 'yield': 1, 'lazy': 1, 'override': 1, 'def': 1, 'with': 1, 'val':1, 'var': 1, 'false': 1, 'true': 1, 'sealed': 1, 'abstract': 1, 'private': 1, 'trait': 1, 'object': 1, 'null': 1, 'if': 1, 'for': 1, 'while': 1, 'throw': 1, 'finally': 1, 'protected': 1, 'extends': 1, 'import': 1, 'final': 1, 'return': 1, 'else': 1, 'break': 1, 'new': 1, 'catch': 1, 'super': 1, 'class': 1, 'case': 1,'package': 1, 'default': 1, 'try': 1, 'this': 1, 'match': 1, 'continue': 1, 'throws': 1},
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',
@@ -29,13 +32,13 @@ hljs.LANGUAGES.scala = function() {
hljs.APOS_STRING_MODE, hljs.QUOTE_STRING_MODE, STRING,
{
className: 'class',
begin: '((case )?class |object |trait )', end: '({|$)',
begin: '((case )?class |object |trait )', end: '({|$)', // beginWithKeyword won't work because a single "case" shouldn't start this mode
illegal: ':',
keywords: {'case' : 1, 'class': 1, 'trait': 1, 'object': 1},
keywords: 'case class trait object',
contains: [
{
begin: '(extends|with)',
keywords: {'extends': 1, 'with': 1},
beginWithKeyword: true,
keywords: 'extends with',
relevance: 10
},
{
@@ -57,4 +60,4 @@ hljs.LANGUAGES.scala = function() {
]
}
};
}();
}(hljs);