summaryrefslogtreecommitdiff
path: root/lib/parse/parse.go
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 /lib/parse/parse.go
SkeletonHEADmaster
Diffstat (limited to 'lib/parse/parse.go')
-rw-r--r--lib/parse/parse.go35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/parse/parse.go b/lib/parse/parse.go
new file mode 100644
index 0000000..332644d
--- /dev/null
+++ b/lib/parse/parse.go
@@ -0,0 +1,35 @@
+package parse
+
+import (
+ //"fmt"
+ "io"
+)
+
+type Element struct {
+ name string
+ attributes map[string]string
+ contents string
+ embedded *Element
+}
+
+func ReadTag() {
+}
+func Parse(r io.Reader) (Element, error) {
+ b := make([]byte, 1)
+ for {
+ _, err := r.Read(b)
+
+ if err != nil {
+ return Element{}, err
+ }
+ switch (b[0]) {
+ case '<':
+ fmt.Println("tag")
+ }
+ }
+
+ var e Element
+ e.name = "bob"
+
+ return e, nil
+}