[refactoring] update ast structure of "Echo" node

This commit is contained in:
Vadym Slizov
2020-09-10 23:11:08 +03:00
parent 3f12ada311
commit 7678303cb9
13 changed files with 1521 additions and 1614 deletions

View File

@@ -368,7 +368,10 @@ func (n *StmtDo) Accept(v NodeVisitor) {
// StmtEcho node
type StmtEcho struct {
Node
Exprs []Vertex
EchoTkn *token.Token
Exprs []Vertex
SeparatorTkns []*token.Token
SemiColonTkn *token.Token
}
func (n *StmtEcho) Accept(v NodeVisitor) {

View File

@@ -194,3 +194,9 @@ func (v *FilterTokens) StmtStatic(n *ast.StmtStatic) {
func (v *FilterTokens) StmtStaticVar(n *ast.StmtStaticVar) {
n.EqualTkn = nil
}
func (v *FilterTokens) StmtEcho(n *ast.StmtEcho) {
n.EchoTkn = nil
n.SeparatorTkns = nil
n.SemiColonTkn = nil
}