blockComment

convenient function

Parser!(T)
blockComment
(
T
)
(
,,
bool collect = true
)

Examples

blockComment can collect the comment itself

1 import unit_threaded;
2 
3 auto parser = blockComment("/*", "*/", true);
4 auto res = parser.parseAll("/*abc*/");
5 res.success.shouldBeTrue;
6 res.fResults[0].shouldEqual("/*abc*/");

blockComment can also throw the comment away

1 import unit_threaded;
2 
3 auto parser = blockComment("/*", "*/", false);
4 auto res = parser.parseAll("/*abc*/");
5 res.success.shouldBeTrue;
6 res.fResults.length.shouldEqual(0);

Meta