Now syntax nodes have their formatters run even if the parsers they wrap are all arity zero. This fixes an issue where if `ppSpace` appears in a `macro`/`elab` then it does not format with a space due to the fact that macro argument processing wraps this as `group(ppSpace)`, and `ppSpace` has arity zero. Implementation note: the fix is to make the `visitArgs` formatter combinator always visit the last child, even if it does not exist (in which case the visited node will be `Syntax.missing`). To compensate, parser combinators like many and optional need to be sure to keep track of whether there any children. Only optional's needed to be modified. Closes #4561 |
||
|---|---|---|
| .. | ||
| bench | ||
| compiler | ||
| elabissues | ||
| ir | ||
| lean | ||
| pkg | ||
| playground | ||
| plugin | ||
| simpperf | ||
| .gitignore | ||
| common.sh | ||
| lean-toolchain | ||