php-parser/node/scalar/encapsed_string_part.go
2017-12-28 13:36:27 +02:00

31 lines
495 B
Go

package scalar
import (
"github.com/z7zmey/php-parser/node"
"github.com/z7zmey/php-parser/token"
)
func (n EncapsedStringPart) Name() string {
return "EncapsedStringPart"
}
type EncapsedStringPart struct {
name string
token token.Token
}
func NewEncapsedStringPart(t token.Token) node.Node {
return EncapsedStringPart{
"EncapsedStringPart",
t,
}
}
func (n EncapsedStringPart) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return
}
v.Scalar("token", n.token.Value)
}