DustMite:  Unwrap?  Imports?
    Vladimir Panteleev 
    vladimir at thecybershadow.net
       
    Thu Dec  8 13:43:36 PST 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.
    
    
More information about the Digitalmars-d
mailing list