fix golint comments warnings

This commit is contained in:
z7zmey
2018-01-12 08:23:58 +02:00
parent 8f874944e3
commit 7332ab1700
4 changed files with 10 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/z7zmey/php-parser/node"
)
// Position represents node position
type Position struct {
StartLine int
EndLine int
@@ -17,8 +18,10 @@ func (p Position) String() string {
return fmt.Sprintf("Pos{Line: %d-%d Pos: %d-%d}", p.StartLine, p.EndLine, p.StartPos, p.EndPos)
}
// Positions a collection of positions attached to nodes
type Positions map[node.Node]*Position
// AddPosition attaches a position to a node
func (p Positions) AddPosition(node node.Node, position *Position) {
p[node] = position
}