Code Select
(new Class 'Tag)
(context 'Tag)
(constant 'markup 1)
(constant 'opentag 0)
(constant 'closetag 1)
(constant 'inner 2)
(constant 'v 3)
(define (gen)
(extend (self 3) (self markup opentag))
(dolist (el (self inner))
(:gen el)
(extend (self 3) "nn" (el Tag:v) "nn"))
(extend (self 3) (self markup closetag)))
(context MAIN)
(set 't3 (Tag (list "<div>" "</div>") (list) ""))
(set 't2 (Tag (list "<div style="position: absolute">" "</div>") (list t3) ""))
(set 't1 (Tag (list "<div style="position: relative">" "</div>") (list t2) ""))
;(push (t2 Tag:inner) t3)
;(push (t1 Tag:inner) t2)
(:gen t1)
(println (t1 Tag:v))
(exit)