新增: @use 同文件片段复用

支持 @use("name") 引用同一文件内 @tpl 定义的块,
消除 _list/_count 模板中 WHERE 条件重复问题。
This commit is contained in:
2026-04-01 01:59:51 +08:00
parent a6847c7d18
commit 1b5b6aff8f
7 changed files with 190 additions and 8 deletions

View File

@@ -85,6 +85,13 @@ type CommentNode struct {
func (n *CommentNode) nodeType() string { return "Comment" }
type UseNode struct {
Pos Pos
Name string
}
func (n *UseNode) nodeType() string { return "Use" }
type ExprType int
const (