16 lines
389 B
Go
16 lines
389 B
Go
package toml
|
|
|
|
import (
|
|
"git.makaay.nl/mauricem/go-parsekit/parse"
|
|
)
|
|
|
|
// A '#' hash symbol marks the rest of the line as a comment.
|
|
// All characters up to the end of the line are included in the comment.
|
|
var comment = c.Seq(a.Hash, c.ZeroOrMore(c.Not(a.EndOfLine)), m.Drop(a.EndOfLine))
|
|
|
|
func (t *parser) startComment(p *parse.API) {
|
|
if !p.Accept(comment) {
|
|
p.Expected("comment")
|
|
}
|
|
}
|