(.require [library [lux (.except with) [abstract [monad (.only do)]] [control ["<>" parser]] [meta ["[0]" code ["<[1]>" \\parser (.only Parser)]]]]]) (type .public Policy Code) (def .public default Policy (` .private)) (`` (def policy (Parser Policy) (do [! <>.monad] [candidate .next] (when candidate [_ {.#Symbol ["" _]}] (in default) (,, (with_template [] [[_ { _}] (do ! [_ .any] (in candidate))] [.#Bit] [.#Symbol] )) _ (in default))))) (def .public with (All (_ of) (-> (Parser of) (Parser [Policy of]))) (<>.and ..policy))