dfmt
dfmt copied to clipboard
Spacing inserted around unary operator after error
In this case at least, it's possible to know it's a unary operator despite the error.
unittest
{
{
}
- else if (functionParameters(&type))
+ else if (functionParameters( & type))
{
}
}
I think this requires a very different approach than using libdparse. In other words a really big change and rearchitecture of dfmt. However, the ability to format "unparseable" D code enables other features. For example, you could format diffs then.
Well, maybe libdparse can implement some clever error recovery. Then you maybe can format a few cases like this?
"clever error recovery" sounds uncomfortably similar to "sufficiently smart compiler".