php-parser/node/expr/assign_op/assign_op.go
2017-12-18 21:34:11 +02:00

29 lines
515 B
Go

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+" ")
}
if n.expression != nil {
fmt.Fprintf(out, "\n%vexpression:", indent+" ")
n.expression.Print(out, indent+" ")
}
}