diff options
Diffstat (limited to 'vendor/github.com/bytedance/sonic/ast/parser.go')
-rw-r--r-- | vendor/github.com/bytedance/sonic/ast/parser.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/github.com/bytedance/sonic/ast/parser.go b/vendor/github.com/bytedance/sonic/ast/parser.go index cb16f20bb..3e5309c19 100644 --- a/vendor/github.com/bytedance/sonic/ast/parser.go +++ b/vendor/github.com/bytedance/sonic/ast/parser.go @@ -157,7 +157,7 @@ func (self *Parser) decodeArray(ret *linkedNodes) (Node, types.ParsingError) { } /* add the value to result */ - ret.Add(val) + ret.Push(val) self.p = self.lspace(self.p) /* check for EOF */ @@ -244,7 +244,7 @@ func (self *Parser) decodeObject(ret *linkedPairs) (Node, types.ParsingError) { /* add the value to result */ // FIXME: ret's address may change here, thus previous referred node in ret may be invalid !! - ret.Add(Pair{Key: key, Value: val}) + ret.Push(Pair{Key: key, Value: val}) self.p = self.lspace(self.p) /* check for EOF */ @@ -475,7 +475,7 @@ func (self *Node) skipNextNode() *Node { } /* add the value to result */ - ret.Add(val) + ret.Push(val) self.l++ parser.p = parser.lspace(parser.p) @@ -558,7 +558,7 @@ func (self *Node) skipNextPair() (*Pair) { } /* add the value to result */ - ret.Add(Pair{Key: key, Value: val}) + ret.Push(Pair{Key: key, Value: val}) self.l++ parser.p = parser.lspace(parser.p) |