https://issues.dlang.org/show_bug.cgi?id=18336
Jack Stouffer <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from Jack Stouffer <[email protected]> --- I'm wondering how useful something like this would be in real world parsing situations like math statements or languages. If you have nested parens you'd have to do recursive calls to untilClosingParentheses to properly break up a statement like "(5 + (10 - 2))". Maybe it's be more useful to have some function that returns the following ------ assert("(5 + (10 - 2))".func().equals( [tuple(1UL, "5 + "), tuple(2UL, "10 - 2")] )); assert("7 + (4 * (2^^(-1)))".func().equals( [tuple(0UL, "7 + "), tuple(1UL, "4 * "), tuple(2UL, "2^^"), tuple(3UL, "-1")] )); ------ But at that point I don't know if it would be a good fit for Phobos. --
