mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
rebase: update K8s packages to v0.32.1
Update K8s packages in go.mod to v0.32.1 Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
12
vendor/github.com/google/cel-go/parser/parser.go
generated
vendored
12
vendor/github.com/google/cel-go/parser/parser.go
generated
vendored
@ -856,7 +856,8 @@ func (p *parser) reportError(ctx any, format string, args ...any) ast.Expr {
|
||||
|
||||
// ANTLR Parse listener implementations
|
||||
func (p *parser) SyntaxError(recognizer antlr.Recognizer, offendingSymbol any, line, column int, msg string, e antlr.RecognitionException) {
|
||||
l := p.helper.source.NewLocation(line, column)
|
||||
offset := p.helper.sourceInfo.ComputeOffset(int32(line), int32(column))
|
||||
l := p.helper.getLocationByOffset(offset)
|
||||
// Hack to keep existing error messages consistent with previous versions of CEL when a reserved word
|
||||
// is used as an identifier. This behavior needs to be overhauled to provide consistent, normalized error
|
||||
// messages out of ANTLR to prevent future breaking changes related to error message content.
|
||||
@ -916,10 +917,12 @@ func (p *parser) expandMacro(exprID int64, function string, target ast.Expr, arg
|
||||
expr, err := macro.Expander()(eh, target, args)
|
||||
// An error indicates that the macro was matched, but the arguments were not well-formed.
|
||||
if err != nil {
|
||||
if err.Location != nil {
|
||||
return p.reportError(err.Location, err.Message), true
|
||||
loc := err.Location
|
||||
if loc == nil {
|
||||
loc = p.helper.getLocation(exprID)
|
||||
}
|
||||
return p.reportError(p.helper.getLocation(exprID), err.Message), true
|
||||
p.helper.deleteID(exprID)
|
||||
return p.reportError(loc, err.Message), true
|
||||
}
|
||||
// A nil value from the macro indicates that the macro implementation decided that
|
||||
// an expansion should not be performed.
|
||||
@ -929,6 +932,7 @@ func (p *parser) expandMacro(exprID int64, function string, target ast.Expr, arg
|
||||
if p.populateMacroCalls {
|
||||
p.helper.addMacroCall(expr.ID(), function, target, args...)
|
||||
}
|
||||
p.helper.deleteID(exprID)
|
||||
return expr, true
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user