I hereby claim:
- I am oakmac on github.
- I am oakmac (https://keybase.io/oakmac) on keybase.
- I have a public key ASBq3O96XUXHblMPchU-ST63SOPAvBVkY_7X1GubvsVLuwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<script> | |
(function() { | |
var useDevScript = (document.location.search.indexOf('devscript=true') !== -1); | |
var src = useDevScript ? 'js/FULL-VERSION.js' : 'js/MINIFIED-VERSION.js'; | |
var scriptEl = document.createElement('script'); | |
scriptEl.type = 'text/javascript'; | |
scriptEl.src = src; | |
var s = document.getElementsByTagName('script')[0]; | |
s.parentNode.insertBefore(scriptEl, s); | |
})(); |
;; var aphrodite = require('aphrodite'); | |
(def js-aphrodite (js/require "aphrodite")) | |
;; aphrodite.StyleSheet.extend([foo, bar]); | |
(defn aphrodite-extend [args] | |
(apply (aget js-aphrodite "StyleSheet" "extend") args)) |
use std::collections::HashMap; | |
static PARENS: HashMap = HashMap::new(); | |
PARENS.insert("{", "}"); | |
PARENS.insert("}", "{"); | |
PARENS.insert("[", "]"); | |
PARENS.insert("]", "["); | |
PARENS.insert("(", ")"); | |
PARENS.insert(")", "("); |
static PARENS: HashMap = HashMap::new(); | |
fn set_parens() { | |
PARENS.insert("{", "}"); | |
PARENS.insert("}", "{"); | |
PARENS.insert("[", "]"); | |
PARENS.insert("]", "["); | |
PARENS.insert("(", ")"); | |
PARENS.insert(")", "("); | |
} |
diff --git a/parinferlib.el b/parinferlib.el | |
index f5ddd7d..fa694fb 100644 | |
--- a/parinferlib.el | |
+++ b/parinferlib.el | |
@@ -627,15 +627,14 @@ | |
(defun parinferlib--init-indent (result) | |
(let ((mode (gethash :mode result)) | |
(in-str? (gethash :isInStr result))) | |
- (case mode | |
- ((:indent) |
;; JS: | |
;; $('html,body').animate({ scrollTop: element.offset().top }, 'slow'); | |
(def $ js/jQuery) | |
(let [js-anim-dest (js-obj "scrollTop" (aget (.offset element) "top"))]) | |
(.animate ($ "html,body") js-anim-dest "slow") | |
(let [a (:a my-map) | |
b (:b my-map) | |
c (:c my-map)] | |
(do-a-thing a b c)) |
(when js/webRequest | |
;; code that references webRequest goes here | |
) |
oakmac@oakmac-desktop:~/parinfer/lib$ node test/perf.js | |
Processing long_map_with_strings : 303 lines, 4380 chars | |
indent: 8.528ms | |
paren: 4.110ms | |
Processing really_long_file : 2865 lines, 112431 chars | |
indent: 11.779ms | |
paren: 17.577ms | |
Processing really_long_file_with_unclosed_paren : 2865 lines, 112432 chars |