[refactoring] update ast structure of "Return" node
This commit is contained in:
@@ -618,7 +618,9 @@ func (n *StmtPropertyList) Accept(v NodeVisitor) {
|
||||
// StmtReturn node
|
||||
type StmtReturn struct {
|
||||
Node
|
||||
Expr Vertex
|
||||
ReturnTkn *token.Token
|
||||
Expr Vertex
|
||||
SemiColonTkn *token.Token
|
||||
}
|
||||
|
||||
func (n *StmtReturn) Accept(v NodeVisitor) {
|
||||
|
||||
@@ -173,3 +173,8 @@ func (v *FilterTokens) StmtContinue(n *ast.StmtContinue) {
|
||||
n.ContinueTkn = nil
|
||||
n.SemiColonTkn = nil
|
||||
}
|
||||
|
||||
func (v *FilterTokens) StmtReturn(n *ast.StmtReturn) {
|
||||
n.ReturnTkn = nil
|
||||
n.SemiColonTkn = nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user