Documentation ¶
Index ¶
- func AssignDefineStmt(Lhs ast.Expr, Rhs ast.Expr) *ast.AssignStmt
- func AssignStmt(Lhs ast.Expr, Rhs ast.Expr) *ast.AssignStmt
- func BlockStmt(stmts ...ast.Stmt) *ast.BlockStmt
- func CallExpr(fun ast.Expr, args ...ast.Expr) *ast.CallExpr
- func CallExprByName(fun string, args ...ast.Expr) *ast.CallExpr
- func ConstToAst(val constant.Value) ast.Expr
- func DataToArray(data []byte) *ast.CompositeLit
- func DataToByteSlice(data []byte) *ast.CallExpr
- func ExprStmt(expr ast.Expr) *ast.ExprStmt
- func IndexExpr(name string, index ast.Expr) *ast.IndexExpr
- func IndexExprByExpr(xExpr, indexExpr ast.Expr) *ast.IndexExpr
- func IntLit(value int) *ast.BasicLit
- func LambdaCall(resultType ast.Expr, block *ast.BlockStmt) *ast.CallExpr
- func ReturnStmt(results ...ast.Expr) *ast.ReturnStmt
- func SelectExpr(x ast.Expr, sel *ast.Ident) *ast.SelectorExpr
- func StringLit(value string) *ast.BasicLit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssignDefineStmt ¶
AssignDefineStmt "Lhs := Rhs"
func AssignStmt ¶
AssignStmt "Lhs = Rhs"
func CallExprByName ¶
CallExprByName "fun(args...)"
func DataToArray ¶
func DataToArray(data []byte) *ast.CompositeLit
DataToArray turns a byte slice like []byte{1, 2, 3} into an AST expression
func DataToByteSlice ¶
DataToByteSlice turns a byte slice like []byte{1, 2, 3} into an AST expression
func IndexExprByExpr ¶
IndexExprByExpr "xExpr[indexExpr]"
func LambdaCall ¶
LambdaCall "func() resultType {block}()"
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.