parse-item-constraints

clojure.contrib.miglayout.internal

  • (parse-item-constraints & args)
Iterates over args and builds a map containing values associated with
:keywords and :components. The value for :keywords is a map from keyword
items to constraints strings. The value for :components is a vector of
vectors each associating a component with its constraints string.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/miglayout/internal.clj:71 top

(defn parse-item-constraints
  "Iterates over args and builds a map containing values associated with
  :keywords and :components. The value for :keywords is a map from keyword
  items to constraints strings. The value for :components is a vector of
  vectors each associating a component with its constraints string."
  [& args]
  (loop [[item & args] args
         item-constraints {:keywords {} :components []}]
    (if item
      (let [[constraints args] (split-with constraint? args)]
        (recur args
          (update-in
           item-constraints
           [(if (component? item) :components :keywords)]
           conj [item (apply format-constraints constraints)])))
      item-constraints)))
Vars in clojure.contrib.miglayout.internal/parse-item-constraints: conj defn let loop update-in
Used in 0 other vars

Comments top

No comments for parse-item-constraints. Log in to add a comment.