(n semantic.Expression)
| 789 | } |
| 790 | |
| 791 | func (e *encoder) expr(n semantic.Expression) (outID uint64) { |
| 792 | e.build(&e.instances.Expression, e.maps.Expression, n, &outID, func() *Expression { |
| 793 | p := &Expression{} |
| 794 | switch n := n.(type) { |
| 795 | case *semantic.ArrayIndex: |
| 796 | p.Ty = &Expression_ArrayIndex{e.arrayIndex(n)} |
| 797 | case *semantic.ArrayInitializer: |
| 798 | p.Ty = &Expression_ArrayInitializer{e.arrayInit(n)} |
| 799 | case *semantic.BinaryOp: |
| 800 | p.Ty = &Expression_BinaryOp{e.binaryOp(n)} |
| 801 | case *semantic.BitTest: |
| 802 | p.Ty = &Expression_BitTest{e.bitTest(n)} |
| 803 | case semantic.BoolValue: |
| 804 | p.Ty = &Expression_BoolValue{e.boolValue(n)} |
| 805 | case *semantic.Call: |
| 806 | p.Ty = &Expression_Call{e.call(n)} |
| 807 | case *semantic.Cast: |
| 808 | p.Ty = &Expression_Cast{e.cast(n)} |
| 809 | case *semantic.ClassInitializer: |
| 810 | p.Ty = &Expression_ClassInit{ClassInit: e.classInit(n)} |
| 811 | case *semantic.Clone: |
| 812 | p.Ty = &Expression_Clone{Clone: e.clone(n)} |
| 813 | case *semantic.Create: |
| 814 | p.Ty = &Expression_Create{Create: e.create(n)} |
| 815 | case *semantic.Definition: |
| 816 | p.Ty = &Expression_Definition{e.definition(n)} |
| 817 | case *semantic.DefinitionUsage: |
| 818 | p.Ty = &Expression_Definition{e.definitionUsage(n)} |
| 819 | case *semantic.EnumEntry: |
| 820 | p.Ty = &Expression_EnumEntry{e.enumEntry(n)} |
| 821 | case *semantic.Field: |
| 822 | p.Ty = &Expression_Field{e.field(n)} |
| 823 | case semantic.Float32Value: |
| 824 | p.Ty = &Expression_Float32Value{e.float32Value(n)} |
| 825 | case semantic.Float64Value: |
| 826 | p.Ty = &Expression_Float64Value{e.float64Value(n)} |
| 827 | case *semantic.Global: |
| 828 | p.Ty = &Expression_Global{e.global(n)} |
| 829 | case *semantic.Ignore: |
| 830 | p.Ty = &Expression_Ignore{e.ignore(n)} |
| 831 | case semantic.Int8Value: |
| 832 | p.Ty = &Expression_Int8Value{e.int8Value(n)} |
| 833 | case semantic.Int16Value: |
| 834 | p.Ty = &Expression_Int16Value{e.int16Value(n)} |
| 835 | case semantic.Int32Value: |
| 836 | p.Ty = &Expression_Int32Value{e.int32Value(n)} |
| 837 | case semantic.Int64Value: |
| 838 | p.Ty = &Expression_Int64Value{e.int64Value(n)} |
| 839 | case *semantic.Length: |
| 840 | p.Ty = &Expression_Length{e.length(n)} |
| 841 | case *semantic.Local: |
| 842 | p.Ty = &Expression_Local{e.local(n)} |
| 843 | case *semantic.Make: |
| 844 | p.Ty = &Expression_Make{e.make(n)} |
| 845 | case *semantic.MapContains: |
| 846 | p.Ty = &Expression_MapContains{e.mapContains(n)} |
| 847 | case *semantic.MapIndex: |
| 848 | p.Ty = &Expression_MapIndex{e.mapIndex(n)} |
no test coverage detected