2020-03-12 22:20:48 +00:00
|
|
|
package visitor
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"github.com/z7zmey/php-parser/pkg/ast"
|
2020-07-04 17:59:26 +00:00
|
|
|
"github.com/z7zmey/php-parser/pkg/token"
|
2020-03-12 22:20:48 +00:00
|
|
|
"io"
|
2020-07-04 17:59:26 +00:00
|
|
|
"sort"
|
|
|
|
"strconv"
|
2020-03-12 22:20:48 +00:00
|
|
|
"strings"
|
|
|
|
)
|
|
|
|
|
|
|
|
type meta struct {
|
|
|
|
singleNode bool
|
|
|
|
}
|
|
|
|
|
|
|
|
type Dump struct {
|
|
|
|
writer io.Writer
|
|
|
|
indent int
|
|
|
|
depth int
|
|
|
|
stack []meta
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewDump(writer io.Writer) *Dump {
|
|
|
|
return &Dump{writer: writer}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) print(str string) {
|
|
|
|
_, err := io.WriteString(v.writer, str)
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) printIndent(indentDepth int) {
|
2020-07-05 19:47:46 +00:00
|
|
|
if indentDepth < 0 {
|
|
|
|
indentDepth = 0
|
|
|
|
}
|
|
|
|
|
2020-03-12 22:20:48 +00:00
|
|
|
v.print(strings.Repeat("\t", indentDepth))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) printIndentIfNotSingle(indentDepth int) {
|
2020-07-05 19:47:46 +00:00
|
|
|
if indentDepth < 0 {
|
|
|
|
indentDepth = 0
|
|
|
|
}
|
|
|
|
|
2020-03-12 22:20:48 +00:00
|
|
|
if !v.stack[v.depth-1].singleNode {
|
|
|
|
v.print(strings.Repeat("\t", indentDepth))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) Enter(key string, singleNode bool) {
|
|
|
|
if len(v.stack) < v.depth+1 {
|
|
|
|
v.stack = append(v.stack, meta{})
|
|
|
|
}
|
|
|
|
|
|
|
|
v.stack[v.depth].singleNode = singleNode
|
|
|
|
|
|
|
|
v.printIndent(v.indent)
|
|
|
|
v.print(key)
|
|
|
|
v.print(": ")
|
|
|
|
|
|
|
|
if !singleNode {
|
|
|
|
v.print("[]ast.Vertex{\n")
|
|
|
|
v.indent++
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) Leave(_ string, singleNode bool) {
|
|
|
|
if !singleNode {
|
|
|
|
v.indent--
|
|
|
|
v.printIndent(v.indent)
|
|
|
|
v.print("},\n")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) EnterNode(n ast.Vertex) bool {
|
|
|
|
v.indent++
|
|
|
|
v.depth++
|
|
|
|
|
|
|
|
if len(v.stack) < v.depth {
|
|
|
|
v.stack = append(v.stack, meta{})
|
|
|
|
}
|
|
|
|
|
|
|
|
n.Accept(v)
|
2020-05-12 21:16:36 +00:00
|
|
|
|
2020-03-12 22:20:48 +00:00
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) LeaveNode(_ ast.Vertex) {
|
|
|
|
v.indent--
|
|
|
|
v.depth--
|
|
|
|
v.printIndent(v.indent)
|
|
|
|
v.print("}")
|
|
|
|
if v.depth != 0 {
|
|
|
|
v.print(",")
|
|
|
|
}
|
|
|
|
v.print("\n")
|
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) printNode(n *ast.Node) {
|
|
|
|
if n.Position == nil && n.Tokens == nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
v.printIndent(v.indent)
|
|
|
|
v.print("Node: ast.Node{\n")
|
|
|
|
|
|
|
|
if n.Tokens != nil {
|
|
|
|
v.printIndent(v.indent + 1)
|
|
|
|
v.print("Tokens: token.Collection{\n")
|
|
|
|
|
|
|
|
keys := make([]int, 0, len(n.Tokens))
|
|
|
|
for k := range n.Tokens {
|
|
|
|
keys = append(keys, int(k))
|
|
|
|
}
|
|
|
|
sort.Ints(keys)
|
|
|
|
|
|
|
|
for _, k := range keys {
|
|
|
|
key := token.Position(k)
|
|
|
|
|
|
|
|
v.printIndent(v.indent + 2)
|
2020-08-17 17:31:04 +00:00
|
|
|
v.print("token." + key.String() + ": []*token.Token{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
|
|
|
|
for _, tkn := range n.Tokens[key] {
|
|
|
|
v.printIndent(v.indent + 3)
|
|
|
|
v.print("{\n")
|
|
|
|
|
|
|
|
v.printIndent(v.indent + 4)
|
|
|
|
v.print("ID: token." + tkn.ID.String() + ",\n")
|
|
|
|
|
|
|
|
v.printIndent(v.indent + 4)
|
|
|
|
v.print("Value: []byte(" + strconv.Quote(string(tkn.Value)) + "),\n")
|
|
|
|
|
|
|
|
v.printIndent(v.indent + 3)
|
|
|
|
v.print("},\n")
|
|
|
|
}
|
|
|
|
|
|
|
|
v.printIndent(v.indent + 2)
|
|
|
|
v.print("},\n")
|
|
|
|
}
|
|
|
|
|
|
|
|
v.printIndent(v.indent + 1)
|
|
|
|
v.print("},\n")
|
|
|
|
}
|
|
|
|
|
|
|
|
if n.Position != nil {
|
|
|
|
v.printIndent(v.indent + 1)
|
|
|
|
v.print("Position: &position.Position{\n")
|
|
|
|
|
|
|
|
v.printIndent(v.indent + 2)
|
|
|
|
v.print("StartLine: " + strconv.Itoa(n.Position.StartLine) + ",\n")
|
|
|
|
|
|
|
|
v.printIndent(v.indent + 2)
|
|
|
|
v.print("EndLine: " + strconv.Itoa(n.Position.EndLine) + ",\n")
|
|
|
|
|
|
|
|
v.printIndent(v.indent + 2)
|
|
|
|
v.print("StartPos: " + strconv.Itoa(n.Position.StartPos) + ",\n")
|
|
|
|
|
|
|
|
v.printIndent(v.indent + 2)
|
|
|
|
v.print("EndPos: " + strconv.Itoa(n.Position.EndPos) + ",\n")
|
|
|
|
|
|
|
|
v.printIndent(v.indent + 1)
|
|
|
|
v.print("},\n")
|
|
|
|
}
|
|
|
|
|
|
|
|
v.printIndent(v.indent)
|
|
|
|
v.print("},\n")
|
|
|
|
}
|
|
|
|
|
2020-08-22 13:59:26 +00:00
|
|
|
func (v *Dump) printToken(key string, t *token.Token) {
|
|
|
|
if t == nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
v.printIndent(v.indent)
|
|
|
|
v.print(key)
|
|
|
|
v.print(": &token.Token{\n")
|
|
|
|
|
|
|
|
v.printIndent(v.indent + 1)
|
|
|
|
v.print("ID: token." + t.ID.String() + ",\n")
|
|
|
|
|
|
|
|
v.printIndent(v.indent + 1)
|
|
|
|
v.print("Value: []byte(" + strconv.Quote(string(t.Value)) + "),\n")
|
|
|
|
|
|
|
|
v.printIndent(v.indent + 1)
|
|
|
|
v.print("Skipped: []byte(" + strconv.Quote(string(t.Skipped)) + "),\n")
|
|
|
|
|
|
|
|
v.printIndent(v.indent)
|
|
|
|
v.print("},\n")
|
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) Root(n *ast.Root) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.Root{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) Nullable(n *ast.Nullable) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.Nullable{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) Parameter(n *ast.Parameter) {
|
|
|
|
v.printIndent(v.indent - 1)
|
|
|
|
v.print("&ast.Parameter{\n")
|
2020-07-04 18:22:32 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) Identifier(n *ast.Identifier) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.Identifier{\n")
|
2020-07-04 18:22:32 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-05-13 18:05:15 +00:00
|
|
|
v.printIndent(v.indent)
|
2020-07-04 18:10:41 +00:00
|
|
|
v.print(fmt.Sprintf("Value: []byte(%q),\n", n.Value))
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) Argument(n *ast.Argument) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.Argument{\n")
|
2020-07-04 18:22:32 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtBreak(n *ast.StmtBreak) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtBreak{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtCase(n *ast.StmtCase) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtCase{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtCatch(n *ast.StmtCatch) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtCatch{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtClass(n *ast.StmtClass) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtClass{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtClassConstList(n *ast.StmtClassConstList) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtClassConstList{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtClassExtends(n *ast.StmtClassExtends) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtClassExtends{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtClassImplements(n *ast.StmtClassImplements) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtClassImplements{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) StmtClassMethod(n *ast.StmtClassMethod) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtClassMethod{\n")
|
2020-07-04 18:22:32 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtConstList(n *ast.StmtConstList) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtConstList{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtConstant(n *ast.StmtConstant) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtConstant{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtContinue(n *ast.StmtContinue) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtContinue{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) StmtDeclare(n *ast.StmtDeclare) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtDeclare{\n")
|
2020-07-04 18:22:32 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
|
|
|
|
if n.Alt {
|
|
|
|
v.printIndent(v.indent)
|
|
|
|
v.print("Alt: true,\n")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtDefault(n *ast.StmtDefault) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtDefault{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtDo(n *ast.StmtDo) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtDo{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtEcho(n *ast.StmtEcho) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtEcho{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtElse(n *ast.StmtElse) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtElse{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-09-03 19:18:06 +00:00
|
|
|
|
|
|
|
if n.Alt {
|
|
|
|
v.printIndent(v.indent)
|
|
|
|
v.print("Alt: true,\n")
|
|
|
|
}
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtElseIf(n *ast.StmtElseIf) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtElseIf{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-09-03 19:18:06 +00:00
|
|
|
|
|
|
|
if n.Alt {
|
|
|
|
v.printIndent(v.indent)
|
|
|
|
v.print("Alt: true,\n")
|
|
|
|
}
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtExpression(n *ast.StmtExpression) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtExpression{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtFinally(n *ast.StmtFinally) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtFinally{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtFor(n *ast.StmtFor) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtFor{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-09-04 08:37:17 +00:00
|
|
|
|
|
|
|
if n.Alt {
|
|
|
|
v.printIndent(v.indent)
|
|
|
|
v.print("Alt: true,\n")
|
|
|
|
}
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtForeach(n *ast.StmtForeach) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtForeach{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) StmtFunction(n *ast.StmtFunction) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtFunction{\n")
|
2020-07-04 18:22:32 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtGlobal(n *ast.StmtGlobal) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtGlobal{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtGoto(n *ast.StmtGoto) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtGoto{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtHaltCompiler(n *ast.StmtHaltCompiler) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtHaltCompiler{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtIf(n *ast.StmtIf) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtIf{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-09-03 19:18:06 +00:00
|
|
|
|
|
|
|
if n.Alt {
|
|
|
|
v.printIndent(v.indent)
|
|
|
|
v.print("Alt: true,\n")
|
|
|
|
}
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) StmtInlineHtml(n *ast.StmtInlineHtml) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtInlineHtml{\n")
|
2020-07-04 18:22:32 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-05-13 18:05:15 +00:00
|
|
|
v.printIndent(v.indent)
|
2020-07-04 18:10:41 +00:00
|
|
|
v.print(fmt.Sprintf("Value: []byte(%q),\n", n.Value))
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtInterface(n *ast.StmtInterface) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtInterface{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtInterfaceExtends(n *ast.StmtInterfaceExtends) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtInterfaceExtends{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtLabel(n *ast.StmtLabel) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtLabel{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtNamespace(n *ast.StmtNamespace) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtNamespace{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtNop(n *ast.StmtNop) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtNop{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtProperty(n *ast.StmtProperty) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtProperty{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtPropertyList(n *ast.StmtPropertyList) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtPropertyList{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtReturn(n *ast.StmtReturn) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtReturn{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtStatic(n *ast.StmtStatic) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtStatic{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtStaticVar(n *ast.StmtStaticVar) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtStaticVar{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtStmtList(n *ast.StmtStmtList) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtStmtList{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtSwitch(n *ast.StmtSwitch) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtSwitch{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-09-06 09:45:08 +00:00
|
|
|
|
|
|
|
if n.Alt {
|
|
|
|
v.printIndent(v.indent)
|
|
|
|
v.print("Alt: true,\n")
|
|
|
|
}
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtThrow(n *ast.StmtThrow) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtThrow{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtTrait(n *ast.StmtTrait) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtTrait{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtTraitAdaptationList(n *ast.StmtTraitAdaptationList) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtTraitAdaptationList{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtTraitMethodRef(n *ast.StmtTraitMethodRef) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtTraitMethodRef{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtTraitUse(n *ast.StmtTraitUse) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtTraitUse{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtTraitUseAlias(n *ast.StmtTraitUseAlias) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtTraitUseAlias{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtTraitUsePrecedence(n *ast.StmtTraitUsePrecedence) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtTraitUsePrecedence{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtTry(n *ast.StmtTry) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtTry{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtUnset(n *ast.StmtUnset) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtUnset{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtUse(n *ast.StmtUse) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtUse{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-08-22 13:59:26 +00:00
|
|
|
v.printToken("UseTkn", n.UseTkn)
|
|
|
|
v.printToken("SemiColonTkn", n.SemiColonTkn)
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-08-03 19:22:53 +00:00
|
|
|
}
|
|
|
|
|
2020-08-22 13:59:26 +00:00
|
|
|
func (v *Dump) StmtGroupUse(n *ast.StmtGroupUse) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
2020-08-22 13:59:26 +00:00
|
|
|
v.print("&ast.StmtGroupUse{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-08-22 13:59:26 +00:00
|
|
|
v.printToken("UseTkn", n.UseTkn)
|
|
|
|
v.printToken("LeadingNsSeparatorTkn", n.LeadingNsSeparatorTkn)
|
|
|
|
v.printToken("NsSeparatorTkn", n.NsSeparatorTkn)
|
|
|
|
v.printToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
|
|
|
v.printToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
|
|
|
v.printToken("SemiColonTkn", n.SemiColonTkn)
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-08-03 19:22:53 +00:00
|
|
|
func (v *Dump) StmtUseDeclaration(n *ast.StmtUseDeclaration) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtUseDeclaration{\n")
|
|
|
|
v.printNode(n.GetNode())
|
2020-08-22 13:59:26 +00:00
|
|
|
v.printToken("NsSeparatorTkn", n.NsSeparatorTkn)
|
|
|
|
v.printToken("AsTkn", n.AsTkn)
|
2020-08-03 19:22:53 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) StmtWhile(n *ast.StmtWhile) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.StmtWhile{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-09-04 07:33:47 +00:00
|
|
|
|
|
|
|
if n.Alt {
|
|
|
|
v.printIndent(v.indent)
|
|
|
|
v.print("Alt: true,\n")
|
|
|
|
}
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprArray(n *ast.ExprArray) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprArray{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprArrayDimFetch(n *ast.ExprArrayDimFetch) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprArrayDimFetch{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) ExprArrayItem(n *ast.ExprArrayItem) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprArrayItem{\n")
|
2020-07-04 18:22:32 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) ExprArrowFunction(n *ast.ExprArrowFunction) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprArrowFunction{\n")
|
2020-07-04 18:22:32 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBitwiseNot(n *ast.ExprBitwiseNot) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBitwiseNot{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBooleanNot(n *ast.ExprBooleanNot) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBooleanNot{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprClassConstFetch(n *ast.ExprClassConstFetch) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprClassConstFetch{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprClone(n *ast.ExprClone) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprClone{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) ExprClosure(n *ast.ExprClosure) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprClosure{\n")
|
2020-07-04 18:22:32 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprClosureUse(n *ast.ExprClosureUse) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprClosureUse{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprConstFetch(n *ast.ExprConstFetch) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprConstFetch{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprEmpty(n *ast.ExprEmpty) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprEmpty{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprErrorSuppress(n *ast.ExprErrorSuppress) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprErrorSuppress{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprEval(n *ast.ExprEval) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprEval{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) ExprExit(n *ast.ExprExit) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprExit{\n")
|
2020-07-04 18:22:32 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprFunctionCall(n *ast.ExprFunctionCall) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprFunctionCall{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprInclude(n *ast.ExprInclude) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprInclude{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprIncludeOnce(n *ast.ExprIncludeOnce) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprIncludeOnce{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprInstanceOf(n *ast.ExprInstanceOf) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprInstanceOf{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprIsset(n *ast.ExprIsset) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprIsset{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprList(n *ast.ExprList) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprList{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprMethodCall(n *ast.ExprMethodCall) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprMethodCall{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprNew(n *ast.ExprNew) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprNew{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprPostDec(n *ast.ExprPostDec) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprPostDec{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprPostInc(n *ast.ExprPostInc) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprPostInc{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprPreDec(n *ast.ExprPreDec) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprPreDec{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprPreInc(n *ast.ExprPreInc) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprPreInc{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprPrint(n *ast.ExprPrint) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprPrint{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprPropertyFetch(n *ast.ExprPropertyFetch) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprPropertyFetch{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprReference(n *ast.ExprReference) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprReference{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprRequire(n *ast.ExprRequire) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprRequire{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprRequireOnce(n *ast.ExprRequireOnce) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprRequireOnce{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprShellExec(n *ast.ExprShellExec) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprShellExec{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprStaticCall(n *ast.ExprStaticCall) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprStaticCall{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprStaticPropertyFetch(n *ast.ExprStaticPropertyFetch) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprStaticPropertyFetch{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprTernary(n *ast.ExprTernary) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprTernary{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprUnaryMinus(n *ast.ExprUnaryMinus) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprUnaryMinus{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprUnaryPlus(n *ast.ExprUnaryPlus) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprUnaryPlus{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprVariable(n *ast.ExprVariable) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprVariable{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprYield(n *ast.ExprYield) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprYield{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprYieldFrom(n *ast.ExprYieldFrom) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprYieldFrom{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprAssign(n *ast.ExprAssign) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprAssign{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprAssignReference(n *ast.ExprAssignReference) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprAssignReference{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprAssignBitwiseAnd(n *ast.ExprAssignBitwiseAnd) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprAssignBitwiseAnd{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprAssignBitwiseOr(n *ast.ExprAssignBitwiseOr) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprAssignBitwiseOr{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprAssignBitwiseXor(n *ast.ExprAssignBitwiseXor) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprAssignBitwiseXor{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprAssignCoalesce(n *ast.ExprAssignCoalesce) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprAssignCoalesce{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprAssignConcat(n *ast.ExprAssignConcat) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprAssignConcat{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprAssignDiv(n *ast.ExprAssignDiv) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprAssignDiv{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprAssignMinus(n *ast.ExprAssignMinus) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprAssignMinus{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprAssignMod(n *ast.ExprAssignMod) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprAssignMod{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprAssignMul(n *ast.ExprAssignMul) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprAssignMul{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprAssignPlus(n *ast.ExprAssignPlus) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprAssignPlus{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprAssignPow(n *ast.ExprAssignPow) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprAssignPow{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprAssignShiftLeft(n *ast.ExprAssignShiftLeft) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprAssignShiftLeft{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprAssignShiftRight(n *ast.ExprAssignShiftRight) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprAssignShiftRight{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryBitwiseAnd(n *ast.ExprBinaryBitwiseAnd) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryBitwiseAnd{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryBitwiseOr(n *ast.ExprBinaryBitwiseOr) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryBitwiseOr{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryBitwiseXor(n *ast.ExprBinaryBitwiseXor) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryBitwiseXor{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryBooleanAnd(n *ast.ExprBinaryBooleanAnd) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryBooleanAnd{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryBooleanOr(n *ast.ExprBinaryBooleanOr) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryBooleanOr{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryCoalesce(n *ast.ExprBinaryCoalesce) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryCoalesce{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryConcat(n *ast.ExprBinaryConcat) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryConcat{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryDiv(n *ast.ExprBinaryDiv) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryDiv{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryEqual(n *ast.ExprBinaryEqual) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryEqual{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryGreater(n *ast.ExprBinaryGreater) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryGreater{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryGreaterOrEqual(n *ast.ExprBinaryGreaterOrEqual) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryGreaterOrEqual{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryIdentical(n *ast.ExprBinaryIdentical) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryIdentical{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryLogicalAnd(n *ast.ExprBinaryLogicalAnd) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryLogicalAnd{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryLogicalOr(n *ast.ExprBinaryLogicalOr) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryLogicalOr{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryLogicalXor(n *ast.ExprBinaryLogicalXor) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryLogicalXor{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryMinus(n *ast.ExprBinaryMinus) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryMinus{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryMod(n *ast.ExprBinaryMod) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryMod{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryMul(n *ast.ExprBinaryMul) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryMul{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryNotEqual(n *ast.ExprBinaryNotEqual) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryNotEqual{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryNotIdentical(n *ast.ExprBinaryNotIdentical) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryNotIdentical{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryPlus(n *ast.ExprBinaryPlus) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryPlus{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryPow(n *ast.ExprBinaryPow) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryPow{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryShiftLeft(n *ast.ExprBinaryShiftLeft) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryShiftLeft{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinaryShiftRight(n *ast.ExprBinaryShiftRight) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinaryShiftRight{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinarySmaller(n *ast.ExprBinarySmaller) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinarySmaller{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinarySmallerOrEqual(n *ast.ExprBinarySmallerOrEqual) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinarySmallerOrEqual{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprBinarySpaceship(n *ast.ExprBinarySpaceship) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprBinarySpaceship{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprCastArray(n *ast.ExprCastArray) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprCastArray{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprCastBool(n *ast.ExprCastBool) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprCastBool{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprCastDouble(n *ast.ExprCastDouble) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprCastDouble{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprCastInt(n *ast.ExprCastInt) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprCastInt{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprCastObject(n *ast.ExprCastObject) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprCastObject{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprCastString(n *ast.ExprCastString) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprCastString{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ExprCastUnset(n *ast.ExprCastUnset) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ExprCastUnset{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) ScalarDnumber(n *ast.ScalarDnumber) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ScalarDnumber{\n")
|
2020-07-04 18:22:32 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-05-13 18:05:15 +00:00
|
|
|
v.printIndent(v.indent)
|
2020-07-04 18:10:41 +00:00
|
|
|
v.print(fmt.Sprintf("Value: []byte(%q),\n", n.Value))
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) ScalarEncapsed(n *ast.ScalarEncapsed) {
|
2020-03-12 22:20:48 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ScalarEncapsed{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) ScalarEncapsedStringPart(n *ast.ScalarEncapsedStringPart) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ScalarEncapsedStringPart{\n")
|
2020-07-04 18:22:32 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-05-13 18:05:15 +00:00
|
|
|
v.printIndent(v.indent)
|
2020-07-04 18:10:41 +00:00
|
|
|
v.print(fmt.Sprintf("Value: []byte(%q),\n", n.Value))
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) ScalarHeredoc(n *ast.ScalarHeredoc) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ScalarHeredoc{\n")
|
2020-07-04 18:22:32 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) ScalarLnumber(n *ast.ScalarLnumber) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ScalarLnumber{\n")
|
2020-07-04 18:22:32 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-05-13 18:05:15 +00:00
|
|
|
v.printIndent(v.indent)
|
2020-07-04 18:10:41 +00:00
|
|
|
v.print(fmt.Sprintf("Value: []byte(%q),\n", n.Value))
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) ScalarMagicConstant(n *ast.ScalarMagicConstant) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ScalarMagicConstant{\n")
|
2020-07-04 18:22:32 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-05-13 18:05:15 +00:00
|
|
|
v.printIndent(v.indent)
|
2020-07-04 18:10:41 +00:00
|
|
|
v.print(fmt.Sprintf("Value: []byte(%q),\n", n.Value))
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) ScalarString(n *ast.ScalarString) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ScalarString{\n")
|
2020-07-04 18:22:32 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-05-13 18:05:15 +00:00
|
|
|
v.printIndent(v.indent)
|
2020-07-04 18:10:41 +00:00
|
|
|
v.print(fmt.Sprintf("Value: []byte(%q),\n", n.Value))
|
2020-05-13 18:05:15 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) NameName(n *ast.NameName) {
|
2020-05-13 18:05:15 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.NameName{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-05-13 18:05:15 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) NameFullyQualified(n *ast.NameFullyQualified) {
|
2020-05-13 18:05:15 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.NameFullyQualified{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-05-13 18:05:15 +00:00
|
|
|
}
|
|
|
|
|
2020-07-04 17:59:26 +00:00
|
|
|
func (v *Dump) NameRelative(n *ast.NameRelative) {
|
2020-05-13 18:05:15 +00:00
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.NameRelative{\n")
|
2020-07-04 17:59:26 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-05-13 18:05:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dump) NameNamePart(n *ast.NameNamePart) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.NameNamePart{\n")
|
2020-07-04 18:22:32 +00:00
|
|
|
v.printNode(n.GetNode())
|
2020-05-13 18:05:15 +00:00
|
|
|
|
|
|
|
v.printIndent(v.indent)
|
2020-07-04 18:10:41 +00:00
|
|
|
v.print(fmt.Sprintf("Value: []byte(%q),\n", n.Value))
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
2020-08-08 22:56:21 +00:00
|
|
|
|
|
|
|
func (v *Dump) ParserBrackets(n *ast.ParserBrackets) {
|
|
|
|
v.printIndentIfNotSingle(v.indent - 1)
|
|
|
|
v.print("&ast.ParserBrackets{\n")
|
|
|
|
v.printNode(n.GetNode())
|
|
|
|
}
|
2020-09-14 16:25:38 +00:00
|
|
|
|
|
|
|
func (v *Dump) ParserSeparatedList(n *ast.ParserSeparatedList) {
|
|
|
|
// do nothing
|
|
|
|
}
|