Changed project.clj to a CLJX-based setup.
Got rid of all (:require [X :refer :all]) declarations. These are not supporte din ClojureScript.
core.match now also works for ClojureScript
When using ClojureScript, use read-string from cljs.reader.
Moved macros from termcat.util.lambda into a separate file (needed for CLJS).
Fix for lambda-macros.
Split out more macros into separate files.
Split out last of the macros into a separate file.
Termcat now compiles to JavaScript without warnings.
Can now compile limited Termcat code from ClojureScript.
Code doesn't compile correctly when using :optimizations :advanced.
Now using :optimizations :whitespace.

; original code
(defn ^:export apply-fun [fun-token arg]
  (let [f (t/payload fun-token)
        retval (f fun-token arg)]
    (if (string? retval)
      [(t/token :error (str retval " – " (:fun-name (meta f))))]
      retval)))

; :optimizations :whitespace
termcat.rules.bind.apply_fun = function apply_fun(fun_token, arg) {
  var f = termcat.term.payload.call(null, fun_token);
  var retval = f.call(null, fun_token, arg);
  if (typeof retval === "string") {
    return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [termcat.term.token.call(null, new cljs.core.Keyword(null, "error", "error", 1110689146), [cljs.core.str(retval), cljs.core.str(" \u2013 "), cljs.core.str((new cljs.core.Keyword(null, "fun-name", "fun-name", 2344786315)).cljs$core$IFn$_invoke$arity$1(cljs.core.meta.call(null, f)))].join(""))], null);
  } else {
    return retval;
  }
};
goog.exportSymbol("termcat.rules.bind.apply_fun", termcat.rules.bind.apply_fun);

; :optimizations :advanced
function Nl(a, b) {
  var c = Y(a), e = c.a ? c.a(a, b) : c.call(null, a, b);
  return "string" === typeof e ? new R(null, 1, 5, S, [Z.a(Wg, [r(e), r(" \u2013 "), r(Ii.b(Uc(c)))].join(""))], null) : e;
}
fa("termcat.rules.bind.apply_fun", Nl);

; Fix for :optimizations :advanced
function Nl(a, b) {
  var c = Y(a), e = c.call(null, a, b); ; !!!
  return "string" === typeof e ? new R(null, 1, 5, S, [Z.a(Wg, [r(e), r(" \u2013 "), r(Ii.b(Uc(c)))].join(""))], null) : e;
}
fa("termcat.rules.bind.apply_fun", Nl);
Removed debug statements.
Added a script for compiling the documents and demo.
Bugfixes for running Termcat in CLJS:
- Cannot coerce JS chars to their ASCII value using int
- Let :src metadata be a string, not a vector of chars, also in CLJS
Fixed bug whereby a token sequence :default :dash :default would not be merged into one :default token.
Two-pane layout for the Termcat CLJS demo.
Now using web workers.
Now automatically recompiling after a small timeout.
keypress not triggered after backspace is pressed; keyup is.
We now handle user-entered newlines correctly.