2022-05-15 18:22:56 +00:00
|
|
|
package argh
|
|
|
|
|
|
|
|
type Node interface{}
|
|
|
|
|
|
|
|
type TypedNode struct {
|
|
|
|
Type string `json:"type"`
|
|
|
|
Node Node `json:"node"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type CompoundShortFlag struct {
|
|
|
|
Nodes []Node `json:"nodes"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Program struct {
|
2022-05-19 00:15:31 +00:00
|
|
|
Name string `json:"name"`
|
|
|
|
Values map[string]string `json:"values"`
|
|
|
|
Nodes []Node `json:"nodes"`
|
2022-05-15 18:22:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Ident struct {
|
|
|
|
Literal string `json:"literal"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Command struct {
|
2022-05-19 00:15:31 +00:00
|
|
|
Name string `json:"name"`
|
|
|
|
Values map[string]string `json:"values"`
|
|
|
|
Nodes []Node `json:"nodes"`
|
2022-05-15 18:22:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type Flag struct {
|
2022-05-19 00:15:31 +00:00
|
|
|
Name string `json:"name"`
|
|
|
|
Values map[string]string `json:"values"`
|
2022-05-15 18:22:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type StdinFlag struct{}
|
|
|
|
|
|
|
|
type StopFlag struct{}
|
|
|
|
|
|
|
|
type ArgDelimiter struct{}
|