Right now, most of the parser doc comments are interpreted
as a single-line paragraph followed by a \
block, as in:
% go doc -u unresolvedName
package demangle // import "github.com/ianlancetaylor/demangle"
func (st *state) unresolvedName() AST
<unresolved-name> ::= [gs] <base-unresolved-name>
::= sr <unresolved-type> <base-unresolved-name>
::= srN <unresolved-type> <unresolved-qualifier-level>+ E <base-unresolved-name>
::= [gs] sr <unresolved-qualifier-level>+ E <base-unresolved-name>
Note the blank line separating the paragraph from the \
block.
(The difference is more obvious in HTML.)
This commit changes all the doc comments to put the entire grammar in
a \
block, introduced by text like “unresolvedName parses:”
This matters only because the package is vendored into the main Go repo
as part of cmd/pprof, and some upcoming gofmt changes will mishandle
the comments.
Right now, most of the parser doc comments are interpreted as a single-line paragraph followed by a \