php-parser/node/node.go
2018-01-09 15:51:32 +02:00

20 lines
328 B
Go

package node
import "fmt"
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)
}