diff options
author | kaa <kaa@disroot.org> | 2025-07-07 01:59:14 -0700 |
---|---|---|
committer | kaa <kaa@disroot.org> | 2025-07-07 01:59:14 -0700 |
commit | 30ec71ec68698fe35b0f637f1a2c2dc147b461d5 (patch) | |
tree | c1f9b17740a9b34be723e5473c96e763e56cd1a7 /cmd |
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/pgset/main.go | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/cmd/pgset/main.go b/cmd/pgset/main.go new file mode 100644 index 0000000..8d32fbe --- /dev/null +++ b/cmd/pgset/main.go @@ -0,0 +1,30 @@ +package main + +import ( + "os" + "io" + "log" + "strings" + "pgset/lib/parse" +) + +func main() { + // Ingest + in, err := io.ReadAll(os.Stdin) + if err != nil { + log.Fatal(err) + } + + // Read from the string in memory a character at a time. + // The state holding the place in the input is passed around + // with the Reader. + r := strings.NewReader(string(in)) + + _, err = parse.Parse(r) + if err != nil { + log.Fatal(err) + } + //neatroff(tree) + //tex(tree) + //sile(tree) +} |