span

Undocumented in source.
version(legacy)
struct span () {}

Members

Static functions

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

Examples

import sdpc.parsers;

// Accept "asdf" if followed by "g"
alias p = seq!(token!"asdf", lookahead!(token!"g"));
auto i = "asdfg";
auto r1 = p(i);
assert(r1.ok);
assert(r1.cont == "g", r1.cont);

i = "asdff";
auto r2 = p(i);
assert(!r2.ok);

Meta