The unqualified name grammar includes <ctor-dtor-name>, but we handle that specially in parseNestedName. This is a little awkward. We can pass in the current scope and have parseUnqualifiedName deal with cdtors too. That also allows a couple of other simplifications:
- parseUnqualifiedName can also build up the NestedName, when the provided scope is non-null. Which means ...
- parseUnscopedName can pass a "std" scope in (and tailcall).
- ... and also parseNestedName need not construct the nestedname itself.
- also parseNestedName's detection of a cdtor-name doesn't have to rule out a decomposition name anymore.
This change also makes adding module demangling more straight-forwards, btw.
The original version would try to consume 'L' all the way. Is this a intentional difference?