(n *semantic.Choice)
| 646 | } |
| 647 | |
| 648 | func (e *encoder) choice(n *semantic.Choice) (outID uint64) { |
| 649 | e.build(&e.instances.Choice, e.maps.Choice, n, &outID, func() *Choice { |
| 650 | p := &Choice{ |
| 651 | Ast: e.astCase(n.AST), |
| 652 | Annotations: e.annotations(n.Annotations), |
| 653 | Expression: e.expr(n.Expression), |
| 654 | } |
| 655 | foreach(n.Conditions, e.expr, &p.Conditions) |
| 656 | return p |
| 657 | }) |
| 658 | return |
| 659 | } |
| 660 | |
| 661 | func (e *encoder) class(n *semantic.Class) (outID uint64) { |
| 662 | e.build(&e.instances.Class, e.maps.Class, n, &outID, func() *Class { |