;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\207" [require a cl-lib parseclj-parser] 2) #@311 Default reader functions for handling tagged literals in EDN. These are the ones defined in the EDN spec, #inst and #uuid. It is not recommended you change this variable, as this globally changes the behavior of the EDN reader. Instead pass your own handlers as an optional argument to the reader functions. (defvar parseedn-default-tag-readers (a-list 'inst #[257 "\300\301!B\207" [edn-inst date-to-time] 4 "\n\n(fn S)"] 'uuid #[257 "\300D\207" [edn-uuid] 3 "\n\n(fn S)"]) (#$ . 179)) #@177 Put in the STACK an elisp value representing TOKEN. OPTIONS is an association list. See `parseclj-parse' for more information on available options. (fn STACK TOKEN OPTIONS) (defalias 'parseedn-reduce-leaf #[771 "\300!\301\302D\235\203\f\207\303!B\207" [parseclj-lex-token-type :whitespace :comment parseclj-lex--leaf-token-value] 6 (#$ . 676)]) #@397 Reduce STACK with an sequence containing a collection of other elisp values. Ignores discard tokens. OPENING-TOKEN is a lex token representing an opening paren, bracket or brace. CHILDREN is a collection elisp values to be reduced into an elisp sequence. OPTIONS is an association list. See `parseclj-parse' for more information on available options. (fn STACK OPENING-TOKEN CHILDREN OPTIONS) (defalias 'parseedn-reduce-branch #[1028 "\301\302\303\"\"\304!\211\305=\203\207\211\306\267\202m\202n\202n\307\310\"\202n\311D\202n\312\313\"\314\315\316\317G$\320\321\322\"\"\210\262\202n\323\302\324\"\325\326O!\302\327#\211\327=\203c\330\331\332!#\210\211@!\266\202\202n\326B\207" [parseedn-default-tag-readers a-merge a-get :tag-readers parseclj-lex-token-type :discard #s(hash-table size 6 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (:root 24 :lparen 28 :lbracket 32 :set 39 :lbrace 45 :tag 69)) apply vector edn-set seq-partition 2 make-hash-table :test equal :size seq-do make-closure #[257 "\301@A@\300#\207" [V0 puthash] 5 "\n\n(fn PAIR)"] intern :form 1 nil :missing user-error "No reader for tag #%S in %S" a-keys] 13 (#$ . 1036)]) #@326 Read content from current buffer and parse it as EDN source. Returns an Emacs Lisp value. TAG-READERS is an optional association list where keys are symbols identifying *tags*, and values are tag handler functions that receive one argument: *the tagged element*, and specify how to interpret it. (fn &optional TAG-READERS) (defalias 'parseedn-read #[256 "\300\301\302\303\304\"#\207" [parseclj-parser parseedn-reduce-leaf parseedn-reduce-branch a-list :tag-readers] 7 (#$ . 2239)]) #@173 Parse string S as EDN. Returns an Emacs Lisp value. TAG-READERS is an optional association list. For more information, see `parseedn-read'. (fn S &optional TAG-READERS) (defalias 'parseedn-read-str #[513 "\300\301\302\"r\211q\210\303\304\"\216c\210\305b\210\306!@*\207" [generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] 1 parseedn-read] 6 (#$ . 2731)]) #@65 Insert sequence COLL as EDN into the current buffer. (fn COLL) (defalias 'parseedn-print-seq #[257 "\300\301\234!\210\302\303\"\304!?\205\305c\210\306!\207" [parseedn-print 0 seq-drop 1 seq-empty-p " " parseedn-print-seq] 4 (#$ . 3159)]) #@101 Insert hash table MAP or elisp a-list as an EDN map into the current buffer. (fn MAP &optional KS) (defalias 'parseedn-print-hash-or-alist #[513 "\211\206\300!\301@!\210\302c\210\301\303@\"!\210\211A\304!?\205'\305c\210\306\"\207" [a-keys parseedn-print " " a-get seq-empty-p ", " parseedn-print-hash-or-alist] 7 (#$ . 3411)]) #@82 Insert an elisp property list as an EDN map into the current buffer. (fn PLIST) (defalias 'parseedn-print-plist #[257 "\300@!\210\301c\210\300A@!\210\211AA\302!?\205\303c\210\304!\207" [parseedn-print " " seq-empty-p ", " parseedn-print-plist] 4 (#$ . 3755)]) #@71 Non-null if and only if LIST is an alist with simple keys. (fn LIST) (defalias 'parseedn-alist-p #[257 "\211:\203\211@:\203\211@@:\204\211A\202\300\262\202\211?\207" [not-alist] 2 (#$ . 4028)]) #@71 Non-null if and only if LIST is a plist with keyword keys. (fn LIST) (defalias 'parseedn-plist-p #[257 "\211:\203\300@!\203\211A:\203\211AA\202\301\262\202\211?\207" [keywordp not-plist] 3 (#$ . 4240)]) #@93 Insert DATUM as EDN into the current buffer. DATUM can be any Emacs Lisp value. (fn DATUM) (defalias 'parseedn-print #[257 "\211\203 \211\247\203\300p\"\207\211;\203\301c\210\302\303\"\210\301c\207\211\304=\203'\305c\207\306!\2042\2119\2037\307!c\207\310!\203G\311c\210\312!\210\313c\207\314!\204S\315!\203]\316c\210\317!\210\320c\207\321!\203m\316c\210\322!\210\320c\207\211:\203\232\211A<\204}\323\324\"\207\211@\325=\203\220\326c\210\312A@!\210\320c\207\327c\210\312!\210\330c\207\323\324\"\207" [prin1 "\"" seq-do #[257 "\211\300\267\202\301\202!\302\202!\303\202!\304\202!\305\202!\306\202!\307!c\207" [#s(hash-table size 6 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (9 6 12 10 34 14 13 18 10 22 92 26)) "\\t" "\\f" "\\\"" "\\r" "\\n" "\\\\" char-to-string] 3 "\n\n(fn CHAR)"] t "true" keywordp symbol-name vectorp "[" parseedn-print-seq "]" hash-table-p parseedn-alist-p "{" parseedn-print-hash-or-alist "}" parseedn-plist-p parseedn-print-plist error "Don't know how to print: %s" edn-set "#{" "(" ")"] 4 (#$ . 4462)]) #@89 Return a string containing DATUM as EDN. DATUM can be any Emacs Lisp value. (fn DATUM) (defalias 'parseedn-print-str #[257 "\300\301\302\"r\211q\210\303\304\"\216\305!\210\306ed\"*\207" [generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] parseedn-print buffer-substring-no-properties] 5 (#$ . 5555)]) (provide 'parseedn)