codegen (refactor): clean up helpers a bit

This commit is contained in:
2026-01-31 20:35:03 -08:00
parent f0c152cfe4
commit a36058fdbe
3 changed files with 89 additions and 99 deletions

View File

@@ -0,0 +1,11 @@
package modelgenerate
import "go/ast"
// mustCall wraps a call expression in Must(...), producing AST for Must(inner).
func mustCall(inner ast.Expr) *ast.CallExpr {
return &ast.CallExpr{
Fun: ast.NewIdent("Must"),
Args: []ast.Expr{inner},
}
}