hattya / go.sh

A parser of the Shell Command Language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

A parser of the Shell Command Language

License:MIT License


Languages

Language:Go 92.1%Language:Yacc 7.9%