please

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssignExpr

type AssignExpr struct {
	Op  string
	LHS Expr
	RHS Expr
}

func Assign

func Assign(name, op string, val Expr) *AssignExpr

type BinaryExpr

type BinaryExpr struct {
	Op string
	X  Expr
	Y  Expr
}

type Builder

type Builder interface {
	Ctl
	Parse(string, []byte) (File, error)
	NewFile(string) File
	NewRule(string, string) Rule
	Write(File) error
}

type CallExpr

type CallExpr struct {
	X    Expr
	List []Expr
}

type Comment

type Comment struct {
	Token string
}

type Comments

type Comments struct {
	Before []Comment
	Suffix []Comment
	After  []Comment
}

type Ctl

type Ctl interface {
	QueryDeps(...string) (*bufio.Reader, error)
	Graph() (*Graph, error)
	Build(...string) error
}

type DictExpr

type DictExpr struct {
	List []Expr
}

type Expr

type Expr interface {
	// contains filtered or unexported methods
}

func Glob

func Glob(include []string, exclude []string, targets ...string) Expr

type File

type File interface {
	GetPath() string
	GetRules(func(Rule))
	GetRule(string) Rule
	SetRule(Rule)
	DelRule(string) bool
}

type Filesystem

type Filesystem interface {
	Remove(string) error
	ReadDir(string) ([]os.FileInfo, error)
	WriteFile(string, []byte, os.FileMode) error
}

type Graph

type Graph struct {
	Packages map[string]*Package `json:"packages,omitempty"`
}

type Ident

type Ident struct {
	Name string
}

type KeyValueExpr

type KeyValueExpr struct {
	Key   Expr
	Value Expr
}

type ListExpr

type ListExpr struct {
	List []Expr
}

func Strings

func Strings(values ...string) *ListExpr

type LiteralExpr

type LiteralExpr struct {
	Token string
}

type Package

type Package struct {
	Targets map[string]*Target `json:"targets,omitempty"`
}

type Rule

type Rule interface {
	Attr(key string) Expr
	AttrDefn(key string) *AssignExpr
	AttrKeys() []string
	AttrLiteral(key string) string
	AttrString(key string) string
	AttrStrings(key string) []string
	DelAttr(key string) Expr
	ExplicitName() string
	Kind() string
	Name() string
	SetAttr(key string, val Expr)
	SetKind(kind string)
	Comment() Comments
}

type StringExpr

type StringExpr struct {
	Value string
}

func String

func String(value string) *StringExpr

type Target

type Target struct {
	Inputs   []string `json:"inputs,omitempty"`
	Outs     []string `json:"outs,omitempty"`
	Srcs     []string `json:"srcs,omitempty"`
	Deps     []string `json:"deps,omitempty"`
	Data     []string `json:"data,omitempty"`
	Labels   []string `json:"labels,omitempty"`
	Requires []string `json:"requires,omitempty"`
	Hash     string   `json:"hash,omitempty"`
	Binary   bool     `json:"binary,omitempty"`
}

Jump to

Keyboard shortcuts

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