                  (map #(% defs) names))))
 
 (def builtins ["def" "defn" "ns" "atom" "let" "if" "when"
-               "cond" "merge"])
+               "cond" "merge" "assoc" "swap!" "reset!"])
 
 (defn syntaxify [src]
-  (let [str-p "\"[^\"]*\""
-        keyw-p ":[^\\][(){} \\t\\n]+"
-        res-p (string/join "\\b|" builtins)
+  (let [sep "\\][(){} \\t\\n"
+        str-p "\"[^\"]*\""
+        keyw-p (str ":[^" sep "]+")
+        res-p (string/join "|" (map #(str % "(?=[" sep "])") builtins))
         any-p ".|\\n"
         patt (re-pattern (str "("
                               (string/join ")|(" [str-p keyw-p res-p any-p])

   created components, without resorting to React's lifecycle
   events."]])


(defn bmi-demo []
  [:div
   [:h2 "Simple BMI calculator"]
   [demo-component {:comp bmi-component
                    :defs [:ns :calc-bmi :bmi-data :set-bmi :slider
                           :bmi-component]}]])

(defn demo []
  [:div
   [:h1 "This will become a demo"]
   [intro]
   [managing-state]
   [bmi-demo]
   [:p "WIP"]])

      [:div
       [:p "The value of " [:code "val"] " is now: " @val]
       [:p "Change it: "
        [:input
         {:type "text" :value @val
          :on-change #(reset! val (-> % .-target .-value))}]]])))

(defn render-simple []
  (cloact/render-component [simple-component]
                           (.-body js/document)))

(defn calc-bmi [{:keys [height weight bmi] :as params}]
  (let [h (/ height 100)]
