parser

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseCommands

func ParseCommands(r io.Reader) <-chan Command

Types

type Command

type Command struct {
	Name        string
	Subcommands []string
	Flags       []Flag
	Args        []string
	HereDocs    []HereDoc
	// Original is the original command text as read (useful for debugging / reference)
	Original string
}

type Flag

type Flag struct {
	Count int // number of dashes
	Name  string
	Value string
}

type HereDoc

type HereDoc struct {
	Marker string
	Body   string
	Quoted bool // true if the marker was quoted like <<'EOF' or <<"EOF"
}

Jump to

Keyboard shortcuts

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