]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/autohotkey.js
1 /*! `autohotkey` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar
= (function () {
7 Author: Seongwon Lee <dlimpid@gmail.com>
8 Description: AutoHotkey language definition
12 /** @type LanguageFn */
13 function autohotkey(hljs
) {
14 const BACKTICK_ESCAPE
= { begin: '`[\\s\\S]' };
18 case_insensitive: true,
21 keyword: 'Break Continue Critical Exit ExitApp Gosub Goto New OnExit Pause return SetBatchLines SetTimer Suspend Thread Throw Until ahk_id ahk_class ahk_pid ahk_exe ahk_group',
22 literal: 'true false NOT AND OR',
23 built_in: 'ComSpec Clipboard ClipboardAll ErrorLevel'
27 hljs
.inherit(hljs
.QUOTE_STRING_MODE
, { contains: [ BACKTICK_ESCAPE
] }),
28 hljs
.COMMENT(';', '$', { relevance: 0 }),
29 hljs
.C_BLOCK_COMMENT_MODE
,
32 begin: hljs
.NUMBER_RE
,
36 // subst would be the most accurate however fails the point of
37 // highlighting. variable is comparably the most accurate that actually
39 className: 'variable',
40 begin: '%[a-zA-Z0-9#_$@]+%'
43 className: 'built_in',
44 begin: '^\\s*\\w+\\s*(,|%)'
45 // I don't really know if this is totally relevant
48 // symbol would be most accurate however is highlighted just like
49 // built_in and that makes up a lot of AutoHotkey code meaning that it
50 // would fail to highlight anything
53 { begin: '^[^\\n";]+::(?!=)' },
55 begin: '^[^\\n";]+:(?!=)',
56 // zero relevance as it catches a lot of things
57 // followed by a single ':' in many languages
69 className: 'built_in',
70 begin: 'A_[a-zA-Z0-9]+'
73 // consecutive commas, not for highlighting but just for relevance
83 export default hljsGrammar
;