[refactoring] update ast structure of "Encapsed", "EncapsedStringPart" and "Heredoc" nodes
This commit is contained in:
@@ -126,7 +126,9 @@ func (n *ScalarDnumber) Accept(v NodeVisitor) {
|
||||
// ScalarEncapsed node
|
||||
type ScalarEncapsed struct {
|
||||
Node
|
||||
Parts []Vertex
|
||||
OpenQoteTkn *token.Token
|
||||
Parts []Vertex
|
||||
CloseQoteTkn *token.Token
|
||||
}
|
||||
|
||||
func (n *ScalarEncapsed) Accept(v NodeVisitor) {
|
||||
@@ -136,7 +138,8 @@ func (n *ScalarEncapsed) Accept(v NodeVisitor) {
|
||||
// ScalarEncapsedStringPart node
|
||||
type ScalarEncapsedStringPart struct {
|
||||
Node
|
||||
Value []byte
|
||||
EncapsedStrTkn *token.Token
|
||||
Value []byte
|
||||
}
|
||||
|
||||
func (n *ScalarEncapsedStringPart) Accept(v NodeVisitor) {
|
||||
@@ -146,8 +149,9 @@ func (n *ScalarEncapsedStringPart) Accept(v NodeVisitor) {
|
||||
// ScalarHeredoc node
|
||||
type ScalarHeredoc struct {
|
||||
Node
|
||||
Label []byte
|
||||
Parts []Vertex
|
||||
OpenHeredocTkn *token.Token
|
||||
Parts []Vertex
|
||||
CloseHeredocTkn *token.Token
|
||||
}
|
||||
|
||||
func (n *ScalarHeredoc) Accept(v NodeVisitor) {
|
||||
|
||||
@@ -1224,9 +1224,6 @@ func (v *Dump) ScalarHeredoc(n *ast.ScalarHeredoc) {
|
||||
v.printIndentIfNotSingle(v.indent - 1)
|
||||
v.print("&ast.ScalarHeredoc{\n")
|
||||
v.printNode(n.GetNode())
|
||||
|
||||
v.printIndent(v.indent)
|
||||
v.print(fmt.Sprintf("Label: %q,\n", n.Label))
|
||||
}
|
||||
|
||||
func (v *Dump) ScalarLnumber(n *ast.ScalarLnumber) {
|
||||
|
||||
Reference in New Issue
Block a user