Handbook
Glossary
(merge-errors) ( a b -- c )
Vocabulary
peg
.
private
Inputs
a
an
object
b
an
object
Outputs
c
an
object
Definition
USING:
accessors
combinators
kernel
math.order
;
IN:
peg.private
:
(merge-errors)
( a b -- c )
{
{
[
over
position>>
not
]
[
nip
]
}
{
[
dup
position>>
not
]
[
drop
]
}
[
2dup
[
position>>
]
compare
{
{
+lt+
[
nip
]
}
{
+gt+
[
drop
]
}
{
+eq+
[
merge-overlapping-errors
]
}
}
case
]
}
cond
;