mirror of
https://github.com/owncloud/ocis
synced 2026-04-25 17:25:21 +02:00
Bump github.com/gookit/config/v2 from 2.2.3 to 2.2.4
Bumps [github.com/gookit/config/v2](https://github.com/gookit/config) from 2.2.3 to 2.2.4. - [Release notes](https://github.com/gookit/config/releases) - [Commits](https://github.com/gookit/config/compare/v2.2.3...v2.2.4) --- updated-dependencies: - dependency-name: github.com/gookit/config/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
Ralf Haferkamp
parent
30784affc4
commit
0df009eae0
41
vendor/github.com/goccy/go-yaml/parser/parser.go
generated
vendored
41
vendor/github.com/goccy/go-yaml/parser/parser.go
generated
vendored
@@ -156,15 +156,38 @@ func (p *parser) createMapValueNode(ctx *context, key ast.MapKeyNode, colonToken
|
||||
ctx.insertToken(ctx.idx, nullToken)
|
||||
return ast.Null(nullToken), nil
|
||||
}
|
||||
|
||||
var comment *ast.CommentGroupNode
|
||||
if tk.Type == token.CommentType {
|
||||
comment = p.parseCommentOnly(ctx)
|
||||
if comment != nil {
|
||||
comment.SetPath(ctx.withChild(key.GetToken().Value).path)
|
||||
}
|
||||
tk = ctx.currentToken()
|
||||
}
|
||||
if tk.Position.Column == key.GetToken().Position.Column && tk.Type == token.StringType {
|
||||
// in this case,
|
||||
// ----
|
||||
// key: <value does not defined>
|
||||
// next
|
||||
|
||||
nullToken := p.createNullToken(colonToken)
|
||||
ctx.insertToken(ctx.idx, nullToken)
|
||||
return ast.Null(nullToken), nil
|
||||
nullNode := ast.Null(nullToken)
|
||||
|
||||
if comment != nil {
|
||||
nullNode.SetComment(comment)
|
||||
} else {
|
||||
// If there is a comment, it is already bound to the key node,
|
||||
// so remove the comment from the key to bind it to the null value.
|
||||
keyComment := key.GetComment()
|
||||
if keyComment != nil {
|
||||
if err := key.SetComment(nil); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
nullNode.SetComment(keyComment)
|
||||
}
|
||||
}
|
||||
return nullNode, nil
|
||||
}
|
||||
|
||||
if tk.Position.Column < key.GetToken().Position.Column {
|
||||
@@ -174,13 +197,20 @@ func (p *parser) createMapValueNode(ctx *context, key ast.MapKeyNode, colonToken
|
||||
// next
|
||||
nullToken := p.createNullToken(colonToken)
|
||||
ctx.insertToken(ctx.idx, nullToken)
|
||||
return ast.Null(nullToken), nil
|
||||
nullNode := ast.Null(nullToken)
|
||||
if comment != nil {
|
||||
nullNode.SetComment(comment)
|
||||
}
|
||||
return nullNode, nil
|
||||
}
|
||||
|
||||
value, err := p.parseToken(ctx, ctx.currentToken())
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "failed to parse mapping 'value' node")
|
||||
}
|
||||
if comment != nil {
|
||||
value.SetComment(comment)
|
||||
}
|
||||
return value, nil
|
||||
}
|
||||
|
||||
@@ -304,10 +334,9 @@ func (p *parser) parseSequenceEntry(ctx *context) (*ast.SequenceNode, error) {
|
||||
if tk.Type == token.CommentType {
|
||||
comment = p.parseCommentOnly(ctx)
|
||||
tk = ctx.currentToken()
|
||||
if tk.Type != token.SequenceEntryType {
|
||||
break
|
||||
if tk.Type == token.SequenceEntryType {
|
||||
ctx.progress(1) // skip sequence token
|
||||
}
|
||||
ctx.progress(1) // skip sequence token
|
||||
}
|
||||
value, err := p.parseToken(ctx.withIndex(uint(len(sequenceNode.Values))), ctx.currentToken())
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user