srhickma / padd

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

Better optional tree parsing #220

Closed srhickma closed 4 years ago

srhickma commented 4 years ago

Add a member Tree::get_opt which will return the single child of an optional node, or return None if the child does not exist. This will greatly simplify the handling of optional nodes in specification generation.