From a2636b27fdadb2b7951fa35fe301e8e6b41fc28a Mon Sep 17 00:00:00 2001 From: Charlie Stanton Date: Wed, 22 Feb 2023 20:52:20 +0000 Subject: Modify subex to take JSON split into "data" Currently no way to reassemble the data on the other side Much of the potential data cannot be interacted with meaningfully, only the string functionality is implemented Should rename data to something else --- main/main.go | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'main') diff --git a/main/main.go b/main/main.go index d657ea2..3da414d 100644 --- a/main/main.go +++ b/main/main.go @@ -3,7 +3,6 @@ package main import ( "os" "bufio" - "fmt" "main/subex" "main/walk" ) @@ -18,18 +17,7 @@ type ProgramState struct { } func main() { - if len(os.Args) != 3 { - panic("Expected: stred [input] [subex]") - } - input := os.Args[1] - program := os.Args[2] - ast := subex.Parse(program) - transducer := subex.CompileTransducer(ast) - output, err := subex.RunTransducer(transducer, input) - if err { - output = input - } - fmt.Println(output) + subex.Main() } func mainISH() { -- cgit v1.2.3