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

31 lines
426 B
Go

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