php-parser/node/node.go
2018-01-11 19:34:42 +02:00

21 lines
346 B
Go

package node
import "fmt"
// Node interface
type Node interface {
Attributes() map[string]interface{}
Walk(v Visitor)
}
type Position struct {
StartLine int
EndLine int
StartPos int
EndPos int
}
func (p Position) String() string {
return fmt.Sprintf("Pos{Line: %d-%d Pos: %d-%d}", p.StartLine, p.EndLine, p.StartPos, p.EndPos)
}