diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-05-24 15:10:37 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-05-24 15:11:17 +0200 |
commit | 7a3df06eb573d36142bd1a8e03c5ce8752d300b3 (patch) | |
tree | 70bfaea8884c374876f607774850a3a51c0cb381 /node_modules/highlight.js/lib/languages/autohotkey.js | |
parent | aca1143cb9eed16cf37f04e475e4257418dd18ac (diff) | |
download | wallet-core-7a3df06eb573d36142bd1a8e03c5ce8752d300b3.tar.xz |
fix build issues and add typedoc
Diffstat (limited to 'node_modules/highlight.js/lib/languages/autohotkey.js')
-rw-r--r-- | node_modules/highlight.js/lib/languages/autohotkey.js | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/node_modules/highlight.js/lib/languages/autohotkey.js b/node_modules/highlight.js/lib/languages/autohotkey.js new file mode 100644 index 000000000..3c15fc549 --- /dev/null +++ b/node_modules/highlight.js/lib/languages/autohotkey.js @@ -0,0 +1,47 @@ +module.exports = function(hljs) { + var BACKTICK_ESCAPE = { + begin: /`[\s\S]/ + }; + + return { + case_insensitive: true, + keywords: { + keyword: 'Break Continue Else Gosub If Loop Return While', + literal: 'A|0 true false NOT AND OR', + built_in: 'ComSpec Clipboard ClipboardAll ErrorLevel', + }, + contains: [ + { + className: 'built_in', + begin: 'A_[a-zA-Z0-9]+' + }, + BACKTICK_ESCAPE, + hljs.inherit(hljs.QUOTE_STRING_MODE, {contains: [BACKTICK_ESCAPE]}), + hljs.COMMENT(';', '$', {relevance: 0}), + { + className: 'number', + begin: hljs.NUMBER_RE, + relevance: 0 + }, + { + className: 'variable', // FIXME + begin: '%', end: '%', + illegal: '\\n', + contains: [BACKTICK_ESCAPE] + }, + { + className: 'symbol', + 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*,' + } + ] + } +};
\ No newline at end of file |