dsl for transforming results of a parser
transforming from regexp string to integer
1 import unit_threaded; 2 import std.conv; 3 4 auto res = (regex("\\d+") ^^ (input) { 5 return variantArray(input[0].get!string.to!int); 6 }).parse("123"); 7 res.success.shouldBeTrue; 8 res.results[0].shouldEqual(123);
See Implementation
dsl for transforming results of a parser