1
0
mirror of https://github.com/danog/liquid.git synced 2024-12-12 14:47:25 +01:00
liquid/chunks/ast.go

34 lines
418 B
Go
Raw Normal View History

2017-06-26 15:36:52 +02:00
package chunks
2017-06-25 17:23:20 +02:00
import (
"io"
)
2017-06-26 18:41:41 +02:00
// ASTNode is a node of an AST.
type ASTNode interface {
2017-06-25 17:23:20 +02:00
Render(io.Writer, Context) error
}
type ASTSeq struct {
2017-06-26 18:41:41 +02:00
Children []ASTNode
2017-06-25 17:23:20 +02:00
}
type ASTChunks struct {
chunks []Chunk
}
type ASTText struct {
chunk Chunk
}
type ASTObject struct {
chunk Chunk
}
type ASTControlTag struct {
chunk Chunk
cd *ControlTagDefinition
2017-06-26 18:41:41 +02:00
body []ASTNode
2017-06-25 17:23:20 +02:00
branches []*ASTControlTag
}