Are there generic traversals that include annotations?

(I want to find something or replace something, both in the ast and in its annotations.)

Submitted by Daco Harkes on 4 June 2015 at 18:47

On 5 June 2015 at 19:31 Jeff Smits commented:

I vaguely recall seeing something like that in the utils of one of the runtime libraries.


On 5 June 2015 at 23:39 Eelco Visser commented:

Something like this should work:


topdown-annos(s) =
s; all-annos(s)

all-annos(s) :
c#(ts){t1*} -> c#(<map(s)>t1*){ <map(s)> t2* }

Log in to post comments