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

@@ -2,9 +2,21 @@
Language: Delphi
*/
hljs.LANGUAGES.delphi = function(){
var DELPHI_KEYWORDS = {'and': 1, 'safecall': 1, 'cdecl': 1, 'then': 1, 'string': 1, 'exports': 1, 'library': 1, 'not': 1, 'pascal': 1, 'set': 1, 'virtual': 1, 'file': 1, 'in': 1, 'array': 1, 'label': 1, 'packed': 1, 'end.': 1, 'index': 1, 'while': 1, 'const': 1, 'raise': 1, 'for': 1, 'to': 1, 'implementation': 1, 'with': 1, 'except': 1, 'overload': 1, 'destructor': 1, 'downto': 1, 'finally': 1, 'program': 1, 'exit': 1, 'unit': 1, 'inherited': 1, 'override': 1, 'if': 1, 'type': 1, 'until': 1, 'function': 1, 'do': 1, 'begin': 1, 'repeat': 1, 'goto': 1, 'nil': 1, 'far': 1, 'initialization': 1, 'object': 1, 'else': 1, 'var': 1, 'uses': 1, 'external': 1, 'resourcestring': 1, 'interface': 1, 'end': 1, 'finalization': 1, 'class': 1, 'asm': 1, 'mod': 1, 'case': 1, 'on': 1, 'shr': 1, 'shl': 1, 'of': 1, 'register': 1, 'xorwrite': 1, 'threadvar': 1, 'try': 1, 'record': 1, 'near': 1, 'stored': 1, 'constructor': 1, 'stdcall': 1, 'inline': 1, 'div': 1, 'out': 1, 'or': 1, 'procedure': 1};
var DELPHI_CLASS_KEYWORDS = {'safecall': 1, 'stdcall': 1, 'pascal': 1, 'stored': 1, 'const': 1, 'implementation': 1, 'finalization': 1, 'except': 1, 'to': 1, 'finally': 1, 'program': 1, 'inherited': 1, 'override': 1, 'then': 1, 'exports': 1, 'string': 1, 'read': 1, 'not': 1, 'mod': 1, 'shr': 1, 'try': 1, 'div': 1, 'shl': 1, 'set': 1, 'library': 1, 'message': 1, 'packed': 1, 'index': 1, 'for': 1, 'near': 1, 'overload': 1, 'label': 1, 'downto': 1, 'exit': 1, 'public': 1, 'goto': 1, 'interface': 1, 'asm': 1, 'on': 1, 'of': 1, 'constructor': 1, 'or': 1, 'private': 1, 'array': 1, 'unit': 1, 'raise': 1, 'destructor': 1, 'var': 1, 'type': 1, 'until': 1, 'function': 1, 'else': 1, 'external': 1, 'with': 1, 'case': 1, 'default': 1, 'record': 1, 'while': 1, 'protected': 1, 'property': 1, 'procedure': 1, 'published': 1, 'and': 1, 'cdecl': 1, 'do': 1, 'threadvar': 1, 'file': 1, 'in': 1, 'if': 1, 'end': 1, 'virtual': 1, 'write': 1, 'far': 1, 'out': 1, 'begin': 1, 'repeat': 1, 'nil': 1, 'initialization': 1, 'object': 1, 'uses': 1, 'resourcestring': 1, 'class': 1, 'register': 1, 'xorwrite': 1, 'inline': 1, 'static': 1};
hljs.LANGUAGES['delphi'] = function(hljs) {
var DELPHI_KEYWORDS = 'and safecall cdecl then string exports library not pascal set ' +
'virtual file in array label packed end. index while const raise for to implementation ' +
'with except overload destructor downto finally program exit unit inherited override if ' +
'type until function do begin repeat goto nil far initialization object else var uses ' +
'external resourcestring interface end finalization class asm mod case on shr shl of ' +
'register xorwrite threadvar try record near stored constructor stdcall inline div out or ' +
'procedure';
var DELPHI_CLASS_KEYWORDS = 'safecall stdcall pascal stored const implementation ' +
'finalization except to finally program inherited override then exports string read not ' +
'mod shr try div shl set library message packed index for near overload label downto exit ' +
'public goto interface asm on of constructor or private array unit raise destructor var ' +
'type until function else external with case default record while protected property ' +
'procedure published and cdecl do threadvar file in if end virtual write far out begin ' +
'repeat nil initialization object uses resourcestring class register xorwrite inline static';
var CURLY_COMMENT = {
className: 'comment',
begin: '{', end: '}',
@@ -26,8 +38,8 @@ hljs.LANGUAGES.delphi = function(){
};
var FUNCTION = {
className: 'function',
begin: '(procedure|constructor|destructor|function)\\b', end: '[:;]',
keywords: {'function': 1, 'constructor': 10, 'destructor': 10, 'procedure': 10},
beginWithKeyword: true, end: '[:;]',
keywords: 'function constructor|10 destructor|10 procedure|10',
contains: [
{
className: 'title', begin: hljs.IDENT_RE
@@ -57,14 +69,11 @@ hljs.LANGUAGES.delphi = function(){
keywords: DELPHI_CLASS_KEYWORDS,
contains: [
STRING, CHAR_STRING,
CURLY_COMMENT, PAREN_COMMENT,
CURLY_COMMENT, PAREN_COMMENT, hljs.C_LINE_COMMENT_MODE,
FUNCTION
]
}
]
},
modes: [
]
}
};
}();
}(hljs);