github.com/gmemcc/yaegi@v0.12.1-0.20221128122509-aa99124c5d16/stdlib/go1_16_encoding_xml.go (about) 1 // Code generated by 'yaegi extract encoding/xml'. DO NOT EDIT. 2 3 // +build go1.16,!go1.17 4 5 package stdlib 6 7 import ( 8 "encoding/xml" 9 "go/constant" 10 "go/token" 11 "reflect" 12 ) 13 14 func init() { 15 Symbols["encoding/xml/xml"] = map[string]reflect.Value{ 16 // function, constant and variable definitions 17 "CopyToken": reflect.ValueOf(xml.CopyToken), 18 "Escape": reflect.ValueOf(xml.Escape), 19 "EscapeText": reflect.ValueOf(xml.EscapeText), 20 "HTMLAutoClose": reflect.ValueOf(&xml.HTMLAutoClose).Elem(), 21 "HTMLEntity": reflect.ValueOf(&xml.HTMLEntity).Elem(), 22 "Header": reflect.ValueOf(constant.MakeFromLiteral("\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\"", token.STRING, 0)), 23 "Marshal": reflect.ValueOf(xml.Marshal), 24 "MarshalIndent": reflect.ValueOf(xml.MarshalIndent), 25 "NewDecoder": reflect.ValueOf(xml.NewDecoder), 26 "NewEncoder": reflect.ValueOf(xml.NewEncoder), 27 "NewTokenDecoder": reflect.ValueOf(xml.NewTokenDecoder), 28 "Unmarshal": reflect.ValueOf(xml.Unmarshal), 29 30 // type definitions 31 "Attr": reflect.ValueOf((*xml.Attr)(nil)), 32 "CharData": reflect.ValueOf((*xml.CharData)(nil)), 33 "Comment": reflect.ValueOf((*xml.Comment)(nil)), 34 "Decoder": reflect.ValueOf((*xml.Decoder)(nil)), 35 "Directive": reflect.ValueOf((*xml.Directive)(nil)), 36 "Encoder": reflect.ValueOf((*xml.Encoder)(nil)), 37 "EndElement": reflect.ValueOf((*xml.EndElement)(nil)), 38 "Marshaler": reflect.ValueOf((*xml.Marshaler)(nil)), 39 "MarshalerAttr": reflect.ValueOf((*xml.MarshalerAttr)(nil)), 40 "Name": reflect.ValueOf((*xml.Name)(nil)), 41 "ProcInst": reflect.ValueOf((*xml.ProcInst)(nil)), 42 "StartElement": reflect.ValueOf((*xml.StartElement)(nil)), 43 "SyntaxError": reflect.ValueOf((*xml.SyntaxError)(nil)), 44 "TagPathError": reflect.ValueOf((*xml.TagPathError)(nil)), 45 "Token": reflect.ValueOf((*xml.Token)(nil)), 46 "TokenReader": reflect.ValueOf((*xml.TokenReader)(nil)), 47 "UnmarshalError": reflect.ValueOf((*xml.UnmarshalError)(nil)), 48 "Unmarshaler": reflect.ValueOf((*xml.Unmarshaler)(nil)), 49 "UnmarshalerAttr": reflect.ValueOf((*xml.UnmarshalerAttr)(nil)), 50 "UnsupportedTypeError": reflect.ValueOf((*xml.UnsupportedTypeError)(nil)), 51 52 // interface wrapper definitions 53 "_Marshaler": reflect.ValueOf((*_encoding_xml_Marshaler)(nil)), 54 "_MarshalerAttr": reflect.ValueOf((*_encoding_xml_MarshalerAttr)(nil)), 55 "_Token": reflect.ValueOf((*_encoding_xml_Token)(nil)), 56 "_TokenReader": reflect.ValueOf((*_encoding_xml_TokenReader)(nil)), 57 "_Unmarshaler": reflect.ValueOf((*_encoding_xml_Unmarshaler)(nil)), 58 "_UnmarshalerAttr": reflect.ValueOf((*_encoding_xml_UnmarshalerAttr)(nil)), 59 } 60 } 61 62 // _encoding_xml_Marshaler is an interface wrapper for Marshaler type 63 type _encoding_xml_Marshaler struct { 64 IValue interface{} 65 WMarshalXML func(e *xml.Encoder, start xml.StartElement) error 66 } 67 68 func (W _encoding_xml_Marshaler) MarshalXML(e *xml.Encoder, start xml.StartElement) error { 69 return W.WMarshalXML(e, start) 70 } 71 72 // _encoding_xml_MarshalerAttr is an interface wrapper for MarshalerAttr type 73 type _encoding_xml_MarshalerAttr struct { 74 IValue interface{} 75 WMarshalXMLAttr func(name xml.Name) (xml.Attr, error) 76 } 77 78 func (W _encoding_xml_MarshalerAttr) MarshalXMLAttr(name xml.Name) (xml.Attr, error) { 79 return W.WMarshalXMLAttr(name) 80 } 81 82 // _encoding_xml_Token is an interface wrapper for Token type 83 type _encoding_xml_Token struct { 84 IValue interface{} 85 } 86 87 // _encoding_xml_TokenReader is an interface wrapper for TokenReader type 88 type _encoding_xml_TokenReader struct { 89 IValue interface{} 90 WToken func() (xml.Token, error) 91 } 92 93 func (W _encoding_xml_TokenReader) Token() (xml.Token, error) { 94 return W.WToken() 95 } 96 97 // _encoding_xml_Unmarshaler is an interface wrapper for Unmarshaler type 98 type _encoding_xml_Unmarshaler struct { 99 IValue interface{} 100 WUnmarshalXML func(d *xml.Decoder, start xml.StartElement) error 101 } 102 103 func (W _encoding_xml_Unmarshaler) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { 104 return W.WUnmarshalXML(d, start) 105 } 106 107 // _encoding_xml_UnmarshalerAttr is an interface wrapper for UnmarshalerAttr type 108 type _encoding_xml_UnmarshalerAttr struct { 109 IValue interface{} 110 WUnmarshalXMLAttr func(attr xml.Attr) error 111 } 112 113 func (W _encoding_xml_UnmarshalerAttr) UnmarshalXMLAttr(attr xml.Attr) error { 114 return W.WUnmarshalXMLAttr(attr) 115 }