Visit a parse tree produced by CELParser#CreateMessage.
(ctx *gen.CreateMessageContext)
| 620 | |
| 621 | // Visit a parse tree produced by CELParser#CreateMessage. |
| 622 | func (p *parser) VisitCreateMessage(ctx *gen.CreateMessageContext) any { |
| 623 | messageName := "" |
| 624 | for _, id := range ctx.GetIds() { |
| 625 | if len(messageName) != 0 { |
| 626 | messageName += "." |
| 627 | } |
| 628 | messageName += id.GetText() |
| 629 | } |
| 630 | if ctx.GetLeadingDot() != nil { |
| 631 | messageName = "." + messageName |
| 632 | } |
| 633 | objID := p.helper.id(ctx.GetOp()) |
| 634 | entries := p.VisitIFieldInitializerList(ctx.GetEntries()).([]ast.EntryExpr) |
| 635 | return p.helper.newObject(objID, messageName, entries...) |
| 636 | } |
| 637 | |
| 638 | // Visit a parse tree of field initializers. |
| 639 | func (p *parser) VisitIFieldInitializerList(ctx gen.IFieldInitializerListContext) any { |
no test coverage detected