swift-book
swift-book copied to clipboard
Update the summary of the grammar automatically
Currently, the formal grammar is manually duplicated — each rule appears one in its section reference, and again in the summary of the grammar at the end of the reference. This would be improved by some form of automation.
A simple improvement would be to script the process of collecting the grammar, so we could run that script and generate a new Summary of the Grammar chapter after any updates to the grammar. It would be even better to run that script as part of building the book, or when the grammar changes, or to have some automated reminder that the summary has become outdated.