UNPKG

@atomist/clj-editors

Version:

We build a node module `@atomist/clj-editors` here. This allows us to construct clojure editors using `rewrite-cljs`. After adding this dependency, the node application will have access to javascript functions transpiled from clojurescript.

144 lines (142 loc) 4.88 kB
// Compiled by ClojureScript 1.9.946 {:target :nodejs} goog.provide('rewrite_clj.zip.move'); goog.require('cljs.core'); goog.require('rewrite_clj.zip.whitespace'); goog.require('clojure.zip'); /** * Move right to next non-whitespace/non-comment location. */ rewrite_clj.zip.move.right = (function rewrite_clj$zip$move$right(zloc){ var G__11514 = zloc; var G__11514__$1 = (((G__11514 == null))?null:clojure.zip.right.call(null,G__11514)); if((G__11514__$1 == null)){ return null; } else { return rewrite_clj.zip.whitespace.skip_whitespace.call(null,G__11514__$1); } }); /** * Move left to next non-whitespace/non-comment location. */ rewrite_clj.zip.move.left = (function rewrite_clj$zip$move$left(zloc){ var G__11523 = zloc; var G__11523__$1 = (((G__11523 == null))?null:clojure.zip.left.call(null,G__11523)); if((G__11523__$1 == null)){ return null; } else { return rewrite_clj.zip.whitespace.skip_whitespace_left.call(null,G__11523__$1); } }); /** * Move down to next non-whitespace/non-comment location. */ rewrite_clj.zip.move.down = (function rewrite_clj$zip$move$down(zloc){ var G__11531 = zloc; var G__11531__$1 = (((G__11531 == null))?null:clojure.zip.down.call(null,G__11531)); if((G__11531__$1 == null)){ return null; } else { return rewrite_clj.zip.whitespace.skip_whitespace.call(null,G__11531__$1); } }); /** * Move up to next non-whitespace/non-comment location. */ rewrite_clj.zip.move.up = (function rewrite_clj$zip$move$up(zloc){ var G__11534 = zloc; var G__11534__$1 = (((G__11534 == null))?null:clojure.zip.up.call(null,G__11534)); if((G__11534__$1 == null)){ return null; } else { return rewrite_clj.zip.whitespace.skip_whitespace_left.call(null,G__11534__$1); } }); /** * Move to the next non-whitespace/non-comment location in a depth-first manner. */ rewrite_clj.zip.move.next = (function rewrite_clj$zip$move$next(zloc){ if(cljs.core.truth_(zloc)){ var or__7878__auto__ = (function (){var G__11547 = zloc; var G__11547__$1 = (((G__11547 == null))?null:clojure.zip.next.call(null,G__11547)); if((G__11547__$1 == null)){ return null; } else { return rewrite_clj.zip.whitespace.skip_whitespace.call(null,clojure.zip.next,G__11547__$1); } })(); if(cljs.core.truth_(or__7878__auto__)){ return or__7878__auto__; } else { return cljs.core.vary_meta.call(null,zloc,cljs.core.assoc,new cljs.core.Keyword("rewrite-clj.zip.move","end?","rewrite-clj.zip.move/end?",891526475),true); } } else { return null; } }); /** * Check whether the given node is at the end of the depth-first traversal. */ rewrite_clj.zip.move.end_QMARK_ = (function rewrite_clj$zip$move$end_QMARK_(zloc){ var or__7878__auto__ = cljs.core.not.call(null,zloc); if(or__7878__auto__){ return or__7878__auto__; } else { var or__7878__auto____$1 = clojure.zip.end_QMARK_.call(null,zloc); if(cljs.core.truth_(or__7878__auto____$1)){ return or__7878__auto____$1; } else { return new cljs.core.Keyword("rewrite-clj.zip.move","end?","rewrite-clj.zip.move/end?",891526475).cljs$core$IFn$_invoke$arity$1(cljs.core.meta.call(null,zloc)); } } }); /** * Check if the given location represents the leftmost non-whitespace/ * non-comment one. */ rewrite_clj.zip.move.rightmost_QMARK_ = (function rewrite_clj$zip$move$rightmost_QMARK_(zloc){ return (rewrite_clj.zip.whitespace.skip_whitespace.call(null,clojure.zip.right.call(null,zloc)) == null); }); /** * Check if the given location represents the leftmost non-whitespace/ * non-comment one. */ rewrite_clj.zip.move.leftmost_QMARK_ = (function rewrite_clj$zip$move$leftmost_QMARK_(zloc){ return (rewrite_clj.zip.whitespace.skip_whitespace_left.call(null,clojure.zip.left.call(null,zloc)) == null); }); /** * Move to the next non-whitespace/non-comment location in a depth-first manner. */ rewrite_clj.zip.move.prev = (function rewrite_clj$zip$move$prev(zloc){ var G__11575 = zloc; var G__11575__$1 = (((G__11575 == null))?null:clojure.zip.prev.call(null,G__11575)); if((G__11575__$1 == null)){ return null; } else { return rewrite_clj.zip.whitespace.skip_whitespace.call(null,clojure.zip.prev,G__11575__$1); } }); /** * Move to the leftmost non-whitespace/non-comment location. */ rewrite_clj.zip.move.leftmost = (function rewrite_clj$zip$move$leftmost(zloc){ var G__11580 = zloc; var G__11580__$1 = (((G__11580 == null))?null:clojure.zip.leftmost.call(null,G__11580)); if((G__11580__$1 == null)){ return null; } else { return rewrite_clj.zip.whitespace.skip_whitespace.call(null,G__11580__$1); } }); /** * Move to the rightmost non-whitespace/non-comment location. */ rewrite_clj.zip.move.rightmost = (function rewrite_clj$zip$move$rightmost(zloc){ var G__11589 = zloc; var G__11589__$1 = (((G__11589 == null))?null:clojure.zip.rightmost.call(null,G__11589)); if((G__11589__$1 == null)){ return null; } else { return rewrite_clj.zip.whitespace.skip_whitespace_left.call(null,G__11589__$1); } }); //# sourceMappingURL=move.js.map