delimited

First invocation matches p. Following invocations matches delim p

template delimited(alias p, alias delim)
delimited
(
R
)
(
in auto ref R i
)

Members

Functions

delimited
auto delimited(R i)
Undocumented in source. Be warned that the author may not have intended to support it.

Examples

import sdpc.parsers;
import std.algorithm;

alias calc = pfold!(delimited!(number!(), token!"+"), "a+b[0]", 0);
auto i = "1+2+3+4+5";
auto r = calc(i);
assert(!r.empty);
assert(r.front == 15);
assert(r.cont.empty);

Meta