Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneNode ¶
CloneNode returns a deep copy of a Node. It omits pointers to ast.{Scope,Object} variables.
func Deprecation ¶ added in v0.30.0
func Deprecation(doc *ast.CommentGroup) string
Deprecation returns the paragraph of the doc comment that starts with the conventional "Deprecation: " marker, as defined by https://go.dev/wiki/Deprecated, or "" if the documented symbol is not deprecated.
func PosInStringLiteral ¶ added in v0.30.0
PosInStringLiteral returns the position within a string literal corresponding to the specified byte offset within the logical string that it denotes.
Types ¶
type Directive ¶ added in v0.31.0
type Directive struct { Pos token.Pos // of preceding "//" Tool string Name string Args string // may contain internal spaces }
A directive is a comment line with special meaning to the Go toolchain or another tool. It has the form:
//tool:name args
The "tool:" portion is missing for the three directives named line, extern, and export.
See https://go.dev/doc/comment#Syntax for details of Go comment syntax and https://pkg.go.dev/cmd/compile#hdr-Compiler_Directives for details of directives used by the Go compiler.
func Directives ¶ added in v0.31.0
func Directives(g *ast.CommentGroup) (res []*Directive)
Directives returns the directives within the comment.
Directories
¶
Path | Synopsis |
---|---|
Package cursor augments inspector.Inspector with Cursor functionality allowing more flexibility and control during inspection.
|
Package cursor augments inspector.Inspector with Cursor functionality allowing more flexibility and control during inspection. |
Package edge defines identifiers for each field of an ast.Node struct type that refers to another Node.
|
Package edge defines identifiers for each field of an ast.Node struct type that refers to another Node. |