;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\207" [require dash s] 2) #@115 Wrap TEXT with the prefered quotes. The prefered quotes is set with `js2r-prefered-quote-type'. (fn &rest TEXT) (defalias 'js2r--wrap-text #[128 "\301\302U\203\n\303\262\211\304\305\"Q\207" [js2r-prefered-quote-type "\"" 2 "'" apply concat] 6 (#$ . 148)]) #@12 (fn KEY) (defalias 'js2r--fix-special-modifier-combinations #[257 "\300\301\302!\303\304!\305!$\207" [case "C-s-i" "s-TAB" "C-s-m" "s-RET" otherwise] 7 (#$ . 417)]) #@22 (fn MODIFIER KEYS) (defalias 'js2r--key-pairs-with-modifier #[514 "\300\301\302\303\304\305\"\306\307\"\262\"\"!\207" [read-kbd-macro s-join " " mapcar make-closure #[257 "\301\300\302!P!\207" [V0 js2r--fix-special-modifier-combinations char-to-string] 5 "\n\n(fn IT)"] append nil] 11 (#$ . 592)]) #@20 (fn PREFIX KEYS) (defalias 'js2r--key-pairs-with-prefix #[514 "\300\301Q!\207" [read-kbd-macro " "] 6 (#$ . 904)]) (defalias 'js2r--guard #[0 "\205\301\302!\207" [js2-parsed-errors error "Can't refactor while buffer has parse errors"] 2]) #@46 The char that is the current quote delimiter (defalias 'js2r--current-quotes-char #[0 "\300\301 8\207" [3 syntax-ppss] 2 (#$ . 1156)]) (defalias 'js2r--point-inside-string-p 'js2r--current-quotes-char) #@15 (fn P NODE) (defalias 'js2r--closest-node-where #[514 "\211\203\n!\203 \207\301\302!>\204\303\304\305D\"\210\306H\"\207" [cl-struct-js2-node-tags js2r--closest-node-where type-of signal wrong-type-argument js2-node 5] 8 (#$ . 1364)]) #@10 (fn P) (defalias 'js2r--closest #[257 "\212n\203 \300 \210\202,\301\302!\203\303u\210\202,\304\302!\203#\305u\210\202,\304\306!\203,\303u\210\307\310 \")\207" [back-to-indentation looking-at ";" -1 looking-back -2 "}" js2r--closest-node-where js2-node-at-point] 4 (#$ . 1617)]) #@13 (fn NODE) (defalias 'js2r--goto-and-delete-node #[257 "\301!b\210\302\303!>\204\304\305\306D\"\210\307H!\207" [cl-struct-js2-node-tags js2-node-abs-pos delete-char type-of signal wrong-type-argument js2-node 3] 6 (#$ . 1912)]) #@13 (fn NODE) (defalias 'js2r--path-to-root #[257 "\211\205\211\301\302!>\204\303\304\305D\"\210\306H!B\207" [cl-struct-js2-node-tags js2r--path-to-root type-of signal wrong-type-argument js2-node 5] 7 (#$ . 2154)]) #@20 (fn NODE1 NODE2) (defalias 'js2r--first-common-ancestor #[514 "=\203\207\300\301!!\300\301!!\302@@=\203*@\262A\262A\262\202\207" [reverse js2r--path-to-root nil] 7 (#$ . 2382)]) #@16 (fn BEG END) (defalias 'js2r--first-common-ancestor-in-region #[514 "\300\301!\301!\"\207" [js2r--first-common-ancestor js2-node-at-point] 6 (#$ . 2586)]) #@13 (fn NODE) (defalias 'js2r--node-target #[257 "\302!>\203\302!>\204\303\304\305D\"\210\211\306H\207\302! >\2036\302! >\2042\303\304\307D\"\210\211\306H\207\310\207" [cl-struct-js2-call-node-tags cl-struct-js2-new-node-tags type-of signal wrong-type-argument js2-call-node 6 js2-new-node nil] 5 (#$ . 2751)]) #@13 (fn NODE) (defalias 'js2r--node-args #[257 "\302!>\203\302!>\204\303\304\305D\"\210\211\306H\207\302! >\2036\302! >\2042\303\304\307D\"\210\211\306H\207\310\207" [cl-struct-js2-call-node-tags cl-struct-js2-new-node-tags type-of signal wrong-type-argument js2-call-node 7 js2-new-node nil] 5 (#$ . 3080)]) #@13 (fn NODE) (defalias 'js2r--node-lp #[257 "\302!>\203\302!>\204\303\304\305D\"\210\211\306H\207\302! >\2036\302! >\2042\303\304\307D\"\210\211\306H\207\310\207" [cl-struct-js2-call-node-tags cl-struct-js2-new-node-tags type-of signal wrong-type-argument js2-call-node 8 js2-new-node nil] 5 (#$ . 3407)]) #@13 (fn NODE) (defalias 'js2r--node-rp #[257 "\302!>\203\302!>\204\303\304\305D\"\210\211\306H\207\302! >\2036\302! >\2042\303\304\307D\"\210\211\306H\207\310\207" [cl-struct-js2-call-node-tags cl-struct-js2-new-node-tags type-of signal wrong-type-argument js2-call-node 9 js2-new-node nil] 5 (#$ . 3732)]) #@13 (fn NODE) (defalias 'js2r--node-kids #[257 "\306!>\203O\306\211!>\204\307\310\311D\"\210\312H! >\204:\307\310\313\306!>\2044\307\310\311D\"\210\312HD\"\210\306!>\204I\307\310\311D\"\210\211\312H\314H\207\306!\n>\203\236\306\211!\n>\204g\307\310\315D\"\210\316H! >\204\211\307\310\317\306!\n>\204\203\307\310\315D\"\210\316HD\"\210\306!\n>\204\230\307\310\315D\"\210\211\316H\314H\207\306!\f>\203\355\306\211!\f>\204\266\307\310\320D\"\210\321H! >\204\330\307\310\313\306!\f>\204\322\307\310\320D\"\210\321HD\"\210\306!\f>\204\347\307\310\320D\"\210\211\321H\314H\207\306! >\205;\306\211! >\204\307\310\322D\"\210\321H! >\204'\307\310\313\306! >\204!\307\310\322D\"\210\321HD\"\210\306! >\2046\307\310\322D\"\210\211\321H\314H\207" [cl-struct-js2-function-node-tags cl-struct-js2-block-node-tags cl-struct-js2-if-node-tags cl-struct-js2-scope-tags cl-struct-js2-for-node-tags cl-struct-js2-while-node-tags type-of signal wrong-type-argument js2-function-node 22 js2-block-node 6 js2-if-node 7 js2-scope js2-for-node 10 js2-while-node] 8 (#$ . 4057)]) #@206 Return the most appropriate node the be extracted into a variable or paramter. Lookup the closest expression node from the point, or the closest literal node instead. If no node is found, signal an error. (defalias 'js2r--closest-extractable-node #[0 "\300\301!\206\300\302!\206\303\304!\207" [js2r--closest js2r--expression-p js2r--literal-node-p error "Cannot perform refactoring: Nothing to extract at point"] 2 (#$ . 5182)]) #@187 Return the closest standalone statement node. Special care is taken for if branch nodes: if a statement node is part of an if branch node (like 'else if' nodes), return the parent node. (defalias 'js2r--closest-stmt-node #[0 "\302\303 !\304!>\204\305\306\307D\"\210\211\310H\304! >\203'\304! >\203'\207\207" [cl-struct-js2-node-tags cl-struct-js2-if-node-tags js2-node-parent-stmt js2-node-at-point type-of signal wrong-type-argument js2-node 5] 5 (#$ . 5622)]) #@13 (fn NODE) (defalias 'js2r--argument-p #[257 "\302!>\204\303\304\305D\"\210\211\306H\302! >\205.\302! >\204*\303\304\307D\"\210\310H\235\207" [cl-struct-js2-node-tags cl-struct-js2-call-node-tags type-of signal wrong-type-argument js2-node 5 js2-call-node 7] 7 (#$ . 6100)]) #@13 (fn NODE) (defalias 'js2r--expression-p #[257 "\303!>\203\n\304\207\305!\2063\303! >\2053\303\211!\n>\204(\306\307\310D\"\210\311H!>\2052\304?\207" [cl-struct-js2-call-node-tags cl-struct-js2-prop-get-node-tags cl-struct-js2-node-tags type-of t js2r--argument-p signal wrong-type-argument js2-node 5] 6 (#$ . 6394)]) #@13 (fn NODE) (defalias 'js2r--literal-node-p #[257 "\303!>\203\n\304\207\303! >\203\304\207\303!\n>\203\304\207\305!\207" [cl-struct-js2-object-node-tags cl-struct-js2-string-node-tags cl-struct-js2-number-node-tags type-of t js2r--boolean-node-p] 3 (#$ . 6732)]) #@13 (fn NODE) (defalias 'js2r--boolean-node-p #[257 "\302!\302!\303!>\204\304\305\306D\"\210\307H\\\262{\303! >\205*\211\310\235\207" [cl-struct-js2-node-tags cl-struct-js2-keyword-node-tags js2-node-abs-pos type-of signal wrong-type-argument js2-node 3 ("true" "false")] 8 (#$ . 7011)]) #@16 (fn BEG END) (defalias 'js2r--single-complete-expression-between-p #[514 "\301S\"\302!U\205(\302!\303!>\204!\304\305\306D\"\210\307H\\\262U\207" [cl-struct-js2-node-tags js2r--first-common-ancestor-in-region js2-node-abs-pos type-of signal wrong-type-argument js2-node 3] 10 (#$ . 7317)]) #@24 (fn CHANGE1 CHANGE2) (defalias 'js2r--by-end-descending #[514 "\300\301\"\300\301\"V\207" [plist-get :end] 6 (#$ . 7628)]) #@23 (fn SORTED-CHANGES) (defalias 'js2r--any-overlapping-changes #[257 "\300\301\302\303#\304\300\211\211\203C\211A\262\242\262\262\211\262\203C@A@\305\306\"\305\307\"W\266\202\211\262\204C\262\262T\262\202\n\266\211\262\205L\310\207" [nil -partition-in-steps 2 1 0 plist-get :beg :end t] 13 (#$ . 7761)]) #@16 (fn CHANGES) (defalias 'js2r--execute-changes #[257 "\211\205d\300\301\"\302!\203\303\304!\210\305 \306@\307\"T\310\223\306\311!@\312\"\313\310\211\203U\211A\262\242\262\262T\262\306\312\"b\210\314\306\307\"\306\312\"Z!\210\306\315\"c\210\202'\266\316\"\210\310\211\223\266\202\262\207" [sort js2r--by-end-descending js2r--any-overlapping-changes error "These changes overlap, cannot execute properly." make-marker plist-get :end nil last :beg 0 delete-char :contents indent-region] 13 (#$ . 8098)]) (provide 'js2r-helpers)