got core, exec, create, lexicon namespaces going

This commit is contained in:
Richard Harrington 2013-07-28 12:00:32 -04:00
parent 4ce2f3a61b
commit 438b2382c9
3 changed files with 9 additions and 7 deletions

View File

@ -1,4 +1,5 @@
(ns rw.core
(ns rw.create
(:refer-clojure :exclude [compile])
(:use [clojure.string :only [split join]]
[rw.lexicon :only [registers op-commands commands]]))

View File

@ -1,11 +1,12 @@
(ns rw.core
(ns rw.exec
(:require (rw [lexicon :as lexicon])))
(def op-map (zipmap lexicon/op-commands
(map #(case %
"/" #(int (Math/round (float (/ %1 %2))))
"#" not=
(read-string %))
(map (fn [op]
(case op
"/" #(int (Math/round (float (/ %1 %2))))
"#" not=
(read-string op)))
lexicon/op-commands)))
(defn resolve-register [registers reg]

View File

@ -9,7 +9,7 @@
(def commands (concat op-commands word-commands))
(def get-register-by-idx
(defn get-register-by-idx
"to allow use of the INDEX/DATA register pair, we need to have a way of
getting registers by their index, but starting from 1, not 0."
[idx]