Documentation
¶
Index ¶
- func ExtractSwiftReferencedSymbols(sourceCode []byte) []string
- func ExtractSwiftTypeIdentifiers(sourceCode []byte) []string
- func IsTestFile(filePath string) bool
- func ParseSwiftTopLevelSymbolNames(sourceCode []byte) []string
- func ParseSwiftTopLevelTypeNames(sourceCode []byte) []string
- func ResolveSwiftProjectImports(absPath string, filePath string, suppliedFiles map[string]bool, ...) ([]string, error)
- type Provider
- type SwiftImport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractSwiftReferencedSymbols ¶ added in v0.28.1
ExtractSwiftReferencedSymbols returns referenced symbol names in Swift source: type identifiers plus bare identifiers (function/constant references) and custom operators. Names declared at the top level of this file are excluded so a file is never treated as depending on itself.
func ExtractSwiftTypeIdentifiers ¶
ExtractSwiftTypeIdentifiers returns referenced type-like identifiers in Swift source.
func IsTestFile ¶
IsTestFile reports whether the given Swift path is a test file.
func ParseSwiftTopLevelSymbolNames ¶ added in v0.28.1
ParseSwiftTopLevelSymbolNames returns the names of all top-level declarations in Swift source: types plus top-level functions, constants/variables, and custom operators. This is the declaration side of cross-file reference resolution (CLR-14): global funcs, lets, and operators can be referenced across files just like types.
func ParseSwiftTopLevelTypeNames ¶
ParseSwiftTopLevelTypeNames returns top-level type-like declaration names in Swift source.
Types ¶
type Provider ¶ added in v0.27.0
type Provider struct{}
func (Provider) Extensions ¶ added in v0.27.0
func (Provider) IsTestFile ¶ added in v0.27.0
func (Provider) IsTestFile(filePath string, _ vcs.ContentReader) bool
func (Provider) Maturity ¶ added in v0.27.0
func (Provider) Maturity() moduleapi.MaturityLevel
func (Provider) NewResolver ¶ added in v0.27.0
type SwiftImport ¶
type SwiftImport struct {
Path string
}
SwiftImport represents an import in a Swift file.
func ParseSwiftImports ¶
func ParseSwiftImports(sourceCode []byte) ([]SwiftImport, error)
ParseSwiftImports parses Swift source code and extracts imports.
func SwiftImports ¶
func SwiftImports(filePath string) ([]SwiftImport, error)
SwiftImports parses a Swift file and returns its imports.