This is much better. There are a few issues I've noticed, though:

* Mixin declarations should only be allowed at the root of documents, 
like constants and @import directives. This restriction doesn't seem to 
be in place.
* Why is that last exception test commented out?
* "echo -e '-a\n  c: d' | sass" dies with an unsightly error.

Thanks for all your work! I'm getting more and more fond of this feature.
- Nathan

Garry Hill wrote:
> Hi,
>
> Here's the latest version:
>
> http://pastie.org/175298
>
>
> On Apr 2, 8:44 pm, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
>   
>> There shouldn't be a Tree::MixinNode type. It's just semantically wrong.
>> I also don't like #append_to. This should be implementable without
>> touching anything in tree/ at all.
>>
>> Really, I'd prefer duplicating a little appending code to kludges like
>> this. You could even avoid the duplication by making some sort of
>> append_all_children method.
>>     
>
> No more MixinNode.
>
> I think it's pretty clean, despite my earlier worries about code
> repetition.
>
> One thing I was looking at was being able to skip the current
> returning of a string on mixin include and instead simply return an
> array of nodes, which led me to this follow up patch:
>
> http://pastie.org/175310
>
> The only real extra change, outside of tweaks to things I'd already
> tweaked in the previous patch, was to return an array of
> DirectiveNodes instead of ValueNodes from the "imports" method, which
> is actually more consistent with the DirectiveNode that's returned in
> the case of a raw CSS import.
>
> Oh, Thomas, yes, the code you described works as expected. It and even
> more complex examples have made it into the test template. e.g.
>
> -deep
>   a:hover
>     :text-decoration underline
>
> .deep
>   +deep
>
> ==
>
> produces
>
> .deep a:hover {
>   text-decoration: underline;
> }
>
> ===
>
> I think this has really profound implications that I hadn't even
> thought about when I started hacking this in. Fab.
>
> Best,
>
> g
>
>
>
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to