digitalmars.D - DustMite: Unwrap? Imports?
- "dsimcha" <dsimcha yahoo.com> Dec 08 2011
I've recently started using DustMite to reduce compiler errors in SciD, which instantiates an insane number of templates and is nightmarish to reduce by hand. Two questions: 1. What exactly does unwrap (as opposed to remove) do? 2. When there are multiple imports in a single statement, i.e. "import foo, bar;", does DustMite try to get rid of individual ones without deleting the whole statement? Is this what unwrap does?
Dec 08 2011
On Thursday, 8 December 2011 at 21:39:20 UTC, dsimcha wrote:I've recently started using DustMite to reduce compiler errors in SciD, which instantiates an insane number of templates and is nightmarish to reduce by hand. Two questions: 1. What exactly does unwrap (as opposed to remove) do?
Unwrap is a reduction operation which tries replacing a node with its children. It will remove redundant parens and braces, for example.2. When there are multiple imports in a single statement, i.e. "import foo, bar;", does DustMite try to get rid of individual ones without deleting the whole statement?
Yes, but it can't remove the first (or the last, I forgot) item in a comma-separated list. This is because the internal representation has no notions of token-separated lists. It's a long-standing complicated problem.Is this what unwrap does?
No.
Dec 08 2011








"Vladimir Panteleev" <vladimir thecybershadow.net>