diff --git a/ast/buffer.go b/ast/buffer.go index 93f4ff47a..3431c0013 100644 --- a/ast/buffer.go +++ b/ast/buffer.go @@ -204,28 +204,6 @@ func (self *linkedPairs) Get(key string) (*Pair, int) { return nil, -1 } -func (self *linkedPairs) ToSlice(con []Pair) { - if len(con) < self.size { - return - } - i := self.size-1 - a, b := i/_DEFAULT_NODE_CAP-1, i%_DEFAULT_NODE_CAP - - if a < 0 { - copy(con, self.head[:b+1]) - return - } else { - copy(con, self.head[:]) - con = con[_DEFAULT_NODE_CAP:] - } - - for i:=0; i