Use nonnegative-integer? in favor of natural-number?

The natural-number? predicate seems to be
unavailable (though there is a remnant of it in the form of
natural-number/c, which is just a contract alias of
exact-nonnegative-integer?). In any case, it surely means
nonnegative integer.

(One might push the envelope here slightly and add
exactness, but this commit does not go that far.)
dev-subparser
Jesse Alama 6 years ago committed by Matthew Butterick
parent 84f2fc2b97
commit 2e8f5e42be

@ -1042,9 +1042,9 @@ In addition to the exports shown below, the @racketmodname[brag/support] module
@defproc[(token [type (or/c string? symbol?)] @defproc[(token [type (or/c string? symbol?)]
[val any/c #f] [val any/c #f]
[#:line line (or/c positive-integer? #f) #f] [#:line line (or/c positive-integer? #f) #f]
[#:column column (or/c natural-number? #f) #f] [#:column column (or/c nonnegative-integer? #f) #f]
[#:position position (or/c positive-integer? #f) #f] [#:position position (or/c positive-integer? #f) #f]
[#:span span (or/c natural-number? #f) #f] [#:span span (or/c nonnegative-integer? #f) #f]
[#:skip? skip? boolean? #f] [#:skip? skip? boolean? #f]
) )
token-struct?]{ token-struct?]{
@ -1060,9 +1060,9 @@ In addition to the exports shown below, the @racketmodname[brag/support] module
@defstruct[token-struct ([type symbol?] @defstruct[token-struct ([type symbol?]
[val any/c] [val any/c]
[position (or/c positive-integer? #f)] [position (or/c positive-integer? #f)]
[line (or/c natural-number? #f)] [line (or/c nonnegative-integer? #f)]
[column (or/c positive-integer? #f)] [column (or/c positive-integer? #f)]
[span (or/c natural-number? #f)] [span (or/c nonnegative-integer? #f)]
[skip? boolean?]) [skip? boolean?])
#:transparent]{ #:transparent]{
The token structure type. The token structure type.

Loading…
Cancel
Save