rust

package
v0.13.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Extensions = []string{
	"rs",
}

Functions

func CachedRustFile

func CachedRustFile(ctx context.Context, id string) (context.Context, *rust_grammar.File, error)

func MakeRustLanguage

func MakeRustLanguage(ctx context.Context, entrypoint string) (context.Context, language.Language[Data, rust_grammar.File], error)

Types

type Data

type Data struct{}

type Language

type Language struct {
	CargoTomlPath     string
	ProjectEntrypoint string
	ModTree           *ModTree
}

func (*Language) MakeNode

func (l *Language) MakeNode(path string) (*graph.Node[Data], error)

func (*Language) ParseExports

func (l *Language) ParseExports(file *rust_grammar.File) (*language.ExportsResult, error)

func (*Language) ParseFile

func (l *Language) ParseFile(id string) (*rust_grammar.File, error)

func (*Language) ParseImports

func (l *Language) ParseImports(file *rust_grammar.File) (*language.ImportsResult, error)

type ModTree

type ModTree struct {
	Name     string
	Path     string
	Parent   *ModTree
	Children map[string]*ModTree
}

func MakeModTree

func MakeModTree(ctx context.Context, mainPath string, name string, parent *ModTree) (context.Context, *ModTree, error)

func (*ModTree) Search

func (m *ModTree) Search(modChain []string) *ModTree

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL