melt-umn / silver

An attribute grammar-based programming language for composable language extensions
http://melt.cs.umn.edu/silver/
GNU Lesser General Public License v3.0
58 stars 7 forks source link

Tuple selector sections #844

Open RandomActsOfGrammar opened 3 months ago

RandomActsOfGrammar commented 3 months ago

In Silver, one can write

map((.pp), l)

to get a list containing the value of the pp attribute for each tree in the list l.

One should analogously be able to write

map((.3), l)

for a list of tuples l to get a list of the third elements from all the tuples, but tuple selector sections like this are not currently implemented.

krame505 commented 3 months ago

I thought I already implemented this, but I guess that was annotation sections. Yeah, we should do this.

Would be a good Silver dev intro project, along with #577.