]> Cypherpunks repositories - gostls13.git/commit
go/scanner: align line and column limit with the compiler's limit
authorDamien Neil <dneil@google.com>
Wed, 5 Apr 2023 16:28:00 +0000 (09:28 -0700)
committerDamien Neil <dneil@google.com>
Thu, 6 Apr 2023 19:14:11 +0000 (19:14 +0000)
commit63f5596788af3f126994a155319956c90f978f8d
tree0d31abe396e0e28d874e855e2d7794e2dc89f232
parent7ce458726523ec8accb2f1ac2f1b21a60fb4bd6e
go/scanner: align line and column limit with the compiler's limit

The compiler disallows line and column numbers > (1<<30)
(cmd/compiler/internal/syntax.PosMax).

Set the go/scanner limit to the same rather than off by one.

For #59180

Change-Id: Ibf9e0e6826d6f6230b0d492543b7e906298a0524
Reviewed-on: https://go-review.googlesource.com/c/go/+/482595
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Damien Neil <dneil@google.com>
src/cmd/compile/internal/syntax/pos.go
src/go/scanner/scanner.go