[refactoring] update ast structure of "Unset" node

This commit is contained in:
Vadym Slizov
2020-09-14 17:19:17 +03:00
parent 8b4d65ac4d
commit 62fc16da97
7 changed files with 1149 additions and 1160 deletions

View File

@@ -783,7 +783,12 @@ func (n *StmtTry) Accept(v NodeVisitor) {
// StmtUnset node
type StmtUnset struct {
Node
Vars []Vertex
UnsetTkn *token.Token
OpenParenthesisTkn *token.Token
Vars []Vertex
SeparatorTkns []*token.Token
CloseParenthesisTkn *token.Token
SemiColonTkn *token.Token
}
func (n *StmtUnset) Accept(v NodeVisitor) {

View File

@@ -204,3 +204,12 @@ func (v *FilterTokens) StmtEcho(n *ast.StmtEcho) {
func (v *FilterTokens) StmtInlineHtml(n *ast.StmtInlineHtml) {
n.InlineHtmlTkn = nil
}
func (v *FilterTokens) StmtUnset(n *ast.StmtUnset) {
n.UnsetTkn = nil
n.OpenParenthesisTkn = nil
n.SeparatorTkns = nil
n.CloseParenthesisTkn = nil
n.SemiColonTkn = nil
n.SemiColonTkn = nil
}