summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorkaa <kaa@disroot.org>2025-07-07 01:59:14 -0700
committerkaa <kaa@disroot.org>2025-07-07 01:59:14 -0700
commit30ec71ec68698fe35b0f637f1a2c2dc147b461d5 (patch)
treec1f9b17740a9b34be723e5473c96e763e56cd1a7 /cmd
SkeletonHEADmaster
Diffstat (limited to 'cmd')
-rw-r--r--cmd/pgset/main.go30
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)
+}