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