xml: use ERROR:
parent
49d3338c70
commit
1032037bf2
|
@ -47,12 +47,12 @@ XML-ERROR: no-entity thing ;
|
|||
|
||||
XML-ERROR: mismatched open close ;
|
||||
|
||||
TUPLE: unclosed line column tags ;
|
||||
ERROR: unclosed line column tags ;
|
||||
|
||||
: throw-unclosed ( -- * )
|
||||
get-line get-column
|
||||
xml-stack get rest-slice [ first name>> ] map
|
||||
\ unclosed boa throw ;
|
||||
unclosed ;
|
||||
|
||||
XML-ERROR: bad-uri string ;
|
||||
|
||||
|
|
|
@ -10,13 +10,13 @@ IN: xml.syntax
|
|||
|
||||
<PRIVATE
|
||||
|
||||
TUPLE: no-tag name word ;
|
||||
ERROR: no-tag name word ;
|
||||
|
||||
M: no-tag summary
|
||||
drop "The tag-dispatching word has no method for the given tag name" ;
|
||||
|
||||
: compile-tags ( word xtable -- quot )
|
||||
>alist swap '[ _ no-tag boa throw ] suffix
|
||||
'[ dup main>> _ case ] ;
|
||||
>alist swap '[ _ no-tag ] suffix '[ dup main>> _ case ] ;
|
||||
|
||||
: define-tags ( word effect -- )
|
||||
[ dup dup "xtable" word-prop compile-tags ] dip define-declared ;
|
||||
|
|
Loading…
Reference in New Issue