[refactoring] fix typo
This commit is contained in:
parent
45ded326d0
commit
5291529a37
BIN
internal/php5/php5.go
generated
BIN
internal/php5/php5.go
generated
Binary file not shown.
@ -366,9 +366,9 @@ top_statement:
|
|||||||
Parts: $2.(*ast.ParserSeparatedList).Items,
|
Parts: $2.(*ast.ParserSeparatedList).Items,
|
||||||
SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns,
|
SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns,
|
||||||
},
|
},
|
||||||
OpenCurlyBracket: $3,
|
OpenCurlyBracketTkn: $3,
|
||||||
Stmts: $4,
|
Stmts: $4,
|
||||||
CloseCurlyBracket: $5,
|
CloseCurlyBracketTkn: $5,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
| T_NAMESPACE '{' top_statement_list '}'
|
| T_NAMESPACE '{' top_statement_list '}'
|
||||||
@ -376,9 +376,9 @@ top_statement:
|
|||||||
$$ = &ast.StmtNamespace{
|
$$ = &ast.StmtNamespace{
|
||||||
Position: yylex.(*Parser).builder.NewTokensPosition($1, $4),
|
Position: yylex.(*Parser).builder.NewTokensPosition($1, $4),
|
||||||
NsTkn: $1,
|
NsTkn: $1,
|
||||||
OpenCurlyBracket: $2,
|
OpenCurlyBracketTkn: $2,
|
||||||
Stmts: $3,
|
Stmts: $3,
|
||||||
CloseCurlyBracket: $4,
|
CloseCurlyBracketTkn: $4,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
| T_USE use_declarations ';'
|
| T_USE use_declarations ';'
|
||||||
@ -769,9 +769,9 @@ unticked_statement:
|
|||||||
{
|
{
|
||||||
$$ = &ast.StmtStmtList{
|
$$ = &ast.StmtStmtList{
|
||||||
Position: yylex.(*Parser).builder.NewTokensPosition($1, $3),
|
Position: yylex.(*Parser).builder.NewTokensPosition($1, $3),
|
||||||
OpenCurlyBracket: $1,
|
OpenCurlyBracketTkn: $1,
|
||||||
Stmts: $2,
|
Stmts: $2,
|
||||||
CloseCurlyBracket: $3,
|
CloseCurlyBracketTkn: $3,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
| T_IF parenthesis_expr statement elseif_list else_single
|
| T_IF parenthesis_expr statement elseif_list else_single
|
||||||
@ -1046,9 +1046,9 @@ unticked_statement:
|
|||||||
$$ = &ast.StmtTry{
|
$$ = &ast.StmtTry{
|
||||||
Position: pos,
|
Position: pos,
|
||||||
TryTkn: $1,
|
TryTkn: $1,
|
||||||
OpenCurlyBracket: $2,
|
OpenCurlyBracketTkn: $2,
|
||||||
Stmts: $3,
|
Stmts: $3,
|
||||||
CloseCurlyBracket: $4,
|
CloseCurlyBracketTkn: $4,
|
||||||
Catches: $5,
|
Catches: $5,
|
||||||
Finally: $6,
|
Finally: $6,
|
||||||
}
|
}
|
||||||
@ -2353,9 +2353,9 @@ method_body:
|
|||||||
{
|
{
|
||||||
$$ = &ast.StmtStmtList{
|
$$ = &ast.StmtStmtList{
|
||||||
Position: yylex.(*Parser).builder.NewTokensPosition($1, $3),
|
Position: yylex.(*Parser).builder.NewTokensPosition($1, $3),
|
||||||
OpenCurlyBracket: $1,
|
OpenCurlyBracketTkn: $1,
|
||||||
Stmts: $2,
|
Stmts: $2,
|
||||||
CloseCurlyBracket: $3,
|
CloseCurlyBracketTkn: $3,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@ -4498,9 +4498,9 @@ scalar:
|
|||||||
{
|
{
|
||||||
$$ = &ast.ScalarEncapsed{
|
$$ = &ast.ScalarEncapsed{
|
||||||
Position: yylex.(*Parser).builder.NewTokensPosition($1, $3),
|
Position: yylex.(*Parser).builder.NewTokensPosition($1, $3),
|
||||||
OpenQoteTkn: $1,
|
OpenQuoteTkn: $1,
|
||||||
Parts: $2,
|
Parts: $2,
|
||||||
CloseQoteTkn: $3,
|
CloseQuoteTkn: $3,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
| T_START_HEREDOC encaps_list T_END_HEREDOC
|
| T_START_HEREDOC encaps_list T_END_HEREDOC
|
||||||
|
BIN
internal/php7/php7.go
generated
BIN
internal/php7/php7.go
generated
Binary file not shown.
@ -450,9 +450,9 @@ top_statement:
|
|||||||
Parts: $2.(*ast.ParserSeparatedList).Items,
|
Parts: $2.(*ast.ParserSeparatedList).Items,
|
||||||
SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns,
|
SeparatorTkns: $2.(*ast.ParserSeparatedList).SeparatorTkns,
|
||||||
},
|
},
|
||||||
OpenCurlyBracket: $3,
|
OpenCurlyBracketTkn: $3,
|
||||||
Stmts: $4,
|
Stmts: $4,
|
||||||
CloseCurlyBracket: $5,
|
CloseCurlyBracketTkn: $5,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
| T_NAMESPACE '{' top_statement_list '}'
|
| T_NAMESPACE '{' top_statement_list '}'
|
||||||
@ -460,7 +460,7 @@ top_statement:
|
|||||||
$$ = &ast.StmtNamespace{
|
$$ = &ast.StmtNamespace{
|
||||||
Position: yylex.(*Parser).builder.NewTokensPosition($1, $4),
|
Position: yylex.(*Parser).builder.NewTokensPosition($1, $4),
|
||||||
NsTkn: $1,
|
NsTkn: $1,
|
||||||
OpenCurlyBracket: $2,
|
OpenCurlyBracketTkn: $2,
|
||||||
Stmts: $3,
|
Stmts: $3,
|
||||||
CloseCurlyBracket: $4,
|
CloseCurlyBracket: $4,
|
||||||
}
|
}
|
||||||
@ -813,9 +813,9 @@ statement:
|
|||||||
{
|
{
|
||||||
$$ = &ast.StmtStmtList{
|
$$ = &ast.StmtStmtList{
|
||||||
Position: yylex.(*Parser).builder.NewTokensPosition($1, $3),
|
Position: yylex.(*Parser).builder.NewTokensPosition($1, $3),
|
||||||
OpenCurlyBracket: $1,
|
OpenCurlyBracketTkn: $1,
|
||||||
Stmts: $2,
|
Stmts: $2,
|
||||||
CloseCurlyBracket: $3,
|
CloseCurlyBracketTkn: $3,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
| if_stmt
|
| if_stmt
|
||||||
@ -1010,9 +1010,9 @@ statement:
|
|||||||
$$ = &ast.StmtTry{
|
$$ = &ast.StmtTry{
|
||||||
Position: pos,
|
Position: pos,
|
||||||
TryTkn: $1,
|
TryTkn: $1,
|
||||||
OpenCurlyBracket: $2,
|
OpenCurlyBracketTkn: $2,
|
||||||
Stmts: $3,
|
Stmts: $3,
|
||||||
CloseCurlyBracket: $4,
|
CloseCurlyBracketTkn: $4,
|
||||||
Catches: $5,
|
Catches: $5,
|
||||||
Finally: $6,
|
Finally: $6,
|
||||||
}
|
}
|
||||||
@ -1196,9 +1196,9 @@ class_declaration_statement:
|
|||||||
},
|
},
|
||||||
Extends: $4,
|
Extends: $4,
|
||||||
Implements: $5,
|
Implements: $5,
|
||||||
OpenCurlyBracket: $7,
|
OpenCurlyBracketTkn: $7,
|
||||||
Stmts: $8,
|
Stmts: $8,
|
||||||
CloseCurlyBracket: $9,
|
CloseCurlyBracketTkn: $9,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
| T_CLASS T_STRING extends_from implements_list backup_doc_comment '{' class_statement_list '}'
|
| T_CLASS T_STRING extends_from implements_list backup_doc_comment '{' class_statement_list '}'
|
||||||
@ -1213,9 +1213,9 @@ class_declaration_statement:
|
|||||||
},
|
},
|
||||||
Extends: $3,
|
Extends: $3,
|
||||||
Implements: $4,
|
Implements: $4,
|
||||||
OpenCurlyBracket: $6,
|
OpenCurlyBracketTkn: $6,
|
||||||
Stmts: $7,
|
Stmts: $7,
|
||||||
CloseCurlyBracket: $8,
|
CloseCurlyBracketTkn: $8,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@ -1261,9 +1261,9 @@ trait_declaration_statement:
|
|||||||
IdentifierTkn: $2,
|
IdentifierTkn: $2,
|
||||||
Value: $2.Value,
|
Value: $2.Value,
|
||||||
},
|
},
|
||||||
OpenCurlyBracket: $4,
|
OpenCurlyBracketTkn: $4,
|
||||||
Stmts: $5,
|
Stmts: $5,
|
||||||
CloseCurlyBracket: $6,
|
CloseCurlyBracketTkn: $6,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@ -2191,9 +2191,9 @@ method_body:
|
|||||||
{
|
{
|
||||||
$$ = &ast.StmtStmtList{
|
$$ = &ast.StmtStmtList{
|
||||||
Position: yylex.(*Parser).builder.NewTokensPosition($1, $3),
|
Position: yylex.(*Parser).builder.NewTokensPosition($1, $3),
|
||||||
OpenCurlyBracket: $1,
|
OpenCurlyBracketTkn: $1,
|
||||||
Stmts: $2,
|
Stmts: $2,
|
||||||
CloseCurlyBracket: $3,
|
CloseCurlyBracketTkn: $3,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@ -2448,9 +2448,9 @@ anonymous_class:
|
|||||||
CloseParenthesisTkn: $2.(*ast.ArgumentList).CloseParenthesisTkn,
|
CloseParenthesisTkn: $2.(*ast.ArgumentList).CloseParenthesisTkn,
|
||||||
Extends: $3,
|
Extends: $3,
|
||||||
Implements: $4,
|
Implements: $4,
|
||||||
OpenCurlyBracket: $6,
|
OpenCurlyBracketTkn: $6,
|
||||||
Stmts: $7,
|
Stmts: $7,
|
||||||
CloseCurlyBracket: $8,
|
CloseCurlyBracketTkn: $8,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@ -3550,9 +3550,9 @@ scalar:
|
|||||||
{
|
{
|
||||||
$$ = &ast.ScalarEncapsed{
|
$$ = &ast.ScalarEncapsed{
|
||||||
Position: yylex.(*Parser).builder.NewTokensPosition($1, $3),
|
Position: yylex.(*Parser).builder.NewTokensPosition($1, $3),
|
||||||
OpenQoteTkn: $1,
|
OpenQuoteTkn: $1,
|
||||||
Parts: $2,
|
Parts: $2,
|
||||||
CloseQoteTkn: $3,
|
CloseQuoteTkn: $3,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
| T_START_HEREDOC encaps_list T_END_HEREDOC
|
| T_START_HEREDOC encaps_list T_END_HEREDOC
|
||||||
|
@ -103,9 +103,9 @@ func (n *ScalarDnumber) GetPosition() *position.Position {
|
|||||||
// ScalarEncapsed node
|
// ScalarEncapsed node
|
||||||
type ScalarEncapsed struct {
|
type ScalarEncapsed struct {
|
||||||
Position *position.Position
|
Position *position.Position
|
||||||
OpenQoteTkn *token.Token
|
OpenQuoteTkn *token.Token
|
||||||
Parts []Vertex
|
Parts []Vertex
|
||||||
CloseQoteTkn *token.Token
|
CloseQuoteTkn *token.Token
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *ScalarEncapsed) Accept(v NodeVisitor) {
|
func (n *ScalarEncapsed) Accept(v NodeVisitor) {
|
||||||
@ -260,9 +260,9 @@ type StmtClass struct {
|
|||||||
CloseParenthesisTkn *token.Token
|
CloseParenthesisTkn *token.Token
|
||||||
Extends Vertex
|
Extends Vertex
|
||||||
Implements Vertex
|
Implements Vertex
|
||||||
OpenCurlyBracket *token.Token
|
OpenCurlyBracketTkn *token.Token
|
||||||
Stmts []Vertex
|
Stmts []Vertex
|
||||||
CloseCurlyBracket *token.Token
|
CloseCurlyBracketTkn *token.Token
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *StmtClass) Accept(v NodeVisitor) {
|
func (n *StmtClass) Accept(v NodeVisitor) {
|
||||||
@ -764,9 +764,9 @@ type StmtNamespace struct {
|
|||||||
Position *position.Position
|
Position *position.Position
|
||||||
NsTkn *token.Token
|
NsTkn *token.Token
|
||||||
Name Vertex
|
Name Vertex
|
||||||
OpenCurlyBracket *token.Token
|
OpenCurlyBracketTkn *token.Token
|
||||||
Stmts []Vertex
|
Stmts []Vertex
|
||||||
CloseCurlyBracket *token.Token
|
CloseCurlyBracketTkn *token.Token
|
||||||
SemiColonTkn *token.Token
|
SemiColonTkn *token.Token
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -878,9 +878,9 @@ func (n *StmtStaticVar) GetPosition() *position.Position {
|
|||||||
// StmtStmtList node
|
// StmtStmtList node
|
||||||
type StmtStmtList struct {
|
type StmtStmtList struct {
|
||||||
Position *position.Position
|
Position *position.Position
|
||||||
OpenCurlyBracket *token.Token
|
OpenCurlyBracketTkn *token.Token
|
||||||
Stmts []Vertex
|
Stmts []Vertex
|
||||||
CloseCurlyBracket *token.Token
|
CloseCurlyBracketTkn *token.Token
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *StmtStmtList) Accept(v NodeVisitor) {
|
func (n *StmtStmtList) Accept(v NodeVisitor) {
|
||||||
@ -939,9 +939,9 @@ type StmtTrait struct {
|
|||||||
TraitName Vertex
|
TraitName Vertex
|
||||||
Extends Vertex
|
Extends Vertex
|
||||||
Implements Vertex
|
Implements Vertex
|
||||||
OpenCurlyBracket *token.Token
|
OpenCurlyBracketTkn *token.Token
|
||||||
Stmts []Vertex
|
Stmts []Vertex
|
||||||
CloseCurlyBracket *token.Token
|
CloseCurlyBracketTkn *token.Token
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *StmtTrait) Accept(v NodeVisitor) {
|
func (n *StmtTrait) Accept(v NodeVisitor) {
|
||||||
@ -1041,9 +1041,9 @@ func (n *StmtTraitUsePrecedence) GetPosition() *position.Position {
|
|||||||
type StmtTry struct {
|
type StmtTry struct {
|
||||||
Position *position.Position
|
Position *position.Position
|
||||||
TryTkn *token.Token
|
TryTkn *token.Token
|
||||||
OpenCurlyBracket *token.Token
|
OpenCurlyBracketTkn *token.Token
|
||||||
Stmts []Vertex
|
Stmts []Vertex
|
||||||
CloseCurlyBracket *token.Token
|
CloseCurlyBracketTkn *token.Token
|
||||||
Catches []Vertex
|
Catches []Vertex
|
||||||
Finally Vertex
|
Finally Vertex
|
||||||
}
|
}
|
||||||
|
@ -288,9 +288,9 @@ func (v *Dump) StmtClass(n *ast.StmtClass) {
|
|||||||
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
v.dumpToken("CloseParenthesisTkn", n.CloseParenthesisTkn)
|
||||||
v.dumpVertex("Extends", n.Extends)
|
v.dumpVertex("Extends", n.Extends)
|
||||||
v.dumpVertex("Implements", n.Implements)
|
v.dumpVertex("Implements", n.Implements)
|
||||||
v.dumpToken("OpenCurlyBracket", n.OpenCurlyBracket)
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
||||||
v.dumpVertexList("Stmts", n.Stmts)
|
v.dumpVertexList("Stmts", n.Stmts)
|
||||||
v.dumpToken("CloseCurlyBracket", n.CloseCurlyBracket)
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
||||||
|
|
||||||
v.indent--
|
v.indent--
|
||||||
v.print(v.indent, "},\n")
|
v.print(v.indent, "},\n")
|
||||||
@ -706,9 +706,9 @@ func (v *Dump) StmtNamespace(n *ast.StmtNamespace) {
|
|||||||
v.dumpPosition(n.Position)
|
v.dumpPosition(n.Position)
|
||||||
v.dumpToken("NsTkn", n.NsTkn)
|
v.dumpToken("NsTkn", n.NsTkn)
|
||||||
v.dumpVertex("Name", n.Name)
|
v.dumpVertex("Name", n.Name)
|
||||||
v.dumpToken("OpenCurlyBracket", n.OpenCurlyBracket)
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
||||||
v.dumpVertexList("Stmts", n.Stmts)
|
v.dumpVertexList("Stmts", n.Stmts)
|
||||||
v.dumpToken("CloseCurlyBracket", n.CloseCurlyBracket)
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
||||||
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
v.dumpToken("SemiColonTkn", n.SemiColonTkn)
|
||||||
|
|
||||||
v.indent--
|
v.indent--
|
||||||
@ -799,9 +799,9 @@ func (v *Dump) StmtStmtList(n *ast.StmtStmtList) {
|
|||||||
v.indent++
|
v.indent++
|
||||||
|
|
||||||
v.dumpPosition(n.Position)
|
v.dumpPosition(n.Position)
|
||||||
v.dumpToken("OpenCurlyBracket", n.OpenCurlyBracket)
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
||||||
v.dumpVertexList("Stmts", n.Stmts)
|
v.dumpVertexList("Stmts", n.Stmts)
|
||||||
v.dumpToken("CloseCurlyBracket", n.CloseCurlyBracket)
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
||||||
|
|
||||||
v.indent--
|
v.indent--
|
||||||
v.print(v.indent, "},\n")
|
v.print(v.indent, "},\n")
|
||||||
@ -850,9 +850,9 @@ func (v *Dump) StmtTrait(n *ast.StmtTrait) {
|
|||||||
v.dumpVertex("TraitName", n.TraitName)
|
v.dumpVertex("TraitName", n.TraitName)
|
||||||
v.dumpVertex("Extends", n.Extends)
|
v.dumpVertex("Extends", n.Extends)
|
||||||
v.dumpVertex("Implements", n.Implements)
|
v.dumpVertex("Implements", n.Implements)
|
||||||
v.dumpToken("OpenCurlyBracket", n.OpenCurlyBracket)
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
||||||
v.dumpVertexList("Stmts", n.Stmts)
|
v.dumpVertexList("Stmts", n.Stmts)
|
||||||
v.dumpToken("CloseCurlyBracket", n.CloseCurlyBracket)
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
||||||
|
|
||||||
v.indent--
|
v.indent--
|
||||||
v.print(v.indent, "},\n")
|
v.print(v.indent, "},\n")
|
||||||
@ -934,9 +934,9 @@ func (v *Dump) StmtTry(n *ast.StmtTry) {
|
|||||||
|
|
||||||
v.dumpPosition(n.Position)
|
v.dumpPosition(n.Position)
|
||||||
v.dumpToken("TryTkn", n.TryTkn)
|
v.dumpToken("TryTkn", n.TryTkn)
|
||||||
v.dumpToken("OpenCurlyBracket", n.OpenCurlyBracket)
|
v.dumpToken("OpenCurlyBracketTkn", n.OpenCurlyBracketTkn)
|
||||||
v.dumpVertexList("Stmts", n.Stmts)
|
v.dumpVertexList("Stmts", n.Stmts)
|
||||||
v.dumpToken("CloseCurlyBracket", n.CloseCurlyBracket)
|
v.dumpToken("CloseCurlyBracketTkn", n.CloseCurlyBracketTkn)
|
||||||
v.dumpVertexList("Catches", n.Catches)
|
v.dumpVertexList("Catches", n.Catches)
|
||||||
v.dumpVertex("Finally", n.Finally)
|
v.dumpVertex("Finally", n.Finally)
|
||||||
|
|
||||||
@ -2236,9 +2236,9 @@ func (v *Dump) ScalarEncapsed(n *ast.ScalarEncapsed) {
|
|||||||
v.indent++
|
v.indent++
|
||||||
|
|
||||||
v.dumpPosition(n.Position)
|
v.dumpPosition(n.Position)
|
||||||
v.dumpToken("OpenQoteTkn", n.OpenQoteTkn)
|
v.dumpToken("OpenQuoteTkn", n.OpenQuoteTkn)
|
||||||
v.dumpVertexList("Parts", n.Parts)
|
v.dumpVertexList("Parts", n.Parts)
|
||||||
v.dumpToken("CloseQoteTkn", n.CloseQoteTkn)
|
v.dumpToken("CloseQuoteTkn", n.CloseQuoteTkn)
|
||||||
|
|
||||||
v.indent--
|
v.indent--
|
||||||
v.print(v.indent, "},\n")
|
v.print(v.indent, "},\n")
|
||||||
|
@ -13,7 +13,7 @@ import (
|
|||||||
func TestDumper_root(t *testing.T) {
|
func TestDumper_root(t *testing.T) {
|
||||||
o := bytes.NewBufferString("")
|
o := bytes.NewBufferString("")
|
||||||
|
|
||||||
p := visitor.NewDump(o)
|
p := visitor.NewDump(o).WithTokens().WithPositions()
|
||||||
n := &ast.Root{
|
n := &ast.Root{
|
||||||
Position: &position.Position{
|
Position: &position.Position{
|
||||||
StartLine: 1,
|
StartLine: 1,
|
||||||
|
@ -196,9 +196,9 @@ func (p *printer) StmtClass(n *ast.StmtClass) {
|
|||||||
p.printToken(n.CloseParenthesisTkn, p.ifNodeList(n.Arguments, []byte(")")))
|
p.printToken(n.CloseParenthesisTkn, p.ifNodeList(n.Arguments, []byte(")")))
|
||||||
p.printNode(n.Extends)
|
p.printNode(n.Extends)
|
||||||
p.printNode(n.Implements)
|
p.printNode(n.Implements)
|
||||||
p.printToken(n.OpenCurlyBracket, []byte("{"))
|
p.printToken(n.OpenCurlyBracketTkn, []byte("{"))
|
||||||
p.printList(n.Stmts)
|
p.printList(n.Stmts)
|
||||||
p.printToken(n.CloseCurlyBracket, []byte("}"))
|
p.printToken(n.CloseCurlyBracketTkn, []byte("}"))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *printer) StmtClassConstList(n *ast.StmtClassConstList) {
|
func (p *printer) StmtClassConstList(n *ast.StmtClassConstList) {
|
||||||
@ -256,9 +256,9 @@ func (p *printer) StmtDeclare(n *ast.StmtDeclare) {
|
|||||||
p.printToken(n.CloseParenthesisTkn, []byte(")"))
|
p.printToken(n.CloseParenthesisTkn, []byte(")"))
|
||||||
p.printToken(n.ColonTkn, nil)
|
p.printToken(n.ColonTkn, nil)
|
||||||
if stmt, ok := n.Stmt.(*ast.StmtStmtList); ok && n.ColonTkn != nil {
|
if stmt, ok := n.Stmt.(*ast.StmtStmtList); ok && n.ColonTkn != nil {
|
||||||
p.printToken(stmt.OpenCurlyBracket, nil)
|
p.printToken(stmt.OpenCurlyBracketTkn, nil)
|
||||||
p.printList(stmt.Stmts)
|
p.printList(stmt.Stmts)
|
||||||
p.printToken(stmt.CloseCurlyBracket, nil)
|
p.printToken(stmt.CloseCurlyBracketTkn, nil)
|
||||||
} else {
|
} else {
|
||||||
p.printNode(n.Stmt)
|
p.printNode(n.Stmt)
|
||||||
}
|
}
|
||||||
@ -293,9 +293,9 @@ func (p *printer) StmtElse(n *ast.StmtElse) {
|
|||||||
p.printToken(n.ElseTkn, []byte("else"))
|
p.printToken(n.ElseTkn, []byte("else"))
|
||||||
p.printToken(n.ColonTkn, nil)
|
p.printToken(n.ColonTkn, nil)
|
||||||
if stmt, ok := n.Stmt.(*ast.StmtStmtList); ok && n.ColonTkn != nil {
|
if stmt, ok := n.Stmt.(*ast.StmtStmtList); ok && n.ColonTkn != nil {
|
||||||
p.printToken(stmt.OpenCurlyBracket, nil)
|
p.printToken(stmt.OpenCurlyBracketTkn, nil)
|
||||||
p.printList(stmt.Stmts)
|
p.printList(stmt.Stmts)
|
||||||
p.printToken(stmt.CloseCurlyBracket, nil)
|
p.printToken(stmt.CloseCurlyBracketTkn, nil)
|
||||||
} else {
|
} else {
|
||||||
p.printNode(n.Stmt)
|
p.printNode(n.Stmt)
|
||||||
}
|
}
|
||||||
@ -308,9 +308,9 @@ func (p *printer) StmtElseIf(n *ast.StmtElseIf) {
|
|||||||
p.printToken(n.CloseParenthesisTkn, []byte(")"))
|
p.printToken(n.CloseParenthesisTkn, []byte(")"))
|
||||||
p.printToken(n.ColonTkn, nil)
|
p.printToken(n.ColonTkn, nil)
|
||||||
if stmt, ok := n.Stmt.(*ast.StmtStmtList); ok && n.ColonTkn != nil {
|
if stmt, ok := n.Stmt.(*ast.StmtStmtList); ok && n.ColonTkn != nil {
|
||||||
p.printToken(stmt.OpenCurlyBracket, nil)
|
p.printToken(stmt.OpenCurlyBracketTkn, nil)
|
||||||
p.printList(stmt.Stmts)
|
p.printList(stmt.Stmts)
|
||||||
p.printToken(stmt.CloseCurlyBracket, nil)
|
p.printToken(stmt.CloseCurlyBracketTkn, nil)
|
||||||
} else {
|
} else {
|
||||||
p.printNode(n.Stmt)
|
p.printNode(n.Stmt)
|
||||||
}
|
}
|
||||||
@ -339,9 +339,9 @@ func (p *printer) StmtFor(n *ast.StmtFor) {
|
|||||||
p.printToken(n.CloseParenthesisTkn, []byte(")"))
|
p.printToken(n.CloseParenthesisTkn, []byte(")"))
|
||||||
p.printToken(n.ColonTkn, nil)
|
p.printToken(n.ColonTkn, nil)
|
||||||
if stmt, ok := n.Stmt.(*ast.StmtStmtList); ok && n.ColonTkn != nil {
|
if stmt, ok := n.Stmt.(*ast.StmtStmtList); ok && n.ColonTkn != nil {
|
||||||
p.printToken(stmt.OpenCurlyBracket, nil)
|
p.printToken(stmt.OpenCurlyBracketTkn, nil)
|
||||||
p.printList(stmt.Stmts)
|
p.printList(stmt.Stmts)
|
||||||
p.printToken(stmt.CloseCurlyBracket, nil)
|
p.printToken(stmt.CloseCurlyBracketTkn, nil)
|
||||||
} else {
|
} else {
|
||||||
p.printNode(n.Stmt)
|
p.printNode(n.Stmt)
|
||||||
}
|
}
|
||||||
@ -360,9 +360,9 @@ func (p *printer) StmtForeach(n *ast.StmtForeach) {
|
|||||||
p.printToken(n.CloseParenthesisTkn, []byte(")"))
|
p.printToken(n.CloseParenthesisTkn, []byte(")"))
|
||||||
p.printToken(n.ColonTkn, nil)
|
p.printToken(n.ColonTkn, nil)
|
||||||
if stmt, ok := n.Stmt.(*ast.StmtStmtList); ok && n.ColonTkn != nil {
|
if stmt, ok := n.Stmt.(*ast.StmtStmtList); ok && n.ColonTkn != nil {
|
||||||
p.printToken(stmt.OpenCurlyBracket, nil)
|
p.printToken(stmt.OpenCurlyBracketTkn, nil)
|
||||||
p.printList(stmt.Stmts)
|
p.printList(stmt.Stmts)
|
||||||
p.printToken(stmt.CloseCurlyBracket, nil)
|
p.printToken(stmt.CloseCurlyBracketTkn, nil)
|
||||||
} else {
|
} else {
|
||||||
p.printNode(n.Stmt)
|
p.printNode(n.Stmt)
|
||||||
}
|
}
|
||||||
@ -410,9 +410,9 @@ func (p *printer) StmtIf(n *ast.StmtIf) {
|
|||||||
p.printToken(n.CloseParenthesisTkn, []byte(")"))
|
p.printToken(n.CloseParenthesisTkn, []byte(")"))
|
||||||
p.printToken(n.ColonTkn, nil)
|
p.printToken(n.ColonTkn, nil)
|
||||||
if stmt, ok := n.Stmt.(*ast.StmtStmtList); ok && n.ColonTkn != nil {
|
if stmt, ok := n.Stmt.(*ast.StmtStmtList); ok && n.ColonTkn != nil {
|
||||||
p.printToken(stmt.OpenCurlyBracket, nil)
|
p.printToken(stmt.OpenCurlyBracketTkn, nil)
|
||||||
p.printList(stmt.Stmts)
|
p.printList(stmt.Stmts)
|
||||||
p.printToken(stmt.CloseCurlyBracket, nil)
|
p.printToken(stmt.CloseCurlyBracketTkn, nil)
|
||||||
} else {
|
} else {
|
||||||
p.printNode(n.Stmt)
|
p.printNode(n.Stmt)
|
||||||
}
|
}
|
||||||
@ -454,9 +454,9 @@ func (p *printer) StmtLabel(n *ast.StmtLabel) {
|
|||||||
func (p *printer) StmtNamespace(n *ast.StmtNamespace) {
|
func (p *printer) StmtNamespace(n *ast.StmtNamespace) {
|
||||||
p.printToken(n.NsTkn, []byte("namespace"))
|
p.printToken(n.NsTkn, []byte("namespace"))
|
||||||
p.printNode(n.Name)
|
p.printNode(n.Name)
|
||||||
p.printToken(n.OpenCurlyBracket, p.ifNodeList(n.Stmts, []byte("{")))
|
p.printToken(n.OpenCurlyBracketTkn, p.ifNodeList(n.Stmts, []byte("{")))
|
||||||
p.printList(n.Stmts)
|
p.printList(n.Stmts)
|
||||||
p.printToken(n.CloseCurlyBracket, p.ifNodeList(n.Stmts, []byte("}")))
|
p.printToken(n.CloseCurlyBracketTkn, p.ifNodeList(n.Stmts, []byte("}")))
|
||||||
p.printToken(n.SemiColonTkn, p.ifNotNodeList(n.Stmts, []byte(";")))
|
p.printToken(n.SemiColonTkn, p.ifNotNodeList(n.Stmts, []byte(";")))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -496,9 +496,9 @@ func (p *printer) StmtStaticVar(n *ast.StmtStaticVar) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *printer) StmtStmtList(n *ast.StmtStmtList) {
|
func (p *printer) StmtStmtList(n *ast.StmtStmtList) {
|
||||||
p.printToken(n.OpenCurlyBracket, []byte("{"))
|
p.printToken(n.OpenCurlyBracketTkn, []byte("{"))
|
||||||
p.printList(n.Stmts)
|
p.printList(n.Stmts)
|
||||||
p.printToken(n.CloseCurlyBracket, []byte("}"))
|
p.printToken(n.CloseCurlyBracketTkn, []byte("}"))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *printer) StmtSwitch(n *ast.StmtSwitch) {
|
func (p *printer) StmtSwitch(n *ast.StmtSwitch) {
|
||||||
@ -526,9 +526,9 @@ func (p *printer) StmtTrait(n *ast.StmtTrait) {
|
|||||||
p.printNode(n.TraitName)
|
p.printNode(n.TraitName)
|
||||||
p.printNode(n.Extends)
|
p.printNode(n.Extends)
|
||||||
p.printNode(n.Implements)
|
p.printNode(n.Implements)
|
||||||
p.printToken(n.OpenCurlyBracket, []byte("{"))
|
p.printToken(n.OpenCurlyBracketTkn, []byte("{"))
|
||||||
p.printList(n.Stmts)
|
p.printList(n.Stmts)
|
||||||
p.printToken(n.CloseCurlyBracket, []byte("}"))
|
p.printToken(n.CloseCurlyBracketTkn, []byte("}"))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *printer) StmtTraitAdaptationList(n *ast.StmtTraitAdaptationList) {
|
func (p *printer) StmtTraitAdaptationList(n *ast.StmtTraitAdaptationList) {
|
||||||
@ -566,9 +566,9 @@ func (p *printer) StmtTraitUsePrecedence(n *ast.StmtTraitUsePrecedence) {
|
|||||||
|
|
||||||
func (p *printer) StmtTry(n *ast.StmtTry) {
|
func (p *printer) StmtTry(n *ast.StmtTry) {
|
||||||
p.printToken(n.TryTkn, []byte("try"))
|
p.printToken(n.TryTkn, []byte("try"))
|
||||||
p.printToken(n.OpenCurlyBracket, []byte("{"))
|
p.printToken(n.OpenCurlyBracketTkn, []byte("{"))
|
||||||
p.printList(n.Stmts)
|
p.printList(n.Stmts)
|
||||||
p.printToken(n.CloseCurlyBracket, []byte("}"))
|
p.printToken(n.CloseCurlyBracketTkn, []byte("}"))
|
||||||
p.printList(n.Catches)
|
p.printList(n.Catches)
|
||||||
p.printNode(n.Finally)
|
p.printNode(n.Finally)
|
||||||
}
|
}
|
||||||
@ -615,9 +615,9 @@ func (p *printer) StmtWhile(n *ast.StmtWhile) {
|
|||||||
p.printToken(n.CloseParenthesisTkn, []byte(")"))
|
p.printToken(n.CloseParenthesisTkn, []byte(")"))
|
||||||
p.printToken(n.ColonTkn, nil)
|
p.printToken(n.ColonTkn, nil)
|
||||||
if stmt, ok := n.Stmt.(*ast.StmtStmtList); ok && n.ColonTkn != nil {
|
if stmt, ok := n.Stmt.(*ast.StmtStmtList); ok && n.ColonTkn != nil {
|
||||||
p.printToken(stmt.OpenCurlyBracket, nil)
|
p.printToken(stmt.OpenCurlyBracketTkn, nil)
|
||||||
p.printList(stmt.Stmts)
|
p.printList(stmt.Stmts)
|
||||||
p.printToken(stmt.CloseCurlyBracket, nil)
|
p.printToken(stmt.CloseCurlyBracketTkn, nil)
|
||||||
} else {
|
} else {
|
||||||
p.printNode(n.Stmt)
|
p.printNode(n.Stmt)
|
||||||
}
|
}
|
||||||
@ -1181,9 +1181,9 @@ func (p *printer) ScalarDnumber(n *ast.ScalarDnumber) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *printer) ScalarEncapsed(n *ast.ScalarEncapsed) {
|
func (p *printer) ScalarEncapsed(n *ast.ScalarEncapsed) {
|
||||||
p.printToken(n.OpenQoteTkn, []byte("\""))
|
p.printToken(n.OpenQuoteTkn, []byte("\""))
|
||||||
p.printList(n.Parts)
|
p.printList(n.Parts)
|
||||||
p.printToken(n.CloseQoteTkn, []byte("\""))
|
p.printToken(n.CloseQuoteTkn, []byte("\""))
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *printer) ScalarEncapsedStringPart(n *ast.ScalarEncapsedStringPart) {
|
func (p *printer) ScalarEncapsedStringPart(n *ast.ScalarEncapsedStringPart) {
|
||||||
|
Loading…
Reference in New Issue
Block a user