1
0
mirror of https://github.com/danog/liquid.git synced 2024-11-30 06:59:03 +01:00
liquid/render/config.go
2020-11-02 21:41:26 -03:00

27 lines
546 B
Go

package render
import (
"github.com/osteele/liquid/parser"
)
// Config holds configuration information for parsing and rendering.
type Config struct {
parser.Config
grammar
Cache map[string][]byte
}
type grammar struct {
tags map[string]TagCompiler
blockDefs map[string]*blockSyntax
}
// NewConfig creates a new Settings.
func NewConfig() Config {
g := grammar{
tags: map[string]TagCompiler{},
blockDefs: map[string]*blockSyntax{},
}
return Config{Config: parser.NewConfig(g), grammar: g, Cache: map[string][]byte{}}
}