update to higlight.js 8.4
This commit is contained in:
65
vendor/assets/javascripts/highlight_js/languages/haxe.js
vendored
Normal file
65
vendor/assets/javascripts/highlight_js/languages/haxe.js
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
Language: Haxe
|
||||
Author: Christopher Kaster <ikasoki@gmail.com> (Based on the actionscript.js language file by Alexander Myadzel)
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var IDENT_RE = '[a-zA-Z_$][a-zA-Z0-9_$]*';
|
||||
var IDENT_FUNC_RETURN_TYPE_RE = '([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)';
|
||||
|
||||
return {
|
||||
aliases: ['hx'],
|
||||
keywords: {
|
||||
keyword: 'break callback case cast catch class continue default do dynamic else enum extends extern ' +
|
||||
'for function here if implements import in inline interface never new override package private ' +
|
||||
'public return static super switch this throw trace try typedef untyped using var while',
|
||||
literal: 'true false null'
|
||||
},
|
||||
contains: [
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE,
|
||||
hljs.C_NUMBER_MODE,
|
||||
{
|
||||
className: 'class',
|
||||
beginKeywords: 'class interface', end: '{', excludeEnd: true,
|
||||
contains: [
|
||||
{
|
||||
beginKeywords: 'extends implements'
|
||||
},
|
||||
hljs.TITLE_MODE
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'preprocessor',
|
||||
begin: '#', end: '$',
|
||||
keywords: 'if else elseif end error'
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
beginKeywords: 'function', end: '[{;]', excludeEnd: true,
|
||||
illegal: '\\S',
|
||||
contains: [
|
||||
hljs.TITLE_MODE,
|
||||
{
|
||||
className: 'params',
|
||||
begin: '\\(', end: '\\)',
|
||||
contains: [
|
||||
hljs.APOS_STRING_MODE,
|
||||
hljs.QUOTE_STRING_MODE,
|
||||
hljs.C_LINE_COMMENT_MODE,
|
||||
hljs.C_BLOCK_COMMENT_MODE
|
||||
]
|
||||
},
|
||||
{
|
||||
className: 'type',
|
||||
begin: ':',
|
||||
end: IDENT_FUNC_RETURN_TYPE_RE,
|
||||
relevance: 10
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user