debugmode is now a flag

master
Jordan Orelli 12 years ago
parent a275c6178f
commit 9a55b787a0

@ -12,7 +12,7 @@ import (
"strings" "strings"
) )
var DEBUG = false var DEBUG bool
type sexp struct { type sexp struct {
items []interface{} items []interface{}
@ -242,6 +242,7 @@ func defaultInterpreter(out chan interface{}, errors chan error) {
} }
func main() { func main() {
flag.BoolVar(&DEBUG, "debug", false, "puts the interpreter in debug mode")
flag.Parse() flag.Parse()
if DEBUG { if DEBUG {
fmt.Println(universe) fmt.Println(universe)

Loading…
Cancel
Save