Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrParseFmt = "Error parsing file %s syntax nodes: %w" ErrReadFmt = "Error reading file %s: %w" ErrParseWalkFmt = "Error walking the workspace files: %w" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ParsedFile ¶
type Rooter ¶
type Rooter struct {
// contains filtered or unexported fields
}
Rooter is a common way of passing around the root and path of a file/symbol.
If root is not available upon creation, you can leave it nil and it will be retrieved and cached when asked for.
A valid path is mandatory though.
type Wrkspc ¶
type Wrkspc interface { Root() string Index(files chan<- *ParsedFile, total *atomic.Uint64, totalDone chan<- bool) error // ContentOf returns the content of the file at the given path. ContentOf(path string) (string, error) // FContentOf returns the content of the file at the given path. // If an error occurs, it logs it and returns an empty string. // Use ContentOf for access to the error. FContentOf(path string) string // IROf returns the parsed root node of the given path. // If an error occurs, it returns an empty root node, this NEVER returns nil. IROf(path string) (*ast.Root, error) // FIROf returns the root of the given path, if an error occurs, it logs it // and returns an empty root node. This never returns nil. // Use IROf for access to the error. FIROf(path string) *ast.Root // AllOf returns the content & parsed root node of the given path. // If an error occurs, it returns an empty root node, this NEVER returns nil. AllOf(path string) (string, *ast.Root, error) // FAllOf returns both the content and root node of the given path. // If an error occurs, it returns an empty root node and string after logging the error. FAllOf(path string) (string, *ast.Root) Refresh(path string) error RefreshFrom(path string, content string) error FLexerOf(path string) lexer.Lexer IsPhpFile(path string) bool }
func New ¶
func New(phpv *phpversion.PHPVersion, root string, stubs string) Wrkspc
fileExtensions should all start with a period.
Click to show internal directories.
Click to hide internal directories.