Yay! Fixed the rule compiling bug! Rules now compile correctly.
This commit is contained in:
parent
2dc5e394cc
commit
727e5ccb11
2 changed files with 26 additions and 8 deletions
|
|
@ -285,3 +285,12 @@
|
|||
(list 'fn ['cell 'world] (list 'if left right))
|
||||
)))
|
||||
|
||||
(defn compile-rule
|
||||
"Parse this `rule`, a string conforming to the grammar of MicroWorld rules,
|
||||
into Clojure source, and then compile it into an anonymous
|
||||
function object, getting round the problem of binding mw-engine.utils in
|
||||
the compiling environment."
|
||||
[rule-text]
|
||||
(do
|
||||
(use 'mw-engine.utils)
|
||||
(eval (parse-rule rule-text))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue