c667885330d1356c55ad24634ea388fc1c37876b79fe8fd1dce71854a4eaf467.json 16 KB

1
  1. {"ast":null,"code":"/*\nLanguage: Clojure\nDescription: Clojure syntax (based on lisp.js)\nAuthor: mfornos\nWebsite: https://clojure.org\nCategory: lisp\n*/\n\n/** @type LanguageFn */\nfunction clojure(hljs) {\n const SYMBOLSTART = 'a-zA-Z_\\\\-!.?+*=<>&\\'';\n const SYMBOL_RE = '[#]?[' + SYMBOLSTART + '][' + SYMBOLSTART + '0-9/;:$#]*';\n const globals = 'def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord';\n const keywords = {\n $pattern: SYMBOL_RE,\n built_in:\n // Clojure keywords\n globals + ' ' + 'cond apply if-not if-let if not not= =|0 <|0 >|0 <=|0 >=|0 ==|0 +|0 /|0 *|0 -|0 rem ' + 'quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? ' + 'set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? ' + 'class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? ' + 'string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . ' + 'inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last ' + 'drop-while while intern condp case reduced cycle split-at split-with repeat replicate ' + 'iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext ' + 'nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends ' + 'add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler ' + 'set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter ' + 'monitor-exit macroexpand macroexpand-1 for dosync and or ' + 'when when-not when-let comp juxt partial sequence memoize constantly complement identity assert ' + 'peek pop doto proxy first rest cons cast coll last butlast ' + 'sigs reify second ffirst fnext nfirst nnext meta with-meta ns in-ns create-ns import ' + 'refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! ' + 'assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger ' + 'bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline ' + 'flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking ' + 'assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! ' + 'reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! ' + 'new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty ' + 'hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list ' + 'disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer ' + 'chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate ' + 'unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta ' + 'lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize'\n };\n const SYMBOL = {\n begin: SYMBOL_RE,\n relevance: 0\n };\n const NUMBER = {\n scope: 'number',\n relevance: 0,\n variants: [{\n match: /[-+]?0[xX][0-9a-fA-F]+N?/\n },\n // hexadecimal // 0x2a\n {\n match: /[-+]?0[0-7]+N?/\n },\n // octal // 052\n {\n match: /[-+]?[1-9][0-9]?[rR][0-9a-zA-Z]+N?/\n },\n // variable radix from 2 to 36 // 2r101010, 8r52, 36r16\n {\n match: /[-+]?[0-9]+\\/[0-9]+N?/\n },\n // ratio // 1/2\n {\n match: /[-+]?[0-9]+((\\.[0-9]*([eE][+-]?[0-9]+)?M?)|([eE][+-]?[0-9]+M?|M))/\n },\n // float // 0.42 4.2E-1M 42E1 42M\n {\n match: /[-+]?([1-9][0-9]*|0)N?/\n } // int (don't match leading 0) // 42 42N\n ]\n };\n const CHARACTER = {\n scope: 'character',\n variants: [{\n match: /\\\\o[0-3]?[0-7]{1,2}/\n },\n // Unicode Octal 0 - 377\n {\n match: /\\\\u[0-9a-fA-F]{4}/\n },\n // Unicode Hex 0000 - FFFF\n {\n match: /\\\\(newline|space|tab|formfeed|backspace|return)/\n },\n // special characters\n {\n match: /\\\\\\S/,\n relevance: 0\n } // any non-whitespace char\n ]\n };\n const REGEX = {\n scope: 'regex',\n begin: /#\"/,\n end: /\"/,\n contains: [hljs.BACKSLASH_ESCAPE]\n };\n const STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {\n illegal: null\n });\n const COMMA = {\n scope: 'punctuation',\n match: /,/,\n relevance: 0\n };\n const COMMENT = hljs.COMMENT(';', '$', {\n relevance: 0\n });\n const LITERAL = {\n className: 'literal',\n begin: /\\b(true|false|nil)\\b/\n };\n const COLLECTION = {\n begin: \"\\\\[|(#::?\" + SYMBOL_RE + \")?\\\\{\",\n end: '[\\\\]\\\\}]',\n relevance: 0\n };\n const KEY = {\n className: 'symbol',\n begin: '[:]{1,2}' + SYMBOL_RE\n };\n const LIST = {\n begin: '\\\\(',\n end: '\\\\)'\n };\n const BODY = {\n endsWithParent: true,\n relevance: 0\n };\n const NAME = {\n keywords: keywords,\n className: 'name',\n begin: SYMBOL_RE,\n relevance: 0,\n starts: BODY\n };\n const DEFAULT_CONTAINS = [COMMA, LIST, CHARACTER, REGEX, STRING, COMMENT, KEY, COLLECTION, NUMBER, LITERAL, SYMBOL];\n const GLOBAL = {\n beginKeywords: globals,\n keywords: {\n $pattern: SYMBOL_RE,\n keyword: globals\n },\n end: '(\\\\[|#|\\\\d|\"|:|\\\\{|\\\\)|\\\\(|$)',\n contains: [{\n className: 'title',\n begin: SYMBOL_RE,\n relevance: 0,\n excludeEnd: true,\n // we can only have a single title\n endsParent: true\n }].concat(DEFAULT_CONTAINS)\n };\n LIST.contains = [GLOBAL, NAME, BODY];\n BODY.contains = DEFAULT_CONTAINS;\n COLLECTION.contains = DEFAULT_CONTAINS;\n return {\n name: 'Clojure',\n aliases: ['clj', 'edn'],\n illegal: /\\S/,\n contains: [COMMA, LIST, CHARACTER, REGEX, STRING, COMMENT, KEY, COLLECTION, NUMBER, LITERAL]\n };\n}\nmodule.exports = clojure;","map":{"version":3,"names":["clojure","hljs","SYMBOLSTART","SYMBOL_RE","globals","keywords","$pattern","built_in","SYMBOL","begin","relevance","NUMBER","scope","variants","match","CHARACTER","REGEX","end","contains","BACKSLASH_ESCAPE","STRING","inherit","QUOTE_STRING_MODE","illegal","COMMA","COMMENT","LITERAL","className","COLLECTION","KEY","LIST","BODY","endsWithParent","NAME","starts","DEFAULT_CONTAINS","GLOBAL","beginKeywords","keyword","excludeEnd","endsParent","concat","name","aliases","module","exports"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/highlight.js/lib/languages/clojure.js"],"sourcesContent":["/*\nLanguage: Clojure\nDescription: Clojure syntax (based on lisp.js)\nAuthor: mfornos\nWebsite: https://clojure.org\nCategory: lisp\n*/\n\n/** @type LanguageFn */\nfunction clojure(hljs) {\n const SYMBOLSTART = 'a-zA-Z_\\\\-!.?+*=<>&\\'';\n const SYMBOL_RE = '[#]?[' + SYMBOLSTART + '][' + SYMBOLSTART + '0-9/;:$#]*';\n const globals = 'def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord';\n const keywords = {\n $pattern: SYMBOL_RE,\n built_in:\n // Clojure keywords\n globals + ' '\n + 'cond apply if-not if-let if not not= =|0 <|0 >|0 <=|0 >=|0 ==|0 +|0 /|0 *|0 -|0 rem '\n + 'quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? '\n + 'set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? '\n + 'class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? '\n + 'string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . '\n + 'inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last '\n + 'drop-while while intern condp case reduced cycle split-at split-with repeat replicate '\n + 'iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext '\n + 'nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends '\n + 'add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler '\n + 'set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter '\n + 'monitor-exit macroexpand macroexpand-1 for dosync and or '\n + 'when when-not when-let comp juxt partial sequence memoize constantly complement identity assert '\n + 'peek pop doto proxy first rest cons cast coll last butlast '\n + 'sigs reify second ffirst fnext nfirst nnext meta with-meta ns in-ns create-ns import '\n + 'refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! '\n + 'assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger '\n + 'bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline '\n + 'flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking '\n + 'assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! '\n + 'reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! '\n + 'new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty '\n + 'hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list '\n + 'disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer '\n + 'chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate '\n + 'unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta '\n + 'lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize'\n };\n\n const SYMBOL = {\n begin: SYMBOL_RE,\n relevance: 0\n };\n const NUMBER = {\n scope: 'number',\n relevance: 0,\n variants: [\n { match: /[-+]?0[xX][0-9a-fA-F]+N?/ }, // hexadecimal // 0x2a\n { match: /[-+]?0[0-7]+N?/ }, // octal // 052\n { match: /[-+]?[1-9][0-9]?[rR][0-9a-zA-Z]+N?/ }, // variable radix from 2 to 36 // 2r101010, 8r52, 36r16\n { match: /[-+]?[0-9]+\\/[0-9]+N?/ }, // ratio // 1/2\n { match: /[-+]?[0-9]+((\\.[0-9]*([eE][+-]?[0-9]+)?M?)|([eE][+-]?[0-9]+M?|M))/ }, // float // 0.42 4.2E-1M 42E1 42M\n { match: /[-+]?([1-9][0-9]*|0)N?/ }, // int (don't match leading 0) // 42 42N\n ]\n };\n const CHARACTER = {\n scope: 'character',\n variants: [\n { match: /\\\\o[0-3]?[0-7]{1,2}/ }, // Unicode Octal 0 - 377\n { match: /\\\\u[0-9a-fA-F]{4}/ }, // Unicode Hex 0000 - FFFF\n { match: /\\\\(newline|space|tab|formfeed|backspace|return)/ }, // special characters\n {\n match: /\\\\\\S/,\n relevance: 0\n } // any non-whitespace char\n ]\n };\n const REGEX = {\n scope: 'regex',\n begin: /#\"/,\n end: /\"/,\n contains: [ hljs.BACKSLASH_ESCAPE ]\n };\n const STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, { illegal: null });\n const COMMA = {\n scope: 'punctuation',\n match: /,/,\n relevance: 0\n };\n const COMMENT = hljs.COMMENT(\n ';',\n '$',\n { relevance: 0 }\n );\n const LITERAL = {\n className: 'literal',\n begin: /\\b(true|false|nil)\\b/\n };\n const COLLECTION = {\n begin: \"\\\\[|(#::?\" + SYMBOL_RE + \")?\\\\{\",\n end: '[\\\\]\\\\}]',\n relevance: 0\n };\n const KEY = {\n className: 'symbol',\n begin: '[:]{1,2}' + SYMBOL_RE\n };\n const LIST = {\n begin: '\\\\(',\n end: '\\\\)'\n };\n const BODY = {\n endsWithParent: true,\n relevance: 0\n };\n const NAME = {\n keywords: keywords,\n className: 'name',\n begin: SYMBOL_RE,\n relevance: 0,\n starts: BODY\n };\n const DEFAULT_CONTAINS = [\n COMMA,\n LIST,\n CHARACTER,\n REGEX,\n STRING,\n COMMENT,\n KEY,\n COLLECTION,\n NUMBER,\n LITERAL,\n SYMBOL\n ];\n\n const GLOBAL = {\n beginKeywords: globals,\n keywords: {\n $pattern: SYMBOL_RE,\n keyword: globals\n },\n end: '(\\\\[|#|\\\\d|\"|:|\\\\{|\\\\)|\\\\(|$)',\n contains: [\n {\n className: 'title',\n begin: SYMBOL_RE,\n relevance: 0,\n excludeEnd: true,\n // we can only have a single title\n endsParent: true\n }\n ].concat(DEFAULT_CONTAINS)\n };\n\n LIST.contains = [\n GLOBAL,\n NAME,\n BODY\n ];\n BODY.contains = DEFAULT_CONTAINS;\n COLLECTION.contains = DEFAULT_CONTAINS;\n\n return {\n name: 'Clojure',\n aliases: [\n 'clj',\n 'edn'\n ],\n illegal: /\\S/,\n contains: [\n COMMA,\n LIST,\n CHARACTER,\n REGEX,\n STRING,\n COMMENT,\n KEY,\n COLLECTION,\n NUMBER,\n LITERAL\n ]\n };\n}\n\nmodule.exports = clojure;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,OAAOA,CAACC,IAAI,EAAE;EACrB,MAAMC,WAAW,GAAG,uBAAuB;EAC3C,MAAMC,SAAS,GAAG,OAAO,GAAGD,WAAW,GAAG,IAAI,GAAGA,WAAW,GAAG,YAAY;EAC3E,MAAME,OAAO,GAAG,4FAA4F;EAC5G,MAAMC,QAAQ,GAAG;IACfC,QAAQ,EAAEH,SAAS;IACnBI,QAAQ;IACN;IACAH,OAAO,GAAG,GAAG,GACX,sFAAsF,GACtF,kFAAkF,GAClF,uFAAuF,GACvF,uFAAuF,GACvF,uFAAuF,GACvF,sFAAsF,GACtF,wFAAwF,GACxF,0FAA0F,GAC1F,kGAAkG,GAClG,gGAAgG,GAChG,6FAA6F,GAC7F,2DAA2D,GAC3D,kGAAkG,GAClG,6DAA6D,GAC7D,uFAAuF,GACvF,mGAAmG,GACnG,iGAAiG,GACjG,sGAAsG,GACtG,qGAAqG,GACrG,6GAA6G,GAC7G,oHAAoH,GACpH,wGAAwG,GACxG,uHAAuH,GACvH,0HAA0H,GAC1H,mIAAmI,GACnI,6HAA6H,GAC7H;EACN,CAAC;EAED,MAAMI,MAAM,GAAG;IACbC,KAAK,EAAEN,SAAS;IAChBO,SAAS,EAAE;EACb,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CAACV,QAAQ,GAAGiB,gBAAgB;EAEtC,OAAO;IACLO,IAAI,EAAE,SAAS;IACfC,OAAO,EAAE,CACP,KAAK,EACL,KAAK,CACN;IACDpB,OAAO,EAAE,IAAI;IACbL,QAAQ,EAAE,CACRM,KAAK,EACLM,IAAI,EACJf,SAAS,EACTC,KAAK,EACLI,MAAM,EACNK,OAAO,EACPI,GAAG,EACHD,UAAU,EACVjB,MAAM,EACNe,OAAO;EAEX,CAAC;AACH;AAEAkB,MAAM,CAACC,OAAO,GAAG7C,OAAO","ignoreList":[]},"metadata":{},"sourceType":"script","externalDependencies":[]}