Make DEBUG private: _DEBUG
This commit is contained in:
parent
235dee6a0d
commit
a5baf52283
10
zscan.go
10
zscan.go
|
@ -8,6 +8,11 @@ import (
|
|||
"text/scanner"
|
||||
)
|
||||
|
||||
// Only used when debugging the parser itself.
|
||||
var _DEBUG = false
|
||||
|
||||
|
||||
|
||||
// Tokinize a RFC 1035 zone file. The tokenizer will normalize it:
|
||||
// * Add ownernames if they are left blank;
|
||||
// * Suppress sequences of spaces;
|
||||
|
@ -40,9 +45,6 @@ const (
|
|||
_EXPECT_RDATA // The first element of the rdata
|
||||
)
|
||||
|
||||
// Only used when debugging the parser itself.
|
||||
var DEBUG = false
|
||||
|
||||
type ParseError struct {
|
||||
err string
|
||||
lex Lex
|
||||
|
@ -110,7 +112,7 @@ func ParseZone(r io.Reader, t chan Token) {
|
|||
var h RR_Header
|
||||
var ok bool
|
||||
for l := range c {
|
||||
if DEBUG {
|
||||
if _DEBUG {
|
||||
fmt.Printf("[%v]\n", l)
|
||||
}
|
||||
switch st {
|
||||
|
|
|
@ -87,13 +87,13 @@ func setRR(h RR_Header, c chan Lex) (RR, *ParseError) {
|
|||
|
||||
func slurpRemainder(c chan Lex) *ParseError {
|
||||
l := <-c
|
||||
if DEBUG {
|
||||
if _DEBUG {
|
||||
fmt.Printf("%\v", l)
|
||||
}
|
||||
switch l.value {
|
||||
case _BLANK:
|
||||
l = <-c
|
||||
if DEBUG {
|
||||
if _DEBUG {
|
||||
fmt.Printf("%\v", l)
|
||||
}
|
||||
if l.value != _NEWLINE && l.value != _EOF {
|
||||
|
|
Loading…
Reference in New Issue