mirror of
https://github.com/golang/go.git
synced 2025-12-07 13:50:04 +00:00
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 Reviewed-on: https://go-review.googlesource.com/c/go/+/704835 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Austin Clements <austin@google.com> Reviewed-by: Mateusz Poliwczak <mpoliwczak34@gmail.com> Reviewed-by: Alan Donovan <adonovan@google.com>
13 lines
741 B
Text
13 lines
741 B
Text
pkg go/ast, func ParseDirective(token.Pos, string) (Directive, bool) #68021
|
|
pkg go/ast, method (*Directive) End() token.Pos #68021
|
|
pkg go/ast, method (*Directive) ParseArgs() ([]DirectiveArg, error) #68021
|
|
pkg go/ast, method (*Directive) Pos() token.Pos #68021
|
|
pkg go/ast, type Directive struct #68021
|
|
pkg go/ast, type Directive struct, Args string #68021
|
|
pkg go/ast, type Directive struct, ArgsPos token.Pos #68021
|
|
pkg go/ast, type Directive struct, Name string #68021
|
|
pkg go/ast, type Directive struct, Slash token.Pos #68021
|
|
pkg go/ast, type Directive struct, Tool string #68021
|
|
pkg go/ast, type DirectiveArg struct #68021
|
|
pkg go/ast, type DirectiveArg struct, Arg string #68021
|
|
pkg go/ast, type DirectiveArg struct, Pos token.Pos #68021
|