Files
go-rst/pkg/parser/context.go
2024-11-01 20:59:53 -04:00

25 lines
505 B
Go

package parser
type ParserContext struct {
inMeta bool
inDirective bool
currentDirective string
inCodeBlock bool
codeBlockIndent int
buffer []string
}
func NewParserContext() *ParserContext {
return &ParserContext{
buffer: make([]string, 0),
}
}
func (c *ParserContext) Reset() {
c.inMeta = false
c.inDirective = false
c.currentDirective = ""
c.inCodeBlock = false
c.codeBlockIndent = 0
c.buffer = c.buffer[:0]
}