xml: use ERROR:

db4
John Benediktsson 2013-03-24 14:24:28 -07:00
parent 49d3338c70
commit 1032037bf2
2 changed files with 5 additions and 5 deletions

View File

@ -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 ;

View File

@ -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 ;