2017-12-12 21:26:00 +00:00
|
|
|
package assign_op
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"io"
|
|
|
|
|
|
|
|
"github.com/z7zmey/php-parser/node"
|
|
|
|
)
|
|
|
|
|
|
|
|
type AssignOp struct {
|
|
|
|
node.SimpleNode
|
|
|
|
variable node.Node
|
|
|
|
expression node.Node
|
|
|
|
}
|
|
|
|
|
|
|
|
func (n AssignOp) Print(out io.Writer, indent string) {
|
|
|
|
fmt.Fprintf(out, "\n%v%v [- -]", indent, n.Name)
|
|
|
|
|
|
|
|
if n.variable != nil {
|
|
|
|
fmt.Fprintf(out, "\n%vvariable:", indent+" ")
|
|
|
|
n.variable.Print(out, indent+" ")
|
|
|
|
}
|
2017-12-18 19:34:11 +00:00
|
|
|
|
2017-12-12 21:26:00 +00:00
|
|
|
if n.expression != nil {
|
|
|
|
fmt.Fprintf(out, "\n%vexpression:", indent+" ")
|
|
|
|
n.expression.Print(out, indent+" ")
|
|
|
|
}
|
|
|
|
}
|