PARSE: datatype of a COPY
In a parse rule, what's the datatype of a COPY action?
In A83, it assumes it's the same datatype as the parse input. Take a look at these examples:
parse "test" [copy s to end (print type? s)]
string!
parse %test [copy s to end (print type? s)]
file!
parse http://test [copy s to end (print type? s)]
url!
parse #{3034} [copy s to end (print type? s)]
binary!
parse [a b] [copy s to end (print type? s)]
block!
parse 'a/b [copy s to end (print type? s)]
path!
This is a change from R2. But, is this what we want to do? The alternative is to use the datatypes base-type.
There are reasons either way. Which is the most useful for us?
2 Comments
|