@@ -1,9 +1,31 @@
Parent: b1254a4 (remove comment about API being undecided)
Author: Dmitri Shuralyov <email@example.com>
AuthorDate: Mon Jun 21 00:40:49 2021 -0400
Commit: Dmitri Shuralyov <firstname.lastname@example.org>
CommitDate: Sun Aug 1 13:54:44 2021 -0400
CommitDate: Sun Dec 12 15:01:05 2021 -0500
update implementation for 2020 spec changes
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.