2020-12-28 19:13:08 +00:00
|
|
|
package dumper
|
2020-03-12 22:20:48 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"io"
|
2020-07-04 17:59:26 +00:00
|
|
|
"strconv"
|
2020-03-12 22:20:48 +00:00
|
|
|
"strings"
|
|
|
|
|
2023-12-09 21:36:19 +00:00
|
|
|
"git.maride.cc/maride/php-parser/pkg/position"
|
|
|
|
"git.maride.cc/maride/php-parser/pkg/token"
|
2021-07-30 17:53:27 +00:00
|
|
|
|
2023-12-09 21:36:19 +00:00
|
|
|
"git.maride.cc/maride/php-parser/pkg/ast"
|
2020-12-11 11:28:16 +00:00
|
|
|
)
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
type Dumper struct {
|
2020-12-11 11:28:16 +00:00
|
|
|
writer io.Writer
|
|
|
|
indent int
|
|
|
|
withTokens bool
|
|
|
|
withPositions bool
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func NewDumper(writer io.Writer) *Dumper {
|
|
|
|
return &Dumper{writer: writer}
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) WithTokens() *Dumper {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.withTokens = true
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) WithPositions() *Dumper {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.withPositions = true
|
|
|
|
return v
|
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) Dump(n ast.Vertex) {
|
2020-12-11 11:28:16 +00:00
|
|
|
n.Accept(v)
|
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) print(indent int, str string) {
|
2020-12-11 11:28:16 +00:00
|
|
|
_, err := io.WriteString(v.writer, strings.Repeat("\t", indent))
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
_, err = io.WriteString(v.writer, str)
|
2020-03-12 22:20:48 +00:00
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) dumpVertex(key string, node ast.Vertex) {
|
2020-12-11 11:28:16 +00:00
|
|
|
if node == nil {
|
|
|
|
return
|
2020-07-05 19:47:46 +00:00
|
|
|
}
|
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(v.indent, key+": ")
|
|
|
|
node.Accept(v)
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) dumpVertexList(key string, list []ast.Vertex) {
|
2020-12-11 11:28:16 +00:00
|
|
|
if list == nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
if len(list) == 0 {
|
|
|
|
v.print(v.indent, key+": []ast.Vertex{},\n")
|
|
|
|
return
|
2020-07-05 19:47:46 +00:00
|
|
|
}
|
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(v.indent, key+": []ast.Vertex{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
for _, nn := range list {
|
|
|
|
v.print(v.indent, "")
|
|
|
|
nn.Accept(v)
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
2020-12-11 11:28:16 +00:00
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) dumpToken(key string, tok *token.Token) {
|
2020-12-11 11:28:16 +00:00
|
|
|
if !v.withTokens {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
if tok == nil {
|
|
|
|
return
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
if key == "" {
|
|
|
|
v.print(v.indent, "{\n")
|
|
|
|
} else {
|
|
|
|
v.print(v.indent, key+": &token.Token{\n")
|
|
|
|
}
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.indent++
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
if tok.ID > 0 {
|
|
|
|
v.print(v.indent, "ID: token."+tok.ID.String()+",\n")
|
|
|
|
}
|
|
|
|
if tok.Value != nil {
|
2020-12-28 21:01:02 +00:00
|
|
|
v.print(v.indent, "Val: []byte("+strconv.Quote(string(tok.Value))+"),\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpPosition(tok.Position)
|
|
|
|
v.dumpTokenList("FreeFloating", tok.FreeFloating)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) dumpTokenList(key string, list []*token.Token) {
|
2020-12-11 11:28:16 +00:00
|
|
|
if !v.withTokens {
|
|
|
|
return
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
if list == nil {
|
|
|
|
return
|
|
|
|
}
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
if len(list) == 0 {
|
|
|
|
v.print(v.indent, key+": []*token.Token{},\n")
|
|
|
|
return
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(v.indent, key+": []*token.Token{\n")
|
|
|
|
v.indent++
|
2020-05-12 21:16:36 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
for _, tok := range list {
|
|
|
|
v.dumpToken("", tok)
|
|
|
|
}
|
2020-03-12 22:20:48 +00:00
|
|
|
|
|
|
|
v.indent--
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) dumpPosition(pos *position.Position) {
|
2020-12-11 11:28:16 +00:00
|
|
|
if !v.withPositions {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
if pos == nil {
|
2020-08-22 13:59:26 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(v.indent, "Position: &position.Position{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.print(v.indent, "StartLine: "+strconv.Itoa(pos.StartLine)+",\n")
|
|
|
|
v.print(v.indent, "EndLine: "+strconv.Itoa(pos.EndLine)+",\n")
|
2023-03-26 00:54:00 +00:00
|
|
|
v.print(v.indent, "StartCol: "+strconv.Itoa(pos.StartCol)+",\n")
|
|
|
|
v.print(v.indent, "EndCol: "+strconv.Itoa(pos.EndCol)+",\n")
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(v.indent, "StartPos: "+strconv.Itoa(pos.StartPos)+",\n")
|
|
|
|
v.print(v.indent, "EndPos: "+strconv.Itoa(pos.EndPos)+",\n")
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
|
|
|
}
|
2020-08-22 13:59:26 +00:00
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) dumpValue(key string, val []byte) {
|
2020-12-11 11:28:16 +00:00
|
|
|
if val == nil {
|
|
|
|
return
|
|
|
|
}
|
2020-08-22 13:59:26 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(v.indent, key+": []byte("+strconv.Quote(string(val))+"),\n")
|
2020-08-22 13:59:26 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) Root(n *ast.Root) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.Root{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertexList("Stmts", n.Stmts)
|
|
|
|
v.dumpToken("EndTkn", n.EndTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) Nullable(n *ast.Nullable) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.Nullable{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("QuestionTkn", n.QuestionTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) Parameter(n *ast.Parameter) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.Parameter{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2021-07-30 17:53:27 +00:00
|
|
|
v.dumpVertexList("AttrGroups", n.AttrGroups)
|
2021-07-31 15:00:21 +00:00
|
|
|
v.dumpVertexList("Modifiers", n.Modifiers)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertex("Type", n.Type)
|
|
|
|
v.dumpToken("AmpersandTkn", n.AmpersandTkn)
|
|
|
|
v.dumpToken("VariadicTkn", n.VariadicTkn)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("DefaultValue", n.DefaultValue)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) Identifier(n *ast.Identifier) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.Identifier{\n")
|
|
|
|
v.indent++
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("IdentifierTkn", n.IdentifierTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpValue("Val", n.Value)
|
2020-12-11 11:28:16 +00:00
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) Argument(n *ast.Argument) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.Argument{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("AmpersandTkn", n.AmpersandTkn)
|
2021-07-30 17:53:27 +00:00
|
|
|
v.dumpVertex("Name", n.Name)
|
|
|
|
v.dumpToken("ColonTkn", n.ColonTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("VariadicTkn", n.VariadicTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2021-07-30 17:53:27 +00:00
|
|
|
func (v *Dumper) MatchArm(n *ast.MatchArm) {
|
|
|
|
v.print(0, "&ast.MatchArm{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("DefaultTkn", n.DefaultTkn)
|
|
|
|
v.dumpToken("DefaultCommaTkn", n.DefaultCommaTkn)
|
|
|
|
v.dumpVertexList("Exprs", n.Exprs)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("DoubleArrowTkn", n.DoubleArrowTkn)
|
|
|
|
v.dumpVertex("ReturnExpr", n.ReturnExpr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dumper) Union(n *ast.Union) {
|
|
|
|
v.print(0, "&ast.Union{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertexList("Types", n.Types)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
|
|
|
}
|
|
|
|
|
2022-06-26 00:31:29 +00:00
|
|
|
func (v *Dumper) Intersection(n *ast.Intersection) {
|
|
|
|
v.print(0, "&ast.Intersection{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertexList("Types", n.Types)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
|
|
|
}
|
2021-07-30 17:53:27 +00:00
|
|
|
func (v *Dumper) Attribute(n *ast.Attribute) {
|
|
|
|
v.print(0, "&ast.Attribute{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Name", n.Name)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertexList("Args", n.Args)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dumper) AttributeGroup(n *ast.AttributeGroup) {
|
|
|
|
v.print(0, "&ast.AttributeGroup{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("OpenAttributeTkn", n.OpenAttributeTkn)
|
|
|
|
v.dumpVertexList("Attrs", n.Attrs)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("CloseAttributeTkn", n.CloseAttributeTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtBreak(n *ast.StmtBreak) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtBreak{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("BreakTkn", n.BreakTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtCase(n *ast.StmtCase) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtCase{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("CaseTkn", n.CaseTkn)
|
|
|
|
v.dumpVertex("Cond", n.Cond)
|
|
|
|
v.dumpToken("CaseSeparatorTkn", n.CaseSeparatorTkn)
|
|
|
|
v.dumpVertexList("Stmts", n.Stmts)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtCatch(n *ast.StmtCatch) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtCatch{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("CatchTkn", n.CatchTkn)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertexList("Types", n.Types)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
|
|
|
v.dumpVertexList("Stmts", n.Stmts)
|
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2021-07-31 16:44:09 +00:00
|
|
|
func (v *Dumper) StmtEnum(n *ast.StmtEnum) {
|
|
|
|
v.print(0, "&ast.StmtEnum{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertexList("AttrGroups", n.AttrGroups)
|
|
|
|
v.dumpToken("EnumTkn", n.EnumTkn)
|
|
|
|
v.dumpVertex("Name", n.Name)
|
|
|
|
v.dumpToken("ColonTkn", n.ColonTkn)
|
|
|
|
v.dumpVertex("Type", n.Type)
|
|
|
|
v.dumpToken("ImplementsTkn", n.ImplementsTkn)
|
|
|
|
v.dumpVertexList("Implements", n.Implements)
|
|
|
|
v.dumpTokenList("ImplementsSeparatorTkns", n.ImplementsSeparatorTkns)
|
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
|
|
|
v.dumpVertexList("Stmts", n.Stmts)
|
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dumper) EnumCase(n *ast.EnumCase) {
|
|
|
|
v.print(0, "&ast.EnumCase{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertexList("AttrGroups", n.AttrGroups)
|
|
|
|
v.dumpToken("CaseTkn", n.CaseTkn)
|
|
|
|
v.dumpVertex("Name", n.Name)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtClass(n *ast.StmtClass) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtClass{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2021-07-30 17:53:27 +00:00
|
|
|
v.dumpVertexList("AttrGroups", n.AttrGroups)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertexList("Modifiers", n.Modifiers)
|
|
|
|
v.dumpToken("ClassTkn", n.ClassTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertex("Name", n.Name)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertexList("Args", n.Args)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
2020-12-28 08:10:15 +00:00
|
|
|
v.dumpToken("ExtendsTkn", n.ExtendsTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertex("Extends", n.Extends)
|
2020-12-28 08:10:15 +00:00
|
|
|
v.dumpToken("ImplementsTkn", n.ImplementsTkn)
|
|
|
|
v.dumpVertexList("Implements", n.Implements)
|
|
|
|
v.dumpTokenList("ImplementsSeparatorTkns", n.ImplementsSeparatorTkns)
|
2020-12-11 15:29:22 +00:00
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertexList("Stmts", n.Stmts)
|
2020-12-11 15:29:22 +00:00
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtClassConstList(n *ast.StmtClassConstList) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtClassConstList{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2021-07-30 17:53:27 +00:00
|
|
|
v.dumpVertexList("AttrGroups", n.AttrGroups)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertexList("Modifiers", n.Modifiers)
|
|
|
|
v.dumpToken("ConstTkn", n.ConstTkn)
|
|
|
|
v.dumpVertexList("Consts", n.Consts)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtClassMethod(n *ast.StmtClassMethod) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtClassMethod{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2021-07-30 17:53:27 +00:00
|
|
|
v.dumpVertexList("AttrGroups", n.AttrGroups)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertexList("Modifiers", n.Modifiers)
|
|
|
|
v.dumpToken("FunctionTkn", n.FunctionTkn)
|
|
|
|
v.dumpToken("AmpersandTkn", n.AmpersandTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertex("Name", n.Name)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertexList("Params", n.Params)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
v.dumpToken("ColonTkn", n.ColonTkn)
|
|
|
|
v.dumpVertex("ReturnType", n.ReturnType)
|
|
|
|
v.dumpVertex("Stmt", n.Stmt)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtConstList(n *ast.StmtConstList) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtConstList{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("ConstTkn", n.ConstTkn)
|
|
|
|
v.dumpVertexList("Consts", n.Consts)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtConstant(n *ast.StmtConstant) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtConstant{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Name", n.Name)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtContinue(n *ast.StmtContinue) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtContinue{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("ContinueTkn", n.ContinueTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtDeclare(n *ast.StmtDeclare) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtDeclare{\n")
|
|
|
|
v.indent++
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("DeclareTkn", n.DeclareTkn)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertexList("Consts", n.Consts)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
v.dumpToken("ColonTkn", n.ColonTkn)
|
|
|
|
v.dumpVertex("Stmt", n.Stmt)
|
|
|
|
v.dumpToken("EndDeclareTkn", n.EndDeclareTkn)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtDefault(n *ast.StmtDefault) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtDefault{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("DefaultTkn", n.DefaultTkn)
|
|
|
|
v.dumpToken("CaseSeparatorTkn", n.CaseSeparatorTkn)
|
|
|
|
v.dumpVertexList("Stmts", n.Stmts)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtDo(n *ast.StmtDo) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtDo{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("DoTkn", n.DoTkn)
|
|
|
|
v.dumpVertex("Stmt", n.Stmt)
|
|
|
|
v.dumpToken("WhileTkn", n.WhileTkn)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertex("Cond", n.Cond)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
|
|
|
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtEcho(n *ast.StmtEcho) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtEcho{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("EchoTkn", n.EchoTkn)
|
|
|
|
v.dumpVertexList("Exprs", n.Exprs)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtElse(n *ast.StmtElse) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtElse{\n")
|
|
|
|
v.indent++
|
2020-09-03 19:18:06 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("ElseTkn", n.ElseTkn)
|
|
|
|
v.dumpToken("ColonTkn", n.ColonTkn)
|
|
|
|
v.dumpVertex("Stmt", n.Stmt)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtElseIf(n *ast.StmtElseIf) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtElseIf{\n")
|
|
|
|
v.indent++
|
2020-09-03 19:18:06 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("ElseIfTkn", n.ElseIfTkn)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertex("Cond", n.Cond)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
v.dumpToken("ColonTkn", n.ColonTkn)
|
|
|
|
v.dumpVertex("Stmt", n.Stmt)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtExpression(n *ast.StmtExpression) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtExpression{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtFinally(n *ast.StmtFinally) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtFinally{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("FinallyTkn", n.FinallyTkn)
|
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
|
|
|
v.dumpVertexList("Stmts", n.Stmts)
|
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtFor(n *ast.StmtFor) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtFor{\n")
|
|
|
|
v.indent++
|
2020-09-04 08:37:17 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("ForTkn", n.ForTkn)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertexList("Init", n.Init)
|
|
|
|
v.dumpTokenList("InitSeparatorTkns", n.InitSeparatorTkns)
|
|
|
|
v.dumpToken("InitSemiColonTkn", n.InitSemiColonTkn)
|
|
|
|
v.dumpVertexList("Cond", n.Cond)
|
|
|
|
v.dumpTokenList("CondSeparatorTkns", n.CondSeparatorTkns)
|
|
|
|
v.dumpToken("CondSemiColonTkn", n.CondSemiColonTkn)
|
|
|
|
v.dumpVertexList("Loop", n.Loop)
|
|
|
|
v.dumpTokenList("LoopSeparatorTkns", n.LoopSeparatorTkns)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
v.dumpToken("ColonTkn", n.ColonTkn)
|
|
|
|
v.dumpVertex("Stmt", n.Stmt)
|
|
|
|
v.dumpToken("EndForTkn", n.EndForTkn)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtForeach(n *ast.StmtForeach) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtForeach{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("ForeachTkn", n.ForeachTkn)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
v.dumpToken("AsTkn", n.AsTkn)
|
|
|
|
v.dumpVertex("Key", n.Key)
|
|
|
|
v.dumpToken("DoubleArrowTkn", n.DoubleArrowTkn)
|
2020-12-26 17:38:45 +00:00
|
|
|
v.dumpToken("AmpersandTkn", n.AmpersandTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
v.dumpToken("ColonTkn", n.ColonTkn)
|
|
|
|
v.dumpVertex("Stmt", n.Stmt)
|
|
|
|
v.dumpToken("EndForeachTkn", n.EndForeachTkn)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtFunction(n *ast.StmtFunction) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtFunction{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2021-07-30 17:53:27 +00:00
|
|
|
v.dumpVertexList("AttrGroups", n.AttrGroups)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("FunctionTkn", n.FunctionTkn)
|
|
|
|
v.dumpToken("AmpersandTkn", n.AmpersandTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertex("Name", n.Name)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertexList("Params", n.Params)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
v.dumpToken("ColonTkn", n.ColonTkn)
|
|
|
|
v.dumpVertex("ReturnType", n.ReturnType)
|
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
|
|
|
v.dumpVertexList("Stmts", n.Stmts)
|
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtGlobal(n *ast.StmtGlobal) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtGlobal{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("GlobalTkn", n.GlobalTkn)
|
|
|
|
v.dumpVertexList("Vars", n.Vars)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtGoto(n *ast.StmtGoto) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtGoto{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("GotoTkn", n.GotoTkn)
|
|
|
|
v.dumpVertex("Label", n.Label)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtHaltCompiler(n *ast.StmtHaltCompiler) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtHaltCompiler{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("HaltCompilerTkn", n.HaltCompilerTkn)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtIf(n *ast.StmtIf) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtIf{\n")
|
|
|
|
v.indent++
|
2020-09-03 19:18:06 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("IfTkn", n.IfTkn)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertex("Cond", n.Cond)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
v.dumpToken("ColonTkn", n.ColonTkn)
|
|
|
|
v.dumpVertex("Stmt", n.Stmt)
|
|
|
|
v.dumpVertexList("ElseIf", n.ElseIf)
|
|
|
|
v.dumpVertex("Else", n.Else)
|
|
|
|
v.dumpToken("EndIfTkn", n.EndIfTkn)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtInlineHtml(n *ast.StmtInlineHtml) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtInlineHtml{\n")
|
|
|
|
v.indent++
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("InlineHtmlTkn", n.InlineHtmlTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpValue("Val", n.Value)
|
2020-12-11 11:28:16 +00:00
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtInterface(n *ast.StmtInterface) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtInterface{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2021-07-30 17:53:27 +00:00
|
|
|
v.dumpVertexList("AttrGroups", n.AttrGroups)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("InterfaceTkn", n.InterfaceTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertex("Name", n.Name)
|
2020-12-28 08:10:15 +00:00
|
|
|
v.dumpToken("ExtendsTkn", n.ExtendsTkn)
|
|
|
|
v.dumpVertexList("Extends", n.Extends)
|
|
|
|
v.dumpTokenList("ExtendsSeparatorTkns", n.ExtendsSeparatorTkns)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
|
|
|
v.dumpVertexList("Stmts", n.Stmts)
|
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtLabel(n *ast.StmtLabel) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtLabel{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertex("Name", n.Name)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("ColonTkn", n.ColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtNamespace(n *ast.StmtNamespace) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtNamespace{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("NsTkn", n.NsTkn)
|
|
|
|
v.dumpVertex("Name", n.Name)
|
2020-12-11 15:29:22 +00:00
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertexList("Stmts", n.Stmts)
|
2020-12-11 15:29:22 +00:00
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtNop(n *ast.StmtNop) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtNop{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtProperty(n *ast.StmtProperty) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtProperty{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtPropertyList(n *ast.StmtPropertyList) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtPropertyList{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2021-07-30 17:53:27 +00:00
|
|
|
v.dumpVertexList("AttrGroups", n.AttrGroups)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertexList("Modifiers", n.Modifiers)
|
|
|
|
v.dumpVertex("Type", n.Type)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertexList("Props", n.Props)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtReturn(n *ast.StmtReturn) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtReturn{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("ReturnTkn", n.ReturnTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtStatic(n *ast.StmtStatic) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtStatic{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("StaticTkn", n.StaticTkn)
|
|
|
|
v.dumpVertexList("Vars", n.Vars)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtStaticVar(n *ast.StmtStaticVar) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtStaticVar{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtStmtList(n *ast.StmtStmtList) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtStmtList{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2020-12-11 15:29:22 +00:00
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertexList("Stmts", n.Stmts)
|
2020-12-11 15:29:22 +00:00
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtSwitch(n *ast.StmtSwitch) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtSwitch{\n")
|
|
|
|
v.indent++
|
2020-09-06 09:45:08 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("SwitchTkn", n.SwitchTkn)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertex("Cond", n.Cond)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
v.dumpToken("ColonTkn", n.ColonTkn)
|
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
|
|
|
v.dumpToken("CaseSeparatorTkn", n.CaseSeparatorTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertexList("Cases", n.Cases)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
|
|
|
v.dumpToken("EndSwitchTkn", n.EndSwitchTkn)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtThrow(n *ast.StmtThrow) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtThrow{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("ThrowTkn", n.ThrowTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtTrait(n *ast.StmtTrait) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtTrait{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2021-07-30 17:53:27 +00:00
|
|
|
v.dumpVertexList("AttrGroups", n.AttrGroups)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("TraitTkn", n.TraitTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertex("Name", n.Name)
|
2020-12-11 15:29:22 +00:00
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertexList("Stmts", n.Stmts)
|
2020-12-11 15:29:22 +00:00
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtTraitUse(n *ast.StmtTraitUse) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtTraitUse{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("UseTkn", n.UseTkn)
|
|
|
|
v.dumpVertexList("Traits", n.Traits)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
2020-12-20 21:04:23 +00:00
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
|
|
|
v.dumpVertexList("Adaptations", n.Adaptations)
|
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtTraitUseAlias(n *ast.StmtTraitUseAlias) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtTraitUseAlias{\n")
|
|
|
|
v.indent++
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpPosition(n.Position)
|
2020-12-28 08:47:09 +00:00
|
|
|
v.dumpVertex("Trait", n.Trait)
|
|
|
|
v.dumpToken("DoubleColonTkn", n.DoubleColonTkn)
|
|
|
|
v.dumpVertex("Method", n.Method)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("AsTkn", n.AsTkn)
|
|
|
|
v.dumpVertex("Modifier", n.Modifier)
|
|
|
|
v.dumpVertex("Alias", n.Alias)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtTraitUsePrecedence(n *ast.StmtTraitUsePrecedence) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtTraitUsePrecedence{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2020-12-28 08:47:09 +00:00
|
|
|
v.dumpVertex("Trait", n.Trait)
|
|
|
|
v.dumpToken("DoubleColonTkn", n.DoubleColonTkn)
|
|
|
|
v.dumpVertex("Method", n.Method)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("InsteadofTkn", n.InsteadofTkn)
|
|
|
|
v.dumpVertexList("Insteadof", n.Insteadof)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtTry(n *ast.StmtTry) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtTry{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("TryTkn", n.TryTkn)
|
2020-12-11 15:29:22 +00:00
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertexList("Stmts", n.Stmts)
|
2020-12-11 15:29:22 +00:00
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertexList("Catches", n.Catches)
|
|
|
|
v.dumpVertex("Finally", n.Finally)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtUnset(n *ast.StmtUnset) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtUnset{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("UnsetTkn", n.UnsetTkn)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertexList("Vars", n.Vars)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-28 21:01:02 +00:00
|
|
|
func (v *Dumper) StmtUse(n *ast.StmtUseList) {
|
|
|
|
v.print(0, "&ast.StmtUseList{\n")
|
2020-12-11 11:28:16 +00:00
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("UseTkn", n.UseTkn)
|
|
|
|
v.dumpVertex("Type", n.Type)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertexList("Uses", n.Uses)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-08-03 19:22:53 +00:00
|
|
|
}
|
|
|
|
|
2020-12-28 21:01:02 +00:00
|
|
|
func (v *Dumper) StmtGroupUse(n *ast.StmtGroupUseList) {
|
|
|
|
v.print(0, "&ast.StmtGroupUseList{\n")
|
2020-12-11 11:28:16 +00:00
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("UseTkn", n.UseTkn)
|
|
|
|
v.dumpVertex("Type", n.Type)
|
|
|
|
v.dumpToken("LeadingNsSeparatorTkn", n.LeadingNsSeparatorTkn)
|
|
|
|
v.dumpVertex("Prefix", n.Prefix)
|
|
|
|
v.dumpToken("NsSeparatorTkn", n.NsSeparatorTkn)
|
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertexList("Uses", n.Uses)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-28 21:01:02 +00:00
|
|
|
func (v *Dumper) StmtUseDeclaration(n *ast.StmtUse) {
|
|
|
|
v.print(0, "&ast.StmtUse{\n")
|
2020-12-11 11:28:16 +00:00
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Type", n.Type)
|
|
|
|
v.dumpToken("NsSeparatorTkn", n.NsSeparatorTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertex("Uses", n.Use)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("AsTkn", n.AsTkn)
|
|
|
|
v.dumpVertex("Alias", n.Alias)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-08-03 19:22:53 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) StmtWhile(n *ast.StmtWhile) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.StmtWhile{\n")
|
|
|
|
v.indent++
|
2020-09-04 07:33:47 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("WhileTkn", n.WhileTkn)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertex("Cond", n.Cond)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
v.dumpToken("ColonTkn", n.ColonTkn)
|
|
|
|
v.dumpVertex("Stmt", n.Stmt)
|
|
|
|
v.dumpToken("EndWhileTkn", n.EndWhileTkn)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprArray(n *ast.ExprArray) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprArray{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("ArrayTkn", n.ArrayTkn)
|
|
|
|
v.dumpToken("OpenBracketTkn", n.OpenBracketTkn)
|
|
|
|
v.dumpVertexList("Items", n.Items)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("CloseBracketTkn", n.CloseBracketTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprArrayDimFetch(n *ast.ExprArrayDimFetch) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprArrayDimFetch{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("OpenBracketTkn", n.OpenBracketTkn)
|
|
|
|
v.dumpVertex("Dim", n.Dim)
|
|
|
|
v.dumpToken("CloseBracketTkn", n.CloseBracketTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprArrayItem(n *ast.ExprArrayItem) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprArrayItem{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("EllipsisTkn", n.EllipsisTkn)
|
|
|
|
v.dumpVertex("Key", n.Key)
|
|
|
|
v.dumpToken("DoubleArrowTkn", n.DoubleArrowTkn)
|
2020-12-26 18:13:50 +00:00
|
|
|
v.dumpToken("AmpersandTkn", n.AmpersandTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertex("Val", n.Val)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprArrowFunction(n *ast.ExprArrowFunction) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprArrowFunction{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2021-07-30 17:53:27 +00:00
|
|
|
v.dumpVertexList("AttrGroups", n.AttrGroups)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("StaticTkn", n.StaticTkn)
|
|
|
|
v.dumpToken("FnTkn", n.FnTkn)
|
|
|
|
v.dumpToken("AmpersandTkn", n.AmpersandTkn)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertexList("Params", n.Params)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
v.dumpToken("ColonTkn", n.ColonTkn)
|
|
|
|
v.dumpVertex("ReturnType", n.ReturnType)
|
|
|
|
v.dumpToken("DoubleArrowTkn", n.DoubleArrowTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBitwiseNot(n *ast.ExprBitwiseNot) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBitwiseNot{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("TildaTkn", n.TildaTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBooleanNot(n *ast.ExprBooleanNot) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBooleanNot{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("ExclamationTkn", n.ExclamationTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-27 22:02:14 +00:00
|
|
|
func (v *Dumper) ExprBrackets(n *ast.ExprBrackets) {
|
|
|
|
v.print(0, "&ast.ExprBrackets{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprClassConstFetch(n *ast.ExprClassConstFetch) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprClassConstFetch{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Class", n.Class)
|
|
|
|
v.dumpToken("DoubleColonTkn", n.DoubleColonTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertex("Const", n.Const)
|
2020-12-11 11:28:16 +00:00
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprClone(n *ast.ExprClone) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprClone{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("CloneTkn", n.CloneTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprClosure(n *ast.ExprClosure) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprClosure{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2021-07-30 17:53:27 +00:00
|
|
|
v.dumpVertexList("AttrGroups", n.AttrGroups)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("StaticTkn", n.StaticTkn)
|
|
|
|
v.dumpToken("FunctionTkn", n.FunctionTkn)
|
|
|
|
v.dumpToken("AmpersandTkn", n.AmpersandTkn)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertexList("Params", n.Params)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
2020-12-26 16:20:10 +00:00
|
|
|
v.dumpToken("UseTkn", n.UseTkn)
|
|
|
|
v.dumpToken("UseOpenParenthesisTkn", n.UseOpenParenthesisTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertexList("Uses", n.Uses)
|
2020-12-26 16:20:10 +00:00
|
|
|
v.dumpTokenList("UseSeparatorTkns", n.UseSeparatorTkns)
|
|
|
|
v.dumpToken("UseCloseParenthesisTkn", n.UseCloseParenthesisTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("ColonTkn", n.ColonTkn)
|
|
|
|
v.dumpVertex("ReturnType", n.ReturnType)
|
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
|
|
|
v.dumpVertexList("Stmts", n.Stmts)
|
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprClosureUse(n *ast.ExprClosureUse) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprClosureUse{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2020-12-26 16:20:10 +00:00
|
|
|
v.dumpToken("AmpersandTkn", n.AmpersandTkn)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
2020-12-11 11:28:16 +00:00
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprConstFetch(n *ast.ExprConstFetch) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprConstFetch{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Const", n.Const)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprEmpty(n *ast.ExprEmpty) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprEmpty{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("EmptyTkn", n.EmptyTkn)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprErrorSuppress(n *ast.ExprErrorSuppress) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprErrorSuppress{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("AtTkn", n.AtTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprEval(n *ast.ExprEval) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprEval{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("EvalTkn", n.EvalTkn)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprExit(n *ast.ExprExit) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprExit{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2020-12-26 20:41:25 +00:00
|
|
|
v.dumpToken("ExitTkn", n.ExitTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprFunctionCall(n *ast.ExprFunctionCall) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprFunctionCall{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Function", n.Function)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertexList("Args", n.Args)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
2021-07-31 20:50:59 +00:00
|
|
|
v.dumpToken("EllipsisTkn", n.EllipsisTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprInclude(n *ast.ExprInclude) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprInclude{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2020-12-26 20:44:14 +00:00
|
|
|
v.dumpToken("IncludeOnceTkn", n.IncludeTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprIncludeOnce(n *ast.ExprIncludeOnce) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprIncludeOnce{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2020-12-26 20:44:14 +00:00
|
|
|
v.dumpToken("IncludeOnceTkn", n.IncludeOnceTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprInstanceOf(n *ast.ExprInstanceOf) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprInstanceOf{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
v.dumpToken("InstanceOfTkn", n.InstanceOfTkn)
|
|
|
|
v.dumpVertex("Class", n.Class)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprIsset(n *ast.ExprIsset) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprIsset{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("IssetTkn", n.IssetTkn)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertexList("Vars", n.Vars)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprList(n *ast.ExprList) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprList{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("ListTkn", n.ListTkn)
|
|
|
|
v.dumpToken("OpenBracketTkn", n.OpenBracketTkn)
|
|
|
|
v.dumpVertexList("Items", n.Items)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("CloseBracketTkn", n.CloseBracketTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprMethodCall(n *ast.ExprMethodCall) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprMethodCall{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("ObjectOperatorTkn", n.ObjectOperatorTkn)
|
2020-12-27 21:04:09 +00:00
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertex("Method", n.Method)
|
2020-12-27 21:04:09 +00:00
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertexList("Args", n.Args)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
2021-07-31 20:50:59 +00:00
|
|
|
v.dumpToken("EllipsisTkn", n.EllipsisTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2021-07-30 17:53:27 +00:00
|
|
|
func (v *Dumper) ExprNullsafeMethodCall(n *ast.ExprNullsafeMethodCall) {
|
|
|
|
v.print(0, "&ast.ExprNullsafeMethodCall{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("ObjectOperatorTkn", n.ObjectOperatorTkn)
|
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
|
|
|
v.dumpVertex("Method", n.Method)
|
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertexList("Args", n.Args)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
2021-07-31 20:50:59 +00:00
|
|
|
v.dumpToken("EllipsisTkn", n.EllipsisTkn)
|
2021-07-30 17:53:27 +00:00
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprNew(n *ast.ExprNew) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprNew{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("NewTkn", n.NewTkn)
|
|
|
|
v.dumpVertex("Class", n.Class)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertexList("Args", n.Args)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprPostDec(n *ast.ExprPostDec) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprPostDec{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("DecTkn", n.DecTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprPostInc(n *ast.ExprPostInc) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprPostInc{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("IncTkn", n.IncTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprPreDec(n *ast.ExprPreDec) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprPreDec{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("DecTkn", n.DecTkn)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprPreInc(n *ast.ExprPreInc) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprPreInc{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("IncTkn", n.IncTkn)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprPrint(n *ast.ExprPrint) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprPrint{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("PrintTkn", n.PrintTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprPropertyFetch(n *ast.ExprPropertyFetch) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprPropertyFetch{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("ObjectOperatorTkn", n.ObjectOperatorTkn)
|
2020-12-27 21:04:09 +00:00
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertex("Prop", n.Prop)
|
2020-12-27 21:04:09 +00:00
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2021-07-30 17:53:27 +00:00
|
|
|
func (v *Dumper) ExprNullsafePropertyFetch(n *ast.ExprNullsafePropertyFetch) {
|
|
|
|
v.print(0, "&ast.ExprNullsafePropertyFetch{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("ObjectOperatorTkn", n.ObjectOperatorTkn)
|
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
|
|
|
v.dumpVertex("Prop", n.Prop)
|
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprRequire(n *ast.ExprRequire) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprRequire{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("RequireTkn", n.RequireTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprRequireOnce(n *ast.ExprRequireOnce) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprRequireOnce{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("RequireOnceTkn", n.RequireOnceTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprShellExec(n *ast.ExprShellExec) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprShellExec{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("OpenBacktickTkn", n.OpenBacktickTkn)
|
|
|
|
v.dumpVertexList("Parts", n.Parts)
|
|
|
|
v.dumpToken("CloseBacktickTkn", n.CloseBacktickTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprStaticCall(n *ast.ExprStaticCall) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprStaticCall{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Class", n.Class)
|
|
|
|
v.dumpToken("DoubleColonTkn", n.DoubleColonTkn)
|
2020-12-27 21:19:49 +00:00
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertex("Call", n.Call)
|
2020-12-27 21:19:49 +00:00
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertexList("Args", n.Args)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
2021-07-31 20:50:59 +00:00
|
|
|
v.dumpToken("EllipsisTkn", n.EllipsisTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprStaticPropertyFetch(n *ast.ExprStaticPropertyFetch) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprStaticPropertyFetch{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Class", n.Class)
|
|
|
|
v.dumpToken("DoubleColonTkn", n.DoubleColonTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertex("Prop", n.Prop)
|
2020-12-11 11:28:16 +00:00
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprTernary(n *ast.ExprTernary) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprTernary{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertex("Cond", n.Cond)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpToken("QuestionTkn", n.QuestionTkn)
|
|
|
|
v.dumpVertex("IfTrue", n.IfTrue)
|
|
|
|
v.dumpToken("ColonTkn", n.ColonTkn)
|
|
|
|
v.dumpVertex("IfFalse", n.IfFalse)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprUnaryMinus(n *ast.ExprUnaryMinus) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprUnaryMinus{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("MinusTkn", n.MinusTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprUnaryPlus(n *ast.ExprUnaryPlus) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprUnaryPlus{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("PlusTkn", n.PlusTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprVariable(n *ast.ExprVariable) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprVariable{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("DollarTkn", n.DollarTkn)
|
2020-12-27 19:55:36 +00:00
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertex("Name", n.Name)
|
2020-12-27 19:55:36 +00:00
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprYield(n *ast.ExprYield) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprYield{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("YieldTkn", n.YieldTkn)
|
|
|
|
v.dumpVertex("Key", n.Key)
|
|
|
|
v.dumpToken("DoubleArrowTkn", n.DoubleArrowTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertex("Val", n.Val)
|
2020-12-11 11:28:16 +00:00
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprYieldFrom(n *ast.ExprYieldFrom) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprYieldFrom{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("YieldFromTkn", n.YieldFromTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprAssign(n *ast.ExprAssign) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprAssign{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprAssignReference(n *ast.ExprAssignReference) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprAssignReference{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpToken("AmpersandTkn", n.AmpersandTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprAssignBitwiseAnd(n *ast.ExprAssignBitwiseAnd) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprAssignBitwiseAnd{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprAssignBitwiseOr(n *ast.ExprAssignBitwiseOr) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprAssignBitwiseOr{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprAssignBitwiseXor(n *ast.ExprAssignBitwiseXor) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprAssignBitwiseXor{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprAssignCoalesce(n *ast.ExprAssignCoalesce) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprAssignCoalesce{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprAssignConcat(n *ast.ExprAssignConcat) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprAssignConcat{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprAssignDiv(n *ast.ExprAssignDiv) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprAssignDiv{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprAssignMinus(n *ast.ExprAssignMinus) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprAssignMinus{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprAssignMod(n *ast.ExprAssignMod) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprAssignMod{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprAssignMul(n *ast.ExprAssignMul) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprAssignMul{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprAssignPlus(n *ast.ExprAssignPlus) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprAssignPlus{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprAssignPow(n *ast.ExprAssignPow) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprAssignPow{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprAssignShiftLeft(n *ast.ExprAssignShiftLeft) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprAssignShiftLeft{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprAssignShiftRight(n *ast.ExprAssignShiftRight) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprAssignShiftRight{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("EqualTkn", n.EqualTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryBitwiseAnd(n *ast.ExprBinaryBitwiseAnd) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryBitwiseAnd{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryBitwiseOr(n *ast.ExprBinaryBitwiseOr) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryBitwiseOr{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryBitwiseXor(n *ast.ExprBinaryBitwiseXor) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryBitwiseXor{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryBooleanAnd(n *ast.ExprBinaryBooleanAnd) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryBooleanAnd{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryBooleanOr(n *ast.ExprBinaryBooleanOr) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryBooleanOr{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryCoalesce(n *ast.ExprBinaryCoalesce) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryCoalesce{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryConcat(n *ast.ExprBinaryConcat) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryConcat{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryDiv(n *ast.ExprBinaryDiv) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryDiv{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryEqual(n *ast.ExprBinaryEqual) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryEqual{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryGreater(n *ast.ExprBinaryGreater) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryGreater{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryGreaterOrEqual(n *ast.ExprBinaryGreaterOrEqual) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryGreaterOrEqual{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryIdentical(n *ast.ExprBinaryIdentical) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryIdentical{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryLogicalAnd(n *ast.ExprBinaryLogicalAnd) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryLogicalAnd{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryLogicalOr(n *ast.ExprBinaryLogicalOr) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryLogicalOr{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryLogicalXor(n *ast.ExprBinaryLogicalXor) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryLogicalXor{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryMinus(n *ast.ExprBinaryMinus) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryMinus{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryMod(n *ast.ExprBinaryMod) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryMod{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryMul(n *ast.ExprBinaryMul) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryMul{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryNotEqual(n *ast.ExprBinaryNotEqual) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryNotEqual{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryNotIdentical(n *ast.ExprBinaryNotIdentical) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryNotIdentical{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryPlus(n *ast.ExprBinaryPlus) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryPlus{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryPow(n *ast.ExprBinaryPow) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryPow{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryShiftLeft(n *ast.ExprBinaryShiftLeft) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryShiftLeft{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinaryShiftRight(n *ast.ExprBinaryShiftRight) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinaryShiftRight{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinarySmaller(n *ast.ExprBinarySmaller) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinarySmaller{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinarySmallerOrEqual(n *ast.ExprBinarySmallerOrEqual) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinarySmallerOrEqual{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprBinarySpaceship(n *ast.ExprBinarySpaceship) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprBinarySpaceship{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertex("Left", n.Left)
|
|
|
|
v.dumpToken("OpTkn", n.OpTkn)
|
|
|
|
v.dumpVertex("Right", n.Right)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprCastArray(n *ast.ExprCastArray) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprCastArray{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("CastTkn", n.CastTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprCastBool(n *ast.ExprCastBool) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprCastBool{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("CastTkn", n.CastTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprCastDouble(n *ast.ExprCastDouble) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprCastDouble{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("CastTkn", n.CastTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprCastInt(n *ast.ExprCastInt) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprCastInt{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("CastTkn", n.CastTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprCastObject(n *ast.ExprCastObject) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprCastObject{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("CastTkn", n.CastTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprCastString(n *ast.ExprCastString) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprCastString{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("CastTkn", n.CastTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ExprCastUnset(n *ast.ExprCastUnset) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ExprCastUnset{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("CastTkn", n.CastTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2021-07-30 17:53:27 +00:00
|
|
|
func (v *Dumper) ExprMatch(n *ast.ExprMatch) {
|
|
|
|
v.print(0, "&ast.ExprMatch{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("MatchTkn", n.MatchTkn)
|
|
|
|
v.dumpToken("OpenParenthesisTkn", n.OpenParenthesisTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
|
|
|
v.dumpVertexList("Arms", n.Arms)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (v *Dumper) ExprThrow(n *ast.ExprThrow) {
|
|
|
|
v.print(0, "&ast.ExprThrow{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("ThrowTkn", n.ThrowTkn)
|
|
|
|
v.dumpVertex("Expr", n.Expr)
|
|
|
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ScalarDnumber(n *ast.ScalarDnumber) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ScalarDnumber{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("NumberTkn", n.NumberTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpValue("Val", n.Value)
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ScalarEncapsed(n *ast.ScalarEncapsed) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ScalarEncapsed{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
2020-12-11 15:29:22 +00:00
|
|
|
v.dumpToken("OpenQuoteTkn", n.OpenQuoteTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpVertexList("Parts", n.Parts)
|
2020-12-11 15:29:22 +00:00
|
|
|
v.dumpToken("CloseQuoteTkn", n.CloseQuoteTkn)
|
2020-12-11 11:28:16 +00:00
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ScalarEncapsedStringPart(n *ast.ScalarEncapsedStringPart) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ScalarEncapsedStringPart{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("EncapsedStrTkn", n.EncapsedStrTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpValue("Val", n.Value)
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-27 22:38:39 +00:00
|
|
|
func (v *Dumper) ScalarEncapsedStringVar(n *ast.ScalarEncapsedStringVar) {
|
|
|
|
v.print(0, "&ast.ScalarEncapsedStringVar{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("DollarOpenCurlyBracketTkn", n.DollarOpenCurlyBracketTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpVertex("Name", n.Name)
|
2020-12-27 22:38:39 +00:00
|
|
|
v.dumpToken("OpenSquareBracketTkn", n.OpenSquareBracketTkn)
|
|
|
|
v.dumpVertex("Dim", n.Dim)
|
|
|
|
v.dumpToken("CloseSquareBracketTkn", n.CloseSquareBracketTkn)
|
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
|
|
|
}
|
|
|
|
|
2020-12-27 22:53:48 +00:00
|
|
|
func (v *Dumper) ScalarEncapsedStringBrackets(n *ast.ScalarEncapsedStringBrackets) {
|
|
|
|
v.print(0, "&ast.ScalarEncapsedStringBrackets{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
|
|
|
v.dumpVertex("Var", n.Var)
|
|
|
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ScalarHeredoc(n *ast.ScalarHeredoc) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ScalarHeredoc{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("OpenHeredocTkn", n.OpenHeredocTkn)
|
|
|
|
v.dumpVertexList("Parts", n.Parts)
|
|
|
|
v.dumpToken("CloseHeredocTkn", n.CloseHeredocTkn)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ScalarLnumber(n *ast.ScalarLnumber) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ScalarLnumber{\n")
|
|
|
|
v.indent++
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("NumberTkn", n.NumberTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpValue("Val", n.Value)
|
2020-12-11 11:28:16 +00:00
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ScalarMagicConstant(n *ast.ScalarMagicConstant) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ScalarMagicConstant{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("MagicConstTkn", n.MagicConstTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpValue("Val", n.Value)
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) ScalarString(n *ast.ScalarString) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.ScalarString{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("MinusTkn", n.MinusTkn)
|
|
|
|
v.dumpToken("StringTkn", n.StringTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpValue("Val", n.Value)
|
2020-03-12 22:20:48 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-05-13 18:05:15 +00:00
|
|
|
}
|
|
|
|
|
2020-12-28 21:01:02 +00:00
|
|
|
func (v *Dumper) NameName(n *ast.Name) {
|
|
|
|
v.print(0, "&ast.Name{\n")
|
2020-12-11 11:28:16 +00:00
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpVertexList("Parts", n.Parts)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-05-13 18:05:15 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) NameFullyQualified(n *ast.NameFullyQualified) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.NameFullyQualified{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("NsSeparatorTkn", n.NsSeparatorTkn)
|
|
|
|
v.dumpVertexList("Parts", n.Parts)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-05-13 18:05:15 +00:00
|
|
|
}
|
|
|
|
|
2020-12-12 10:09:39 +00:00
|
|
|
func (v *Dumper) NameRelative(n *ast.NameRelative) {
|
2020-12-11 11:28:16 +00:00
|
|
|
v.print(0, "&ast.NameRelative{\n")
|
|
|
|
v.indent++
|
|
|
|
|
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("NsTkn", n.NsTkn)
|
|
|
|
v.dumpToken("NsSeparatorTkn", n.NsSeparatorTkn)
|
|
|
|
v.dumpVertexList("Parts", n.Parts)
|
|
|
|
v.dumpTokenList("SeparatorTkns", n.SeparatorTkns)
|
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-05-13 18:05:15 +00:00
|
|
|
}
|
|
|
|
|
2020-12-28 21:01:02 +00:00
|
|
|
func (v *Dumper) NameNamePart(n *ast.NamePart) {
|
|
|
|
v.print(0, "&ast.NamePart{\n")
|
2020-12-11 11:28:16 +00:00
|
|
|
v.indent++
|
2020-05-13 18:05:15 +00:00
|
|
|
|
2020-12-11 11:28:16 +00:00
|
|
|
v.dumpPosition(n.Position)
|
|
|
|
v.dumpToken("StringTkn", n.StringTkn)
|
2020-12-28 21:01:02 +00:00
|
|
|
v.dumpValue("Val", n.Value)
|
2020-12-11 11:28:16 +00:00
|
|
|
|
|
|
|
v.indent--
|
|
|
|
v.print(v.indent, "},\n")
|
2020-03-12 22:20:48 +00:00
|
|
|
}
|