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.
20 lines
296 B
20 lines
296 B
8 years ago
|
package gogen
|
||
|
|
||
|
import (
|
||
|
"go/ast"
|
||
|
"go/token"
|
||
|
)
|
||
|
|
||
|
type DeclareAndAssign struct {
|
||
|
Lhs Expression
|
||
|
Rhs Expression
|
||
|
}
|
||
|
|
||
|
func (me DeclareAndAssign) Statement() ast.Stmt {
|
||
|
return &ast.AssignStmt{
|
||
|
Tok: token.DEFINE,
|
||
|
Lhs: []ast.Expr{me.Lhs.Expression()},
|
||
|
Rhs: []ast.Expr{me.Rhs.Expression()},
|
||
|
}
|
||
|
}
|