Visit a parse tree produced by CELParser#GlobalCallContext.
(ctx *gen.GlobalCallContext)
| 693 | |
| 694 | // Visit a parse tree produced by CELParser#GlobalCallContext. |
| 695 | func (p *parser) VisitGlobalCall(ctx *gen.GlobalCallContext) any { |
| 696 | identName := "" |
| 697 | if ctx.GetLeadingDot() != nil { |
| 698 | identName = "." |
| 699 | } |
| 700 | // Handle the error case where no valid identifier is specified. |
| 701 | if ctx.GetId() == nil { |
| 702 | return p.helper.newExpr(ctx) |
| 703 | } |
| 704 | // Handle reserved identifiers. |
| 705 | id := ctx.GetId().GetText() |
| 706 | if _, ok := reservedIds[id]; ok { |
| 707 | return p.reportError(ctx, "reserved identifier: %s", id) |
| 708 | } |
| 709 | identName += id |
| 710 | opID := p.helper.id(ctx.GetOp()) |
| 711 | return p.globalCallOrMacro(opID, identName, p.visitExprList(ctx.GetArgs())...) |
| 712 | |
| 713 | } |
| 714 | |
| 715 | // Visit a parse tree produced by CELParser#CreateList. |
| 716 | func (p *parser) VisitCreateList(ctx *gen.CreateListContext) any { |
no test coverage detected