box-o-sand/argh/node.go

44 lines
694 B
Go
Raw Normal View History

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 PassthroughArgs struct {
Nodes []Node `json:"nodes"`
}
2022-05-15 18:22:56 +00:00
type CompoundShortFlag struct {
Nodes []Node `json:"nodes"`
}
type Ident struct {
Literal string `json:"literal"`
}
type BadArg struct {
Literal string
From Pos
To Pos
}
2022-05-15 18:22:56 +00:00
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{}