strip comments from the parse tree

I dunno if I'll like this decision in the long run, but we'll try it.
master
Jordan Orelli 10 years ago
parent db5ea6d634
commit cbbeff9908

@ -40,10 +40,14 @@ func (p *parser) next() token {
p.backup = p.backup[:len(p.backup)-1]
return t
}
SKIP_COMMENTS:
t, ok := <-p.input
if !ok {
return token{t_eof, "eof"}
}
if t.t == t_comment {
goto SKIP_COMMENTS
}
return t
}

Loading…
Cancel
Save