]> Cypherpunks repositories - gostls13.git/commit
regexp/syntax: cleanup code generation in perl_groups.go
authorOlivier Mengué <olivier.mengue@gmail.com>
Mon, 15 Jan 2024 23:16:25 +0000 (00:16 +0100)
committerGopher Robot <gobot@golang.org>
Tue, 2 Apr 2024 13:59:01 +0000 (13:59 +0000)
commit061181621641856a90bf555e702a70cac59cb584
tree991baaef86a350a361deb488d02b66ba1dd84c3f
parentbe50b58d70704d21cc1be9b69a98491a5e977b64
regexp/syntax: cleanup code generation in perl_groups.go

Cleanup code generation of perl_groups.go:
* Fix the generated code header to follow the standard https://go.dev/s/generatedcode
* Apply gofmt as last step of code generation
* Add //go:generate lines in parse.go to trigger code generation
* Adapt make_perl_groups.pl to handle writing directly to the output
  file (as we can't use shell redirection in go:generate lines)
* use strict; use warnings;

Change-Id: I675241da03dd3f6facc9eb9de00999bd9203ad70
Reviewed-on: https://go-review.googlesource.com/c/go/+/555995
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/regexp/syntax/make_perl_groups.pl
src/regexp/syntax/parse.go
src/regexp/syntax/perl_groups.go