1
0
mirror of https://github.com/danog/liquid.git synced 2024-12-04 18:17:53 +01:00
liquid/chunks/ast.go
2017-06-26 15:36:05 -04:00

39 lines
501 B
Go

package chunks
import (
"io"
)
// ASTNode is a node of an AST.
type ASTNode interface {
Render(io.Writer, Context) error
}
type ASTSeq struct {
Children []ASTNode
}
type ASTChunks struct {
chunks []Chunk
}
type ASTGenericTag struct {
chunk Chunk
render func(io.Writer, Context) error
}
type ASTText struct {
chunk Chunk
}
type ASTObject struct {
chunk Chunk
}
type ASTControlTag struct {
chunk Chunk
cd *ControlTagDefinition
body []ASTNode
branches []*ASTControlTag
}