php-parser/node/expr/shell_exec.go
2017-12-27 19:55:58 +02:00

36 lines
540 B
Go

package expr
import (
"fmt"
"io"
"github.com/z7zmey/php-parser/node"
)
func (n ShellExec) Name() string {
return "ShellExec"
}
type ShellExec struct {
name string
parts []node.Node
}
func NewShellExec(parts []node.Node) node.Node {
return ShellExec{
"ShellExec",
parts,
}
}
func (n ShellExec) Print(out io.Writer, indent string) {
fmt.Fprintf(out, "\n%v%v [- -]", indent, n.name)
if n.parts != nil {
fmt.Fprintf(out, "\n%vparts:", indent+" ")
for _, nn := range n.parts {
nn.Print(out, indent+" ")
}
}
}