With the new specification, it's possible to stop reading a file early
even when the generated comment is absent, since the generated comment
may no longer appear anywhere in the file. Begin parsing /* */ comment
blocks, which may span multiple lines, to be able to be able to detect
when we run into the first non-comment, non-blank text in the file.
It was mentioned in https://go.dev/issue/41196#issuecomment-686607452:
> [...] the primary focus for these comments is Go code
> and more generally Go package sources.
> Go package sources today can be Go, assembly, C, C++, Objective C,
> SWIG, and Fortran.
> The comment being discussed here, like the //go:build comment,
> handles all of these these except Fortran, which seems fine.
The initial scope of this package was to support parsing Go source only,
but it happens to work well with many other source types that are found
in Go packages. Replace mentions of "a Go source file" in documentation
and code with "a source file", to make it apply more generally. If this
will mean we need to parse comments differently depending on the source
type in the future, we can revisit this decision. Let's see how it goes.
Fixes issue 1.
Reviewed-On: https://dmitri.shuralyov.com/go/generated/...$changes/1