xml.data now uses extra/delegate for consultation
parent
33fecfef7d
commit
c4666c8c2d
|
@ -1,6 +1,6 @@
|
||||||
! Copyright (C) 2005, 2006 Daniel Ehrenberg
|
! Copyright (C) 2005, 2006 Daniel Ehrenberg
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: kernel sequences sequences.private assocs arrays ;
|
USING: kernel sequences sequences.private assocs arrays delegate ;
|
||||||
IN: xml.data
|
IN: xml.data
|
||||||
|
|
||||||
TUPLE: name space tag url ;
|
TUPLE: name space tag url ;
|
||||||
|
@ -89,24 +89,11 @@ TUPLE: tag attrs children ;
|
||||||
tag construct ;
|
tag construct ;
|
||||||
|
|
||||||
! For convenience, tags follow the assoc protocol too (for attrs)
|
! For convenience, tags follow the assoc protocol too (for attrs)
|
||||||
M: tag at* tag-attrs at* ;
|
CONSULT: assoc-protocol tag tag-attrs ;
|
||||||
M: tag set-at tag-attrs set-at ;
|
|
||||||
M: tag new-assoc tag-attrs new-assoc ;
|
|
||||||
M: tag >alist tag-attrs >alist ;
|
|
||||||
M: tag delete-at tag-attrs delete-at ;
|
|
||||||
M: tag clear-assoc tag-attrs clear-assoc ;
|
|
||||||
M: tag assoc-size tag-attrs assoc-size ;
|
|
||||||
M: tag assoc-like tag-attrs assoc-like ;
|
|
||||||
|
|
||||||
INSTANCE: tag assoc
|
INSTANCE: tag assoc
|
||||||
|
|
||||||
! They also follow the sequence protocol (for children)
|
! They also follow the sequence protocol (for children)
|
||||||
M: tag nth tag-children nth ;
|
CONSULT: sequence-protocol tag tag-children ;
|
||||||
M: tag nth-unsafe tag-children nth-unsafe ;
|
|
||||||
M: tag set-nth tag-children set-nth ;
|
|
||||||
M: tag set-nth-unsafe tag-children set-nth-unsafe ;
|
|
||||||
M: tag length tag-children length ;
|
|
||||||
|
|
||||||
INSTANCE: tag sequence
|
INSTANCE: tag sequence
|
||||||
|
|
||||||
! tag with children=f is contained
|
! tag with children=f is contained
|
||||||
|
|
Loading…
Reference in New Issue