Unreviewed changes
7 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: src/go/ast/directive.go
Insertions: 1, Deletions: 1.
@@ -112,7 +112,7 @@
// double quoted Go string, or a back quoted raw Go string. Each token must be
// separated by one or more Unicode spaces.
//
-// If the arguments do not obey this syntax, it returns an error.
+// If the arguments do not conform to this syntax, it returns an error.
func (d *Directive) ParseArgs() ([]DirectiveArg, error) {
args := directiveScanner{d.Args, d.ArgsPos}
```
Change information
Commit message:
go/ast: add ParseDirective for parsing directive comments
This adds an ast.Directive API for parsing directive comments such as
"//go:build" and "//go:embed".
This will help tools standardize the syntax of these directive
comments. Even within the standard Go tools there's little agreement
on the finer details of the syntax of directives today.
Fixes #68021.
Change-Id: I84a988a667682c9ac70632df6e925461ac95e381
Files:
- A api/next/68021.txt
- A doc/next/6-stdlib/99-minor/go/ast/68021.md
- A src/go/ast/directive.go
- A src/go/ast/directive_test.go
Change size: L
Delta: 4 files changed, 447 insertions(+), 0 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +1 by Mateusz Poliwczak, +2 by Alan Donovan
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI