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