<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/main/main.go
diff options
context:
space:
mode:
authorCharlie Stanton <charlie@shtanton.xyz>2023-07-19 11:57:59 +0100
committerCharlie Stanton <charlie@shtanton.xyz>2023-07-19 11:57:59 +0100
commit8cf10efe3b5a1bcc70bc6e5590ee63fd5eb00c5b (patch)
tree7a16883c17c2bdcc49b2f9d4f333dfc76c66248f /main/main.go
parent3c34366bdd5d817a184d6b1c901d03a16b6faa4b (diff)
downloadstred-go-8cf10efe3b5a1bcc70bc6e5590ee63fd5eb00c5b.tar
Huge refactor to a more value based system, doing away with terminals. Also introduces unit testing
Diffstat (limited to 'main/main.go')
-rw-r--r--main/main.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/main.go b/main/main.go
index a506954..8e8c369 100644
--- a/main/main.go
+++ b/main/main.go
@@ -4,13 +4,13 @@ import (
"os"
"bufio"
"main/walk"
- "main/json_array"
+ "main/json"
)
type Program []Command
type ProgramState struct {
- path, value, xreg, yreg, zreg []walk.Atom
+ path, value, xreg, yreg, zreg walk.ValueList
in walk.StredReader
out walk.StredWriter
program []Command
@@ -45,8 +45,8 @@ func main() {
stdout := bufio.NewWriter(os.Stdout)
state := ProgramState {
- in: json_array.NewJSONArrayReader(stdin),
- out: json_array.NewJSONArrayWriter(stdout),
+ in: json.NewJSONReader(stdin),
+ out: json.NewJSONWriter(stdout),
program: program,
}