]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/hy.js
1 /*! `hy` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar
= (function () {
7 Description: Hy is a wonderful dialect of Lisp that’s embedded in Python.
8 Author: Sergey Sobko <s.sobko@profitware.ru>
9 Website: http://docs.hylang.org/en/stable/
14 const SYMBOLSTART
= 'a-zA-Z_\\-!.?+*=<>&#\'';
15 const SYMBOL_RE
= '[' + SYMBOLSTART
+ '][' + SYMBOLSTART
+ '0-9/;:]*';
20 '!= % %= & &= * ** **= *= *map '
21 + '+ += , --build-class-- --import-- -= . / // //= '
22 + '/= < << <<= <= = > >= >> >>= '
23 + '@ @= ^ ^= abs accumulate all and any ap-compose '
24 + 'ap-dotimes ap-each ap-each-while ap-filter ap-first ap-if ap-last ap-map ap-map-when ap-pipe '
25 + 'ap-reduce ap-reject apply as-> ascii assert assoc bin break butlast '
26 + 'callable calling-module-name car case cdr chain chr coll? combinations compile '
27 + 'compress cond cons cons? continue count curry cut cycle dec '
28 + 'def default-method defclass defmacro defmacro-alias defmacro/g! defmain defmethod defmulti defn '
29 + 'defn-alias defnc defnr defreader defseq del delattr delete-route dict-comp dir '
30 + 'disassemble dispatch-reader-macro distinct divmod do doto drop drop-last drop-while empty? '
31 + 'end-sequence eval eval-and-compile eval-when-compile even? every? except exec filter first '
32 + 'flatten float? fn fnc fnr for for* format fraction genexpr '
33 + 'gensym get getattr global globals group-by hasattr hash hex id '
34 + 'identity if if* if-not if-python2 import in inc input instance? '
35 + 'integer integer-char? integer? interleave interpose is is-coll is-cons is-empty is-even '
36 + 'is-every is-float is-instance is-integer is-integer-char is-iterable is-iterator is-keyword is-neg is-none '
37 + 'is-not is-numeric is-odd is-pos is-string is-symbol is-zero isinstance islice issubclass '
38 + 'iter iterable? iterate iterator? keyword keyword? lambda last len let '
39 + 'lif lif-not list* list-comp locals loop macro-error macroexpand macroexpand-1 macroexpand-all '
40 + 'map max merge-with method-decorator min multi-decorator multicombinations name neg? next '
41 + 'none? nonlocal not not-in not? nth numeric? oct odd? open '
42 + 'or ord partition permutations pos? post-route postwalk pow prewalk print '
43 + 'product profile/calls profile/cpu put-route quasiquote quote raise range read read-str '
44 + 'recursive-replace reduce remove repeat repeatedly repr require rest round route '
45 + 'route-with-methods rwm second seq set-comp setattr setv some sorted string '
46 + 'string? sum switch symbol? take take-nth take-while tee try unless '
47 + 'unquote unquote-splicing vars walk when while with with* with-decorator with-gensyms '
48 + 'xi xor yield yield-from zero? zip zip-longest | |= ~'
51 const SIMPLE_NUMBER_RE
= '[-+]?\\d+(\\.\\d+)?';
59 begin: SIMPLE_NUMBER_RE
,
62 const STRING
= hljs
.inherit(hljs
.QUOTE_STRING_MODE
, { illegal: null });
63 const COMMENT
= hljs
.COMMENT(
70 begin: /\b([Tt]rue|[Ff]alse|nil|None)\b/
79 begin: '\\^' + SYMBOL_RE
81 const HINT_COL
= hljs
.COMMENT('\\^\\{', '\\}');
84 begin: '[:]{1,2}' + SYMBOL_RE
101 const DEFAULT_CONTAINS
= [
115 hljs
.COMMENT('comment', ''),
119 BODY
.contains
= DEFAULT_CONTAINS
;
120 COLLECTION
.contains
= DEFAULT_CONTAINS
;
124 aliases: [ 'hylang' ],
145 export default hljsGrammar
;