diff options
author | Charlie Stanton <charlie@shtanton.xyz> | 2023-02-22 20:52:20 +0000 |
---|---|---|
committer | Charlie Stanton <charlie@shtanton.xyz> | 2023-02-22 20:52:20 +0000 |
commit | a2636b27fdadb2b7951fa35fe301e8e6b41fc28a (patch) | |
tree | 35561560d067c9987a626c4a77ea3f688547a015 /main | |
parent | 3bd45dc49a35b82dcc4ae93796c3e152d799bc0b (diff) | |
download | stred-go-a2636b27fdadb2b7951fa35fe301e8e6b41fc28a.tar |
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
Diffstat (limited to 'main')
-rw-r--r-- | main/main.go | 14 |
1 files changed, 1 insertions, 13 deletions
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() { |