srhickma / padd

Fast and Automatic Formatting of Context-Free Languages
Apache License 2.0
2 stars 2 forks source link

Emit error if undefined variables are substituted #211

Open srhickma opened 4 years ago

srhickma commented 4 years ago

If a pattern variable is never defined in a capture, it should be removed altogether, since any substitution will be replaced by the empty string. Emitting a pattern generation error in this case will help eliminate errors caused by misspelled variable names in specifications.