Documentation ¶
Overview ¶
Translation of go/expect/extract.go for protobuf sources
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Identifier ¶
type Identifier string
Identifier is the type for an identifier in an Note argument list.
type Note ¶
type Note struct { Pos ast.SourcePos // The position at which the note identifier appears Comment ast.Comment // The comment from which the note was extracted Name string // the name associated with the note Args []any // the arguments for the note }
Note is a parsed note from an expect comment. It knows the position of the start of the comment, and the name and arguments that make up the note.
func Parse ¶
Parse collects all the notes present in a file. If content is nil, the filename specified is read and parsed, otherwise the content is used and the filename is used for positions and error messages. Each comment whose text starts with @ is parsed as a comma-separated sequence of notes. See the package documentation for details about the syntax of those notes.