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
57 stars 7 forks source link

Avoid crash when syntax AST is demanded from a grammar with errors #786

Closed krame505 closed 1 year ago

krame505 commented 1 year ago

Changes

In the regular Silver build process, we never generate interface files for a grammar with errors. However in the LSP driver we always write out interfaces for all built grammars. This mostly works but there were some assumptions in the Copper modification that we wouldn't try building a syntax AST (which is included in the interface file) when there are name errors.

Documentation

Not really needed here, this is a bug fix.