1 |
- {"version":3,"file":"mode-clojure-a9c3bb54.js","sources":["../../node_modules/ace-builds/src-noconflict/mode-clojure.js"],"sourcesContent":["ace.define(\"ace/mode/clojure_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar ClojureHighlightRules = function () {\n var builtinFunctions = ('* *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* ' +\n '*command-line-args* *compile-files* *compile-path* *e *err* *file* ' +\n '*flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* ' +\n '*print-dup* *print-length* *print-level* *print-meta* *print-readably* ' +\n '*read-eval* *source-path* *use-context-classloader* ' +\n '*warn-on-reflection* + - -> ->> .. / < <= = ' +\n '== > > >= >= accessor aclone ' +\n 'add-classpath add-watch agent agent-errors aget alength alias all-ns ' +\n 'alter alter-meta! alter-var-root amap ancestors and apply areduce ' +\n 'array-map aset aset-boolean aset-byte aset-char aset-double aset-float ' +\n 'aset-int aset-long aset-short assert assoc assoc! assoc-in associative? ' +\n 'atom await await-for await1 bases bean bigdec bigint binding bit-and ' +\n 'bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left ' +\n 'bit-shift-right bit-test bit-xor boolean boolean-array booleans ' +\n 'bound-fn bound-fn* butlast byte byte-array bytes cast char char-array ' +\n 'char-escape-string char-name-string char? chars chunk chunk-append ' +\n 'chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? ' +\n 'class class? clear-agent-errors clojure-version coll? comment commute ' +\n 'comp comparator compare compare-and-set! compile complement concat cond ' +\n 'condp conj conj! cons constantly construct-proxy contains? count ' +\n 'counted? create-ns create-struct cycle dec decimal? declare definline ' +\n 'defmacro defmethod defmulti defn defn- defonce defstruct delay delay? ' +\n 'deliver deref derive descendants destructure disj disj! dissoc dissoc! ' +\n 'distinct distinct? doall doc dorun doseq dosync dotimes doto double ' +\n 'double-array doubles drop drop-last drop-while empty empty? ensure ' +\n 'enumeration-seq eval even? every? false? ffirst file-seq filter find ' +\n 'find-doc find-ns find-var first float float-array float? floats flush ' +\n 'fn fn? fnext for force format future future-call future-cancel ' +\n 'future-cancelled? future-done? future? gen-class gen-interface gensym ' +\n 'get get-in get-method get-proxy-class get-thread-bindings get-validator ' +\n 'hash hash-map hash-set identical? identity if-let if-not ifn? import ' +\n 'in-ns inc init-proxy instance? int int-array integer? interleave intern ' +\n 'interpose into into-array ints io! isa? iterate iterator-seq juxt key ' +\n 'keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list ' +\n 'list* list? load load-file load-reader load-string loaded-libs locking ' +\n 'long long-array longs loop macroexpand macroexpand-1 make-array ' +\n 'make-hierarchy map map? mapcat max max-key memfn memoize merge ' +\n 'merge-with meta method-sig methods min min-key mod name namespace neg? ' +\n 'newline next nfirst nil? nnext not not-any? not-empty not-every? not= ' +\n 'ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ' +\n 'ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? ' +\n 'or parents partial partition pcalls peek persistent! pmap pop pop! ' +\n 'pop-thread-bindings pos? pr pr-str prefer-method prefers ' +\n 'primitives-classnames print print-ctor print-doc print-dup print-method ' +\n 'print-namespace-doc print-simple print-special-doc print-str printf ' +\n 'println println-str prn prn-str promise proxy proxy-call-with-super ' +\n 'proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot ' +\n 'rand rand-int range ratio? rational? rationalize re-find re-groups ' +\n 're-matcher re-matches re-pattern re-seq read read-line read-string ' +\n 'reduce ref ref-history-count ref-max-history ref-min-history ref-set ' +\n 'refer refer-clojure release-pending-sends rem remove remove-method ' +\n 'remove-ns remove-watch repeat repeatedly replace replicate require ' +\n 'reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq ' +\n 'rsubseq second select-keys send send-off seq seq? seque sequence ' +\n 'sequential? set set-validator! set? short short-array shorts ' +\n 'shutdown-agents slurp some sort sort-by sorted-map sorted-map-by ' +\n 'sorted-set sorted-set-by sorted? special-form-anchor special-symbol? ' +\n 'split-at split-with str stream? string? struct struct-map subs subseq ' +\n 'subvec supers swap! symbol symbol? sync syntax-symbol-anchor take ' +\n 'take-last take-nth take-while test the-ns time to-array to-array-2d ' +\n 'trampoline transient tree-seq true? type unchecked-add unchecked-dec ' +\n 'unchecked-divide unchecked-inc unchecked-multiply unchecked-negate ' +\n 'unchecked-remainder unchecked-subtract underive unquote ' +\n 'unquote-splicing update-in update-proxy use val vals var-get var-set ' +\n 'var? vary-meta vec vector vector? when when-first when-let when-not ' +\n 'while with-bindings with-bindings* with-in-str with-loading-context ' +\n 'with-local-vars with-meta with-open with-out-str with-precision xml-seq ' +\n 'zero? zipmap');\n var keywords = ('throw try var ' +\n 'def do fn if let loop monitor-enter monitor-exit new quote recur set!');\n var buildinConstants = (\"true false nil\");\n var keywordMapper = this.createKeywordMapper({\n \"keyword\": keywords,\n \"constant.language\": buildinConstants,\n \"support.function\": builtinFunctions\n }, \"identifier\", false, \" \");\n this.$rules = {\n \"start\": [\n {\n token: \"comment\",\n regex: \";.*$\"\n }, {\n token: \"keyword\",\n regex: \"[\\\\(|\\\\)]\"\n }, {\n token: \"keyword\",\n regex: \"[\\\\'\\\\(]\"\n }, {\n token: \"keyword\",\n regex: \"[\\\\[|\\\\]]\"\n }, {\n token: \"string.regexp\",\n regex: '#\"',\n next: \"regex\"\n }, {\n token: \"keyword\",\n regex: \"[\\\\{|\\\\}|\\\\#\\\\{|\\\\#\\\\}]\"\n }, {\n token: \"keyword\",\n regex: '[\\\\&]'\n }, {\n token: \"keyword\",\n regex: '[\\\\#\\\\^\\\\{]'\n }, {\n token: \"keyword\",\n regex: '[\\\\%]'\n }, {\n token: \"keyword\",\n regex: '[@]'\n }, {\n token: \"constant.numeric\",\n regex: \"0[xX][0-9a-fA-F]+\\\\b\"\n }, {\n token: \"constant.numeric\",\n regex: \"[+-]?\\\\d+(?:(?:\\\\.\\\\d*)?(?:[eE][+-]?\\\\d+)?)?\\\\b\"\n }, {\n token: \"constant.language\",\n regex: '[!|\\\\$|%|&|\\\\*|\\\\-\\\\-|\\\\-|\\\\+\\\\+|\\\\+||=|!=|<=|>=|<>|<|>|!|&&]'\n }, {\n token: keywordMapper,\n regex: \"[a-zA-Z_$][a-zA-Z0-9_$\\\\-]*\\\\b\"\n }, {\n token: \"string\",\n regex: '\"',\n next: \"string\"\n }, {\n token: \"constant\",\n regex: /:[^()\\[\\]{}'\"\\^%`,;\\s]+/\n }\n ],\n \"string\": [\n {\n token: \"constant.language.escape\",\n regex: \"\\\\\\\\.|\\\\\\\\$\"\n }, {\n token: \"string\",\n regex: '\"',\n next: \"start\"\n }, {\n defaultToken: \"string\"\n }\n ],\n \"regex\": [\n {\n token: \"regexp.keyword.operator\",\n regex: \"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"\n }, {\n token: \"string.regexp\",\n regex: '\"',\n next: \"start\"\n }, {\n token: \"constant.language.escape\",\n regex: /\\(\\?[:=!]|\\)|\\{\\d+\\b,?\\d*\\}|[+*]\\?|[()$^+*?.]/\n }, {\n token: \"constant.language.delimiter\",\n regex: /\\|/\n }, {\n token: \"constant.language.escape\",\n regex: /\\[\\^?/,\n next: \"regex_character_class\"\n }, {\n defaultToken: \"string.regexp\"\n }\n ],\n \"regex_character_class\": [\n {\n token: \"regexp.charclass.keyword.operator\",\n regex: \"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"\n }, {\n token: \"constant.language.escape\",\n regex: \"]\",\n next: \"regex\"\n }, {\n token: \"constant.language.escape\",\n regex: \"-\"\n }, {\n defaultToken: \"string.regexp.charachterclass\"\n }\n ]\n };\n};\noop.inherits(ClojureHighlightRules, TextHighlightRules);\nexports.ClojureHighlightRules = ClojureHighlightRules;\n\n});\n\nace.define(\"ace/mode/matching_parens_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(require, exports, module){\"use strict\";\nvar Range = require(\"../range\").Range;\nvar MatchingParensOutdent = function () { };\n(function () {\n this.checkOutdent = function (line, input) {\n if (!/^\\s+$/.test(line))\n return false;\n return /^\\s*\\)/.test(input);\n };\n this.autoOutdent = function (doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\))/);\n if (!match)\n return 0;\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({ row: row, column: column });\n if (!openBracePos || openBracePos.row == row)\n return 0;\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column - 1), indent);\n };\n this.$getIndent = function (line) {\n var match = line.match(/^(\\s+)/);\n if (match) {\n return match[1];\n }\n return \"\";\n };\n}).call(MatchingParensOutdent.prototype);\nexports.MatchingParensOutdent = MatchingParensOutdent;\n\n});\n\nace.define(\"ace/mode/clojure\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/clojure_highlight_rules\",\"ace/mode/matching_parens_outdent\"], function(require, exports, module){\"use strict\";\nvar oop = require(\"../lib/oop\");\nvar TextMode = require(\"./text\").Mode;\nvar ClojureHighlightRules = require(\"./clojure_highlight_rules\").ClojureHighlightRules;\nvar MatchingParensOutdent = require(\"./matching_parens_outdent\").MatchingParensOutdent;\nvar Mode = function () {\n this.HighlightRules = ClojureHighlightRules;\n this.$outdent = new MatchingParensOutdent();\n this.$behaviour = this.$defaultBehaviour;\n};\noop.inherits(Mode, TextMode);\n(function () {\n this.lineCommentStart = \";\";\n this.minorIndentFunctions = [\"defn\", \"defn-\", \"defmacro\", \"def\", \"deftest\", \"testing\"];\n this.$toIndent = function (str) {\n return str.split('').map(function (ch) {\n if (/\\s/.exec(ch)) {\n return ch;\n }\n else {\n return ' ';\n }\n }).join('');\n };\n this.$calculateIndent = function (line, tab) {\n var baseIndent = this.$getIndent(line);\n var delta = 0;\n var isParen, ch;\n for (var i = line.length - 1; i >= 0; i--) {\n ch = line[i];\n if (ch === '(') {\n delta--;\n isParen = true;\n }\n else if (ch === '(' || ch === '[' || ch === '{') {\n delta--;\n isParen = false;\n }\n else if (ch === ')' || ch === ']' || ch === '}') {\n delta++;\n }\n if (delta < 0) {\n break;\n }\n }\n if (delta < 0 && isParen) {\n i += 1;\n var iBefore = i;\n var fn = '';\n while (true) {\n ch = line[i];\n if (ch === ' ' || ch === '\\t') {\n if (this.minorIndentFunctions.indexOf(fn) !== -1) {\n return this.$toIndent(line.substring(0, iBefore - 1) + tab);\n }\n else {\n return this.$toIndent(line.substring(0, i + 1));\n }\n }\n else if (ch === undefined) {\n return this.$toIndent(line.substring(0, iBefore - 1) + tab);\n }\n fn += line[i];\n i++;\n }\n }\n else if (delta < 0 && !isParen) {\n return this.$toIndent(line.substring(0, i + 1));\n }\n else if (delta > 0) {\n baseIndent = baseIndent.substring(0, baseIndent.length - tab.length);\n return baseIndent;\n }\n else {\n return baseIndent;\n }\n };\n this.getNextLineIndent = function (state, line, tab) {\n return this.$calculateIndent(line, tab);\n };\n this.checkOutdent = function (state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n this.autoOutdent = function (state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n this.$id = \"ace/mode/clojure\";\n this.snippetFileId = \"ace/snippets/clojure\";\n}).call(Mode.prototype);\nexports.Mode = Mode;\n\n}); (function() {\n ace.require([\"ace/mode/clojure\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n "],"names":["require","exports","module","oop","TextHighlightRules","ClojureHighlightRules","builtinFunctions","keywords","buildinConstants","keywordMapper","Range","MatchingParensOutdent","line","input","doc","row","match","column","openBracePos","indent","TextMode","Mode","str","ch","tab","baseIndent","delta","isParen","i","iBefore","fn","state","m"],"mappings":"gaAAA,IAAI,OAAO,mCAAmC,CAAC,UAAU,UAAU,SAAS,cAAc,+BAA+B,EAAG,SAASA,EAASC,EAASC,EAAO,CA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