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

Tweaks to import scoping and name resolution #806

Closed krame505 closed 11 months ago

krame505 commented 11 months ago

Changes

This moves the implicit import of silver:core to an outer scope, to permit shadowing of short names from silver:core by names defined in another grammar - see https://github.com/melt-umn/silver/issues/802. Also fix handling of NT-specific attribute name resolution to consider attributes defined in more than one scope, and make the check for declaring potentially ambigous productions more precise.

Documentation

Not directly documented anywhere, but this should make name shadowing act more in line with the expected behavior.

Testing

Tested by building existing Silver code on Jenkins.