refactored print loop, project structure
This commit is contained in:
parent
aaa0a8a507
commit
b0d9bb4643
9 changed files with 14 additions and 25 deletions
11
cmd/print_ast.go
Normal file
11
cmd/print_ast.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"os"
|
||||
"git.callpipe.com/aidan/shsh"
|
||||
)
|
||||
|
||||
func main() {
|
||||
shsh.PrintSExpression(shsh.Lex(strings.Join(os.Args[1:], " ")))
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"os"
|
||||
"git.callpipe.com/aidan/shsh"
|
||||
)
|
||||
|
||||
func main() {
|
||||
scanner := bufio.NewScanner(os.Stdin)
|
||||
for scanner.Scan() {
|
||||
shsh.PrintSExpression(shsh.Lex(scanner.Text()))
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue