Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConsumeLineDirective ¶ added in v1.5.0
ConsumeLineDirective consumes the first line from r if it's a "//line" directive that either does not have line/column information or has it set to line 1 (and column 1). If the directive is consumed, the filename it refers to is returned. Otherwise, the reader is rewinded to its original position if the provided reader supports the io.Seeker interface.
Types ¶
type File ¶
type File struct { // Name is the name of the file. Name string // AstFile is the parsed AST of the file, cannot be nil AstFile *ast.File // Aspects is the list of aspects that may match on this file. Aspects []*aspect.Aspect }
File represents a parsed file with its name, its AST and with the aspects that may match on it.
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func NewParser ¶
NewParser creates a new parser with the given token.FileSet and the number of files to parse.
Click to show internal directories.
Click to hide internal directories.