1
0
mirror of https://github.com/danog/liquid.git synced 2024-12-04 06:17:51 +01:00
liquid/render/config.go

26 lines
476 B
Go
Raw Normal View History

2017-07-04 17:08:57 +02:00
package render
2017-07-07 11:41:37 +02:00
import (
"github.com/osteele/liquid/parser"
)
2017-07-04 17:08:57 +02:00
// Config holds configuration information for parsing and rendering.
type Config struct {
2017-07-07 11:41:37 +02:00
parser.Config
grammar
}
type grammar struct {
2017-07-06 15:38:18 +02:00
tags map[string]TagCompiler
blockDefs map[string]*blockSyntax
2017-07-04 17:08:57 +02:00
}
// NewConfig creates a new Settings.
func NewConfig() Config {
g := grammar{
2017-07-06 15:38:18 +02:00
tags: map[string]TagCompiler{},
blockDefs: map[string]*blockSyntax{},
2017-07-04 17:08:57 +02:00
}
return Config{parser.NewConfig(g), g}
2017-07-04 17:08:57 +02:00
}