php-parser/node/scalar/lnumber.go
2017-12-28 01:23:32 +02:00

31 lines
422 B
Go

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