go/doc/next/6-stdlib/99-minor
Alan Donovan 8e734ec954 go/ast: fix BasicLit.End position for raw strings containing \r
This CL causes the parser to record in a new field, BasicLit.EndPos,
the actual end position of each literal token, and to use it in
BasicLit.End. Previously, the End was computed heuristically as
Pos + len(Value). This heuristic is incorrect for a multiline
raw string literal on Windows, since the scanner normalizes
\r\n to \n.

Unfortunately the actual end position is not returned by the
Scanner.Scan method, so the scanner and parser conspire
using a global variable in the go/internal/scannerhook
package to communicate.

+ test, api change, relnote

Fixes #76031

Change-Id: I57c18a44e85f7403d470ba23d41dcdcc5a9432c2
Reviewed-on: https://go-review.googlesource.com/c/go/+/720060
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
2025-11-17 10:52:48 -08:00
..
bytes bytes: add Buffer.Peek 2025-11-03 09:39:00 -08:00
crypto crypto/mlkem/mlkemtest: add derandomized Encapsulate768/1024 2025-11-17 09:54:06 -08:00
database/sql/driver database/sql: allow drivers to override Scan behavior 2025-08-11 14:27:36 -07:00
errors errors: add AsType 2025-09-30 10:22:08 -07:00
go go/ast: fix BasicLit.End position for raw strings containing \r 2025-11-17 10:52:48 -08:00
image/jpeg doc/next: document new image/jpeg DCT in release notes 2025-09-25 08:49:17 -07:00
log/slog log/slog: add multiple handlers support for logger 2025-09-04 11:07:44 -07:00
net net/url: disallow raw IPv6 addresses in host 2025-11-12 10:02:50 -08:00
os os: add (*Process).WithHandle 2025-09-15 12:17:42 -07:00
testing cmd/go, testing: add TB.ArtifactDir and -artifacts flag 2025-10-07 14:39:32 -07:00
0-heading.md doc/next: initialize 2025-07-23 11:41:17 -07:00
README doc/next: initialize 2025-07-23 11:41:17 -07:00

API changes and other small changes to the standard library go here.