go.sh

module
v0.0.0-...-92390f9 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT

README

go.sh

A parser of the Shell Command Language.

pkg.go.dev GitHub Actions Appveyor Codecov

Installation

$ go get -u github.com/hattya/go.sh

Usage

package main

import (
	"fmt"

	"github.com/davecgh/go-spew/spew"
	"github.com/hattya/go.sh/parser"
)

func main() {
	cmd, comments, err := parser.ParseCommand("<stdin>", "echo Hello, World!")
	if err != nil {
		fmt.Println(err)
		return
	}
	spew.Dump(cmd)
	spew.Dump(comments)
}

License

go.sh is distributed under the terms of the MIT License.

Directories

Path Synopsis
Package ast declares the types used to represent syntax trees for the Shell Command Language.
Package ast declares the types used to represent syntax trees for the Shell Command Language.
Package interp implements an interpreter for the Shell Command Language (POSIX.1-2017).
Package interp implements an interpreter for the Shell Command Language (POSIX.1-2017).
Package parser implements a parser for the Shell Command Language (POSIX.1-2017).
Package parser implements a parser for the Shell Command Language (POSIX.1-2017).
Package pattern implements the pattern matching notation.
Package pattern implements the pattern matching notation.
Package printer implements printing of AST nodes.
Package printer implements printing of AST nodes.

Jump to

Keyboard shortcuts

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