 (defn string->token [s env]
   (or (ops s)
       (let [n (js/parseInt s)]
-        (if (integer? n) n (resolve-var s env)))))
+        (if (integer? n) n (cell-value s env)))))
 
 (defn parse-formula [s env]
   (let [[_ a b c] (string/split s #" ")]

            [om-tools.dom :as dom :include-macros true]
            [om.core :as om :include-macros true]
            [clojure.string :as string]))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Formula interpreter

    [[:edit xy] :key-down 13]
    [[(display-mode xy)
      (display-mode (:source state))
      [[:display xy] :value (cell-value (:focus state) state)]]
     (assoc state :mode :done)]
    
    :else [[] state]))
