1
0
mirror of https://github.com/danog/liquid.git synced 2024-11-26 23:24:38 +01:00
liquid/parser/grammar.go
2017-07-12 08:43:23 -04:00

22 lines
526 B
Go

package parser
// Grammar supplies the parser with syntax information about blocks.
type Grammar interface {
BlockSyntax(string) (BlockSyntax, bool)
}
// BlockSyntax supplies the parser with syntax information about blocks.
type BlockSyntax interface {
IsBlock() bool
CanHaveParent(BlockSyntax) bool
IsBlockEnd() bool
IsBlockStart() bool
IsClause() bool
ParentTags() []string
RequiresParent() bool
TagName() string
}
// Grammar returns a configuration's grammar.
// func (c *Config) Grammar() Grammar { return c }