From: Eric Hodel Date: 2007-08-04T17:08:49+09:00 Subject: Re: [ANN] ParseTree 2.0.0 Released On Aug 1, 2007, at 12:55, Pit Capitain wrote: > 2007/8/1, Ryan Davis : >> ParseTree version 2.0.0 has been released! >> (...) > > Ryan, thank you for your continuous work on those libraries. I have a > question concerning Ruby's ASTs: do you know a way to get at the parse > tree of the calling method / block and at the node of the call? For > example: > > def look_at_callers_parse_tree > # what to do here? > end > > def calling_from_method > look_at_callers_parse_tree # should get this node... > end > > def calling_from_block > yield > end > > calling_from_block { look_at_callers_parse_tree } # ...and the one > in this block SuperCaller can do this. It was waiting on a release of PT, because add_to_parse_tree was static. I need to polish the documentation a bit before I can release. -- Poor workers blame their tools. Good workers build better tools. The best workers get their tools to do the work for them. -- Syndicate Wars