This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Re: set phases to 'stunned'

1 reply
Joshua.Suereth
Joined: 2008-09-02,
User offline. Last seen 32 weeks 6 days ago.

Does <? Take some code and the name of a symbol and return a map of each phase to the AST of that phase?

If so i'd love some kind of animation of the ast, but that has no practical relevance.

On Sep 15, 2010 5:38 PM, "Kevin Wright" <kev.lee.wright@gmail.com> wrote:

Yay!  I want three, where are they retailing?



On 15 September 2010 22:26, Paul Phillips <paulp@improving.org> wrote:
>
> Still in the land of th...

--
Kevin Wright

mail / gtalk / msn : kev.lee.wright@gmail.com
pulse / skype: kev.lee.wright
twitter: @thecoda

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: set phases to 'stunned'

On Wed, Sep 15, 2010 at 07:29:43PM -0400, Josh Suereth wrote:
> Does <? Take some code and the name of a symbol and return a map of
> each phase to the AST of that phase?

The general thing going on is

def f[T](body: => T): List[T] =
allphases map (ph => atPhase(ph)(body))

In this case I'm dredging out the symbol and then printing its defString
at each phase, so the string is based on the info history.

You could of course have the AST at each phase if you wanted it, but I
don't find it all that useful to have 20 variations of the AST.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland