[refactoring] update ast structure of "Goto" and "Label" nodes
This commit is contained in:
@@ -505,7 +505,9 @@ func (n *StmtGlobal) Accept(v NodeVisitor) {
|
||||
// StmtGoto node
|
||||
type StmtGoto struct {
|
||||
Node
|
||||
Label Vertex
|
||||
GotoTkn *token.Token
|
||||
Label Vertex
|
||||
SemiColonTkn *token.Token
|
||||
}
|
||||
|
||||
func (n *StmtGoto) Accept(v NodeVisitor) {
|
||||
@@ -582,6 +584,7 @@ func (n *StmtInterfaceExtends) Accept(v NodeVisitor) {
|
||||
type StmtLabel struct {
|
||||
Node
|
||||
LabelName Vertex
|
||||
ColonTkn *token.Token
|
||||
}
|
||||
|
||||
func (n *StmtLabel) Accept(v NodeVisitor) {
|
||||
|
||||
@@ -265,3 +265,12 @@ func (v *FilterTokens) StmtThrow(n *ast.StmtThrow) {
|
||||
n.ThrowTkn = nil
|
||||
n.SemiColonTkn = nil
|
||||
}
|
||||
|
||||
func (v *FilterTokens) StmtGoto(n *ast.StmtGoto) {
|
||||
n.GotoTkn = nil
|
||||
n.SemiColonTkn = nil
|
||||
}
|
||||
|
||||
func (v *FilterTokens) StmtLabel(n *ast.StmtLabel) {
|
||||
n.ColonTkn = nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user