toolbarparser

package
v2.0.0-...-7f6935a Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arg

type Arg struct {
	Node
}

type Data

type Data struct {
	Str   string
	Parts []*Part
}

func Parse

func Parse(str string) *Data

func (*Data) Part0Arg0

func (d *Data) Part0Arg0() (*Arg, bool)

func (*Data) PartAtIndex

func (d *Data) PartAtIndex(i int) (*Part, bool)

type HomeVarMap

type HomeVarMap struct {
	// contains filtered or unexported fields
}

func NewHomeVarMap

func NewHomeVarMap(vm VarMap, caseInsensitive bool) *HomeVarMap

func (*HomeVarMap) Decode

func (m *HomeVarMap) Decode(f string) string

func (*HomeVarMap) Encode

func (m *HomeVarMap) Encode(filename string) string

type Node

type Node struct {
	Pos  int
	End  int   // end pos
	Data *Data // data with full str
}

func (*Node) Str

func (node *Node) Str() string

func (*Node) UnquotedStr

func (node *Node) UnquotedStr() string

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

type Part

type Part struct {
	Node
	Args []*Arg
}

func (*Part) ArgsUnquoted

func (p *Part) ArgsUnquoted() []string

func (*Part) FromArgString

func (p *Part) FromArgString(i int) string

type Var

type Var struct {
	Name, Value string
}

func ParseVar

func ParseVar(str string) (*Var, error)

type VarMap

type VarMap map[string]string // name -> value (more then one type: "~","$", ...)

func ParseVars

func ParseVars(data *Data) VarMap

Jump to

Keyboard shortcuts

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