Command gencodec generates marshaling methods for Go struct types.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package gogen
|
|
|
|
import (
|
|
"go/ast"
|
|
"go/token"
|
|
)
|
|
|
|
type Assign struct {
|
|
Lhs Expression
|
|
Rhs Expression
|
|
}
|
|
|
|
func (me Assign) Statement() ast.Stmt {
|
|
return &ast.AssignStmt{
|
|
Tok: token.ASSIGN,
|
|
Lhs: []ast.Expr{me.Lhs.Expression()},
|
|
Rhs: []ast.Expr{me.Rhs.Expression()},
|
|
}
|
|
}
|
|
|