pyast

package module
v0.0.0-...-9ec6ef8 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 21 Imported by: 3

README

pyast

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTree

func BuildTree(pwg *sync.WaitGroup, c chan tree, g git.Git, pythonRoot string)

func BuildTrees

func BuildTrees(pythonRoots file.Paths, g git.Git) *trees

func CalculatePythonRoots

func CalculatePythonRoots(paths file.Paths) file.Paths

func ClassToPath

func ClassToPath(root string, class string) string

func PathToClass

func PathToClass(path string) (string, error)

Types

type Arg

type Arg struct {
	Name  string `@Ident "="`
	Value *Value `@@`
}

type Classes

type Classes map[string]Void

func CreateClasses

func CreateClasses(strings ...string) Classes

func (*Classes) Add

func (p *Classes) Add(items ...string) *Classes

func (*Classes) Copy

func (s *Classes) Copy() Classes

func (*Classes) Discard

func (p *Classes) Discard(other Classes) *Classes

func (*Classes) Intersection

func (p *Classes) Intersection(other Classes) *Classes

func (Classes) Lister

func (c Classes) Lister() []string

func (Classes) SameAs

func (c Classes) SameAs(o Classes) bool

func (*Classes) Union

func (p *Classes) Union(other Classes) *Classes

type Dict

type Dict struct {
	DictElements []*DictElement `( "{" ( @@ ","? )+ "}" | "{}" )`
}

type DictElement

type DictElement struct {
	Name  string `@Text ":"`
	Value *Value `@@ ","?`
}

type Directive

type Directive struct {
	Name string `@Ident`
	Args []*Arg `( "(" ( @@ ","? )+ ")" | "(" ")" )`
}

type List

type List struct {
	ListElement []*ListElement `( "[" ( @@ ","? )+ "]" | "[" "]" )`
}

type ListElement

type ListElement struct {
	Value *Value `@@`
}

type Pants

type Pants struct {
	Directives []*Directive `@@*`
}

func ParsePants

func ParsePants(path string) (*Pants, error)

func (*Pants) Overrides

func (p *Pants) Overrides() []string

func (*Pants) SendDepPairs

func (p *Pants) SendDepPairs(depPairs chan depPair)

type Value

type Value struct {
	String *string `@Text`
	Dict   *Dict   `| @@`
	List   *List   `| @@`
}

func (Value) Repr

func (v Value) Repr() string

type Void

type Void struct{}
var Member Void

Jump to

Keyboard shortcuts

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