aboutsummaryrefslogtreecommitdiff
path: root/parser.go
diff options
context:
space:
mode:
authorNeonXP <i@neonxp.dev>2022-12-27 04:14:41 +0300
committerNeonXP <i@neonxp.dev>2022-12-27 04:14:41 +0300
commit67d30e9444c7bdae62906477cafb5f992c5b70e1 (patch)
tree0b9d9c2aa6cee5df0d50cb68a3a808714f4aed68 /parser.go
parent76a7f461ebbde70ea0e3d4f9b79c08139acaee7c (diff)
Rename to SetParentv0.1.1
Diffstat (limited to 'parser.go')
-rw-r--r--parser.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/parser.go b/parser.go
index a82960b..4e006eb 100644
--- a/parser.go
+++ b/parser.go
@@ -21,7 +21,7 @@ func (j *JSON) createChild(parent Node, l lexer.Lexem, ch chan lexer.Lexem) (Nod
return nil, err
}
if c, ok := c.(AcceptParent); ok {
- c.Parent(parent)
+ c.SetParent(parent)
}
child := c.(StringNode)
child.SetString(strings.Trim(l.Value, `"`))
@@ -36,7 +36,7 @@ func (j *JSON) createChild(parent Node, l lexer.Lexem, ch chan lexer.Lexem) (Nod
return nil, err
}
if c, ok := c.(AcceptParent); ok {
- c.Parent(parent)
+ c.SetParent(parent)
}
child := c.(NumberNode)
child.SetNumber(num)
@@ -48,7 +48,7 @@ func (j *JSON) createChild(parent Node, l lexer.Lexem, ch chan lexer.Lexem) (Nod
return nil, err
}
if c, ok := c.(AcceptParent); ok {
- c.Parent(parent)
+ c.SetParent(parent)
}
child := c.(BooleanNode)
child.SetBool(b)
@@ -71,7 +71,7 @@ func (j *JSON) createChild(parent Node, l lexer.Lexem, ch chan lexer.Lexem) (Nod
return nil, err
}
if c, ok := c.(AcceptParent); ok {
- c.Parent(parent)
+ c.SetParent(parent)
}
return c.(NullNode), nil
default:
@@ -85,7 +85,7 @@ func (j *JSON) parseObject(parent Node, ch chan lexer.Lexem) (ObjectNode, error)
return nil, err
}
if c, ok := c.(AcceptParent); ok {
- c.Parent(parent)
+ c.SetParent(parent)
}
n := c.(ObjectNode)
nextKey := ""
@@ -114,7 +114,7 @@ func (j *JSON) parseArray(parent Node, ch chan lexer.Lexem) (ArrayNode, error) {
return nil, err
}
if c, ok := c.(AcceptParent); ok {
- c.Parent(parent)
+ c.SetParent(parent)
}
n := c.(ArrayNode)
for l := range ch {