summaryrefslogtreecommitdiff
path: root/vendor/github.com/bytedance/sonic/ast/parser.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-03-11 10:12:06 +0000
committerLibravatar GitHub <noreply@github.com>2024-03-11 10:12:06 +0000
commite24efcac8b67baa9454bf27631e5e49f898a88d4 (patch)
treed9adec2f05e1d8714edee66062a4b95a81ee2a61 /vendor/github.com/bytedance/sonic/ast/parser.go
parent[bugfix] Fix whitespace move_id issue (#2742) (diff)
downloadgotosocial-e24efcac8b67baa9454bf27631e5e49f898a88d4.tar.xz
[chore]: Bump github.com/gin-contrib/cors from 1.5.0 to 1.7.0 (#2745)
Diffstat (limited to 'vendor/github.com/bytedance/sonic/ast/parser.go')
-rw-r--r--vendor/github.com/bytedance/sonic/ast/parser.go8
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)