Skeleton function for parsing LOC records
This commit is contained in:
parent
540a803941
commit
0940f549bf
2
zscan.go
2
zscan.go
|
@ -399,7 +399,7 @@ func parseZone(r io.Reader, origin, f string, t chan Token, include int) {
|
|||
}
|
||||
}
|
||||
|
||||
func (l lex) String() string {
|
||||
func (l lex) _string() string {
|
||||
switch l.value {
|
||||
case _STRING:
|
||||
return "S:" + l.token + "$"
|
||||
|
|
|
@ -53,8 +53,7 @@ func setRR(h RR_Header, c chan lex, o, f string) (RR, *ParseError) {
|
|||
r, e = setTALINK(h, c, o, f)
|
||||
goto Slurp
|
||||
case TypeLOC:
|
||||
//r, e = setLOC(h, c, f)
|
||||
// TODO
|
||||
r, e = setLOC(h, c, f)
|
||||
goto Slurp
|
||||
// These types have a variable ending: either chunks of txt or chunks/base64 or hex.
|
||||
// They need to search for the end of the RR themselves, hence they look for the ending
|
||||
|
@ -423,6 +422,12 @@ func setTALINK(h RR_Header, c chan lex, o, f string) (RR, *ParseError) {
|
|||
return rr, nil
|
||||
}
|
||||
|
||||
func setLOC(h RR_Header, c chan lex, f string) (RR, *ParseError) {
|
||||
rr := new(RR_LOC)
|
||||
rr.Hdr = h
|
||||
return rr, nil
|
||||
}
|
||||
|
||||
func setHIP(h RR_Header, c chan lex, o, f string) (RR, *ParseError) {
|
||||
rr := new(RR_HIP)
|
||||
rr.Hdr = h
|
||||
|
|
Loading…
Reference in New Issue