mirror of
https://github.com/felixangell/phi.git
synced 2024-09-11 07:45:30 +03:00
18 lines
222 B
Go
18 lines
222 B
Go
package piecetable
|
|
|
|
type PieceNode struct {
|
|
Index int
|
|
Start int
|
|
Length int
|
|
Data string
|
|
}
|
|
|
|
func NewPiece(data string, line int, start int) *PieceNode {
|
|
return &PieceNode{
|
|
line,
|
|
start,
|
|
len(data),
|
|
data,
|
|
}
|
|
}
|