Remove debug code
diff --git a/src/toml/lexer.go b/src/toml/lexer.go index 510adc8..ab08132 100644 --- a/src/toml/lexer.go +++ b/src/toml/lexer.go
@@ -5,10 +5,7 @@ import ( "fmt" - "reflect" "regexp" - "runtime" - "strconv" "strings" "unicode/utf8" ) @@ -88,10 +85,8 @@ func (l *lexer) run() { for state := lexVoid; state != nil; { - fmt.Println("going in state", runtime.FuncForPC(reflect.ValueOf(state).Pointer()).Name()) state = state(l) } - fmt.Println("closing...") close (l.tokens) } @@ -302,7 +297,6 @@ growing_string := "" for { - fmt.Println("peek:", strconv.QuoteRune(l.peek())) if l.peek() == '"' { l.emitWithValue(tokenString, growing_string) l.pos += 1 @@ -311,7 +305,6 @@ } if l.follow("\\\"") { - fmt.Println("follow") l.pos += 1 growing_string += "\"" } else { @@ -373,7 +366,6 @@ if !digit_seen { return l.errorf("no digit in that number") } - fmt.Println("-->", l.input[l.pos:]) if point_seen { l.emit(tokenFloat) } else {
diff --git a/src/toml/parser.go b/src/toml/parser.go index 469dfab..cdb58a9 100644 --- a/src/toml/parser.go +++ b/src/toml/parser.go
@@ -101,7 +101,6 @@ if p.currentGroup != "" { final_key = p.currentGroup + "." + key.val } - fmt.Println("Setting k:", final_key, "val:", value) p.tree.Set(final_key, value) return parseStart(p) } @@ -135,8 +134,6 @@ return parseArray(p) } - println(tok.typ) - println(tok.val) panic("never reached") return nil @@ -154,9 +151,6 @@ val := parseRvalue(p) array = append(array, val) follow = p.peek() - fmt.Println("Added to array:", val) - fmt.Println("Follow", follow) - fmt.Println("Follow", follow.typ) if follow == nil { panic("unterminated array") } if follow.typ != tokenRightBracket && follow.typ != tokenComma { panic("missing comma")