0

Update to 8.0

This commit is contained in:
Rogaboru Kujimoshi
2014-06-08 21:04:39 +04:00
parent 81d0115677
commit a52831ccdb
134 changed files with 10392 additions and 4999 deletions

View File

@@ -0,0 +1,65 @@
/*
Language: AutoHotkey
Author: Seongwon Lee <dlimpid@gmail.com>
Description: AutoHotkey language definition
*/
function(hljs) {
var BACKTICK_ESCAPE = {
className: 'escape',
begin: '`[\\s\\S]'
};
var COMMENTS = {
className: 'comment',
begin: ';', end: '$',
relevance: 0
};
var BUILT_IN = [
{
className: 'built_in',
begin: 'A_[a-zA-Z0-9]+'
},
{
className: 'built_in',
beginKeywords: 'ComSpec Clipboard ClipboardAll ErrorLevel'
}
];
return {
case_insensitive: true,
keywords: {
keyword: 'Break Continue Else Gosub If Loop Return While',
literal: 'A true false NOT AND OR'
},
contains: BUILT_IN.concat([
BACKTICK_ESCAPE,
hljs.inherit(hljs.QUOTE_STRING_MODE, {contains: [BACKTICK_ESCAPE]}),
COMMENTS,
{
className: 'number',
begin: hljs.NUMBER_RE,
relevance: 0
},
{
className: 'var_expand', // FIXME
begin: '%', end: '%',
illegal: '\\n',
contains: [BACKTICK_ESCAPE]
},
{
className: 'label',
contains: [BACKTICK_ESCAPE],
variants: [
{begin: '^[^\\n";]+::(?!=)'},
{begin: '^[^\\n";]+:(?!=)', relevance: 0} // zero relevance as it catches a lot of things
// followed by a single ':' in many languages
]
},
{
// consecutive commas, not for highlighting but just for relevance
begin: ',\\s*,',
relevance: 10
}
])
}
}