Handbook
Glossary
optional ( parser -- parser )
Vocabulary
peg
Inputs
parser
a
parser
Outputs
parser
a
parser
Word description
Returns a parser that parses 0 or 1 instances of the
parser
. The AST produced is
f
if 0 instances are parsed, otherwise it is the AST produced by
parser
.
Definition
USING:
kernel
peg.private
;
IN:
peg
:
optional
( parser -- parser )
optional-parser
boa
wrap-peg
;