Source File
encode_ast.gen.go
Belonging Package
golang.org/x/pkgsite/internal/godoc
package godoc
import (
)
func ( *codec.Encoder, *ast.ArrayType) {
if !.StartStruct( == nil, ) {
return
}
if .Lbrack != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Lbrack))
}
if .Len != nil {
.EncodeUint(1)
.EncodeAny(.Len)
}
if .Elt != nil {
.EncodeUint(2)
.EncodeAny(.Elt)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.ArrayType) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.ArrayType)
return
}
var ast.ArrayType
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Lbrack = token.Pos(.DecodeInt())
case 1:
.Len = .DecodeAny().(ast.Expr)
case 2:
.Elt = .DecodeAny().(ast.Expr)
default:
.UnknownField("ast.ArrayType", )
}
* = &
}
}
func () {
codec.Register(&ast.ArrayType{},
func( *codec.Encoder, interface{}) { encode_ast_ArrayType(, .(*ast.ArrayType)) },
func( *codec.Decoder) interface{} {
var *ast.ArrayType
decode_ast_ArrayType(, &)
return
})
}
func ( *codec.Encoder, *ast.AssignStmt) {
if !.StartStruct( == nil, ) {
return
}
if .Lhs != nil {
.EncodeUint(0)
encode_slice_ast_Expr(, .Lhs)
}
if .TokPos != 0 {
.EncodeUint(1)
.EncodeInt(int64(.TokPos))
}
if .Tok != 0 {
.EncodeUint(2)
.EncodeInt(int64(.Tok))
}
if .Rhs != nil {
.EncodeUint(3)
encode_slice_ast_Expr(, .Rhs)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.AssignStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.AssignStmt)
return
}
var ast.AssignStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
decode_slice_ast_Expr(, &.Lhs)
case 1:
.TokPos = token.Pos(.DecodeInt())
case 2:
.Tok = token.Token(.DecodeInt())
case 3:
decode_slice_ast_Expr(, &.Rhs)
default:
.UnknownField("ast.AssignStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.AssignStmt{},
func( *codec.Encoder, interface{}) { encode_ast_AssignStmt(, .(*ast.AssignStmt)) },
func( *codec.Decoder) interface{} {
var *ast.AssignStmt
decode_ast_AssignStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.BadDecl) {
if !.StartStruct( == nil, ) {
return
}
if .From != 0 {
.EncodeUint(0)
.EncodeInt(int64(.From))
}
if .To != 0 {
.EncodeUint(1)
.EncodeInt(int64(.To))
}
.EndStruct()
}
func ( *codec.Decoder, **ast.BadDecl) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.BadDecl)
return
}
var ast.BadDecl
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.From = token.Pos(.DecodeInt())
case 1:
.To = token.Pos(.DecodeInt())
default:
.UnknownField("ast.BadDecl", )
}
* = &
}
}
func () {
codec.Register(&ast.BadDecl{},
func( *codec.Encoder, interface{}) { encode_ast_BadDecl(, .(*ast.BadDecl)) },
func( *codec.Decoder) interface{} {
var *ast.BadDecl
decode_ast_BadDecl(, &)
return
})
}
func ( *codec.Encoder, *ast.BadExpr) {
if !.StartStruct( == nil, ) {
return
}
if .From != 0 {
.EncodeUint(0)
.EncodeInt(int64(.From))
}
if .To != 0 {
.EncodeUint(1)
.EncodeInt(int64(.To))
}
.EndStruct()
}
func ( *codec.Decoder, **ast.BadExpr) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.BadExpr)
return
}
var ast.BadExpr
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.From = token.Pos(.DecodeInt())
case 1:
.To = token.Pos(.DecodeInt())
default:
.UnknownField("ast.BadExpr", )
}
* = &
}
}
func () {
codec.Register(&ast.BadExpr{},
func( *codec.Encoder, interface{}) { encode_ast_BadExpr(, .(*ast.BadExpr)) },
func( *codec.Decoder) interface{} {
var *ast.BadExpr
decode_ast_BadExpr(, &)
return
})
}
func ( *codec.Encoder, *ast.BadStmt) {
if !.StartStruct( == nil, ) {
return
}
if .From != 0 {
.EncodeUint(0)
.EncodeInt(int64(.From))
}
if .To != 0 {
.EncodeUint(1)
.EncodeInt(int64(.To))
}
.EndStruct()
}
func ( *codec.Decoder, **ast.BadStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.BadStmt)
return
}
var ast.BadStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.From = token.Pos(.DecodeInt())
case 1:
.To = token.Pos(.DecodeInt())
default:
.UnknownField("ast.BadStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.BadStmt{},
func( *codec.Encoder, interface{}) { encode_ast_BadStmt(, .(*ast.BadStmt)) },
func( *codec.Decoder) interface{} {
var *ast.BadStmt
decode_ast_BadStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.BasicLit) {
if !.StartStruct( == nil, ) {
return
}
if .ValuePos != 0 {
.EncodeUint(0)
.EncodeInt(int64(.ValuePos))
}
if .Kind != 0 {
.EncodeUint(1)
.EncodeInt(int64(.Kind))
}
if .Value != "" {
.EncodeUint(2)
.EncodeString(.Value)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.BasicLit) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.BasicLit)
return
}
var ast.BasicLit
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.ValuePos = token.Pos(.DecodeInt())
case 1:
.Kind = token.Token(.DecodeInt())
case 2:
.Value = .DecodeString()
default:
.UnknownField("ast.BasicLit", )
}
* = &
}
}
func () {
codec.Register(&ast.BasicLit{},
func( *codec.Encoder, interface{}) { encode_ast_BasicLit(, .(*ast.BasicLit)) },
func( *codec.Decoder) interface{} {
var *ast.BasicLit
decode_ast_BasicLit(, &)
return
})
}
func ( *codec.Encoder, *ast.BinaryExpr) {
if !.StartStruct( == nil, ) {
return
}
if .X != nil {
.EncodeUint(0)
.EncodeAny(.X)
}
if .OpPos != 0 {
.EncodeUint(1)
.EncodeInt(int64(.OpPos))
}
if .Op != 0 {
.EncodeUint(2)
.EncodeInt(int64(.Op))
}
if .Y != nil {
.EncodeUint(3)
.EncodeAny(.Y)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.BinaryExpr) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.BinaryExpr)
return
}
var ast.BinaryExpr
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.X = .DecodeAny().(ast.Expr)
case 1:
.OpPos = token.Pos(.DecodeInt())
case 2:
.Op = token.Token(.DecodeInt())
case 3:
.Y = .DecodeAny().(ast.Expr)
default:
.UnknownField("ast.BinaryExpr", )
}
* = &
}
}
func () {
codec.Register(&ast.BinaryExpr{},
func( *codec.Encoder, interface{}) { encode_ast_BinaryExpr(, .(*ast.BinaryExpr)) },
func( *codec.Decoder) interface{} {
var *ast.BinaryExpr
decode_ast_BinaryExpr(, &)
return
})
}
func ( *codec.Encoder, *ast.BlockStmt) {
if !.StartStruct( == nil, ) {
return
}
if .Lbrace != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Lbrace))
}
if .List != nil {
.EncodeUint(1)
encode_slice_ast_Stmt(, .List)
}
if .Rbrace != 0 {
.EncodeUint(2)
.EncodeInt(int64(.Rbrace))
}
.EndStruct()
}
func ( *codec.Decoder, **ast.BlockStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.BlockStmt)
return
}
var ast.BlockStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Lbrace = token.Pos(.DecodeInt())
case 1:
decode_slice_ast_Stmt(, &.List)
case 2:
.Rbrace = token.Pos(.DecodeInt())
default:
.UnknownField("ast.BlockStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.BlockStmt{},
func( *codec.Encoder, interface{}) { encode_ast_BlockStmt(, .(*ast.BlockStmt)) },
func( *codec.Decoder) interface{} {
var *ast.BlockStmt
decode_ast_BlockStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.BranchStmt) {
if !.StartStruct( == nil, ) {
return
}
if .TokPos != 0 {
.EncodeUint(0)
.EncodeInt(int64(.TokPos))
}
if .Tok != 0 {
.EncodeUint(1)
.EncodeInt(int64(.Tok))
}
if .Label != nil {
.EncodeUint(2)
encode_ast_Ident(, .Label)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.BranchStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.BranchStmt)
return
}
var ast.BranchStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.TokPos = token.Pos(.DecodeInt())
case 1:
.Tok = token.Token(.DecodeInt())
case 2:
decode_ast_Ident(, &.Label)
default:
.UnknownField("ast.BranchStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.BranchStmt{},
func( *codec.Encoder, interface{}) { encode_ast_BranchStmt(, .(*ast.BranchStmt)) },
func( *codec.Decoder) interface{} {
var *ast.BranchStmt
decode_ast_BranchStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.CallExpr) {
if !.StartStruct( == nil, ) {
return
}
if .Fun != nil {
.EncodeUint(0)
.EncodeAny(.Fun)
}
if .Lparen != 0 {
.EncodeUint(1)
.EncodeInt(int64(.Lparen))
}
if .Args != nil {
.EncodeUint(2)
encode_slice_ast_Expr(, .Args)
}
if .Ellipsis != 0 {
.EncodeUint(3)
.EncodeInt(int64(.Ellipsis))
}
if .Rparen != 0 {
.EncodeUint(4)
.EncodeInt(int64(.Rparen))
}
.EndStruct()
}
func ( *codec.Decoder, **ast.CallExpr) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.CallExpr)
return
}
var ast.CallExpr
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Fun = .DecodeAny().(ast.Expr)
case 1:
.Lparen = token.Pos(.DecodeInt())
case 2:
decode_slice_ast_Expr(, &.Args)
case 3:
.Ellipsis = token.Pos(.DecodeInt())
case 4:
.Rparen = token.Pos(.DecodeInt())
default:
.UnknownField("ast.CallExpr", )
}
* = &
}
}
func () {
codec.Register(&ast.CallExpr{},
func( *codec.Encoder, interface{}) { encode_ast_CallExpr(, .(*ast.CallExpr)) },
func( *codec.Decoder) interface{} {
var *ast.CallExpr
decode_ast_CallExpr(, &)
return
})
}
func ( *codec.Encoder, *ast.CaseClause) {
if !.StartStruct( == nil, ) {
return
}
if .Case != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Case))
}
if .List != nil {
.EncodeUint(1)
encode_slice_ast_Expr(, .List)
}
if .Colon != 0 {
.EncodeUint(2)
.EncodeInt(int64(.Colon))
}
if .Body != nil {
.EncodeUint(3)
encode_slice_ast_Stmt(, .Body)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.CaseClause) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.CaseClause)
return
}
var ast.CaseClause
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Case = token.Pos(.DecodeInt())
case 1:
decode_slice_ast_Expr(, &.List)
case 2:
.Colon = token.Pos(.DecodeInt())
case 3:
decode_slice_ast_Stmt(, &.Body)
default:
.UnknownField("ast.CaseClause", )
}
* = &
}
}
func () {
codec.Register(&ast.CaseClause{},
func( *codec.Encoder, interface{}) { encode_ast_CaseClause(, .(*ast.CaseClause)) },
func( *codec.Decoder) interface{} {
var *ast.CaseClause
decode_ast_CaseClause(, &)
return
})
}
func ( *codec.Encoder, *ast.ChanType) {
if !.StartStruct( == nil, ) {
return
}
if .Begin != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Begin))
}
if .Arrow != 0 {
.EncodeUint(1)
.EncodeInt(int64(.Arrow))
}
if .Dir != 0 {
.EncodeUint(2)
.EncodeInt(int64(.Dir))
}
if .Value != nil {
.EncodeUint(3)
.EncodeAny(.Value)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.ChanType) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.ChanType)
return
}
var ast.ChanType
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Begin = token.Pos(.DecodeInt())
case 1:
.Arrow = token.Pos(.DecodeInt())
case 2:
.Dir = ast.ChanDir(.DecodeInt())
case 3:
.Value = .DecodeAny().(ast.Expr)
default:
.UnknownField("ast.ChanType", )
}
* = &
}
}
func () {
codec.Register(&ast.ChanType{},
func( *codec.Encoder, interface{}) { encode_ast_ChanType(, .(*ast.ChanType)) },
func( *codec.Decoder) interface{} {
var *ast.ChanType
decode_ast_ChanType(, &)
return
})
}
func ( *codec.Encoder, *ast.CommClause) {
if !.StartStruct( == nil, ) {
return
}
if .Case != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Case))
}
if .Comm != nil {
.EncodeUint(1)
.EncodeAny(.Comm)
}
if .Colon != 0 {
.EncodeUint(2)
.EncodeInt(int64(.Colon))
}
if .Body != nil {
.EncodeUint(3)
encode_slice_ast_Stmt(, .Body)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.CommClause) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.CommClause)
return
}
var ast.CommClause
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Case = token.Pos(.DecodeInt())
case 1:
.Comm = .DecodeAny().(ast.Stmt)
case 2:
.Colon = token.Pos(.DecodeInt())
case 3:
decode_slice_ast_Stmt(, &.Body)
default:
.UnknownField("ast.CommClause", )
}
* = &
}
}
func () {
codec.Register(&ast.CommClause{},
func( *codec.Encoder, interface{}) { encode_ast_CommClause(, .(*ast.CommClause)) },
func( *codec.Decoder) interface{} {
var *ast.CommClause
decode_ast_CommClause(, &)
return
})
}
func ( *codec.Encoder, *ast.CommentGroup) {
if !.StartStruct( == nil, ) {
return
}
if .List != nil {
.EncodeUint(0)
encode_slice_ast_Comment(, .List)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.CommentGroup) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.CommentGroup)
return
}
var ast.CommentGroup
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
decode_slice_ast_Comment(, &.List)
default:
.UnknownField("ast.CommentGroup", )
}
* = &
}
}
func () {
codec.Register(&ast.CommentGroup{},
func( *codec.Encoder, interface{}) { encode_ast_CommentGroup(, .(*ast.CommentGroup)) },
func( *codec.Decoder) interface{} {
var *ast.CommentGroup
decode_ast_CommentGroup(, &)
return
})
}
func ( *codec.Encoder, *ast.Comment) {
if !.StartStruct( == nil, ) {
return
}
if .Slash != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Slash))
}
if .Text != "" {
.EncodeUint(1)
.EncodeString(.Text)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.Comment) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.Comment)
return
}
var ast.Comment
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Slash = token.Pos(.DecodeInt())
case 1:
.Text = .DecodeString()
default:
.UnknownField("ast.Comment", )
}
* = &
}
}
func () {
codec.Register(&ast.Comment{},
func( *codec.Encoder, interface{}) { encode_ast_Comment(, .(*ast.Comment)) },
func( *codec.Decoder) interface{} {
var *ast.Comment
decode_ast_Comment(, &)
return
})
}
func ( *codec.Encoder, *ast.CompositeLit) {
if !.StartStruct( == nil, ) {
return
}
if .Type != nil {
.EncodeUint(0)
.EncodeAny(.Type)
}
if .Lbrace != 0 {
.EncodeUint(1)
.EncodeInt(int64(.Lbrace))
}
if .Elts != nil {
.EncodeUint(2)
encode_slice_ast_Expr(, .Elts)
}
if .Rbrace != 0 {
.EncodeUint(3)
.EncodeInt(int64(.Rbrace))
}
if .Incomplete != false {
.EncodeUint(4)
.EncodeBool(.Incomplete)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.CompositeLit) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.CompositeLit)
return
}
var ast.CompositeLit
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Type = .DecodeAny().(ast.Expr)
case 1:
.Lbrace = token.Pos(.DecodeInt())
case 2:
decode_slice_ast_Expr(, &.Elts)
case 3:
.Rbrace = token.Pos(.DecodeInt())
case 4:
.Incomplete = .DecodeBool()
default:
.UnknownField("ast.CompositeLit", )
}
* = &
}
}
func () {
codec.Register(&ast.CompositeLit{},
func( *codec.Encoder, interface{}) { encode_ast_CompositeLit(, .(*ast.CompositeLit)) },
func( *codec.Decoder) interface{} {
var *ast.CompositeLit
decode_ast_CompositeLit(, &)
return
})
}
func ( *codec.Encoder, *ast.DeclStmt) {
if !.StartStruct( == nil, ) {
return
}
if .Decl != nil {
.EncodeUint(0)
.EncodeAny(.Decl)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.DeclStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.DeclStmt)
return
}
var ast.DeclStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Decl = .DecodeAny().(ast.Decl)
default:
.UnknownField("ast.DeclStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.DeclStmt{},
func( *codec.Encoder, interface{}) { encode_ast_DeclStmt(, .(*ast.DeclStmt)) },
func( *codec.Decoder) interface{} {
var *ast.DeclStmt
decode_ast_DeclStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.DeferStmt) {
if !.StartStruct( == nil, ) {
return
}
if .Defer != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Defer))
}
if .Call != nil {
.EncodeUint(1)
encode_ast_CallExpr(, .Call)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.DeferStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.DeferStmt)
return
}
var ast.DeferStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Defer = token.Pos(.DecodeInt())
case 1:
decode_ast_CallExpr(, &.Call)
default:
.UnknownField("ast.DeferStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.DeferStmt{},
func( *codec.Encoder, interface{}) { encode_ast_DeferStmt(, .(*ast.DeferStmt)) },
func( *codec.Decoder) interface{} {
var *ast.DeferStmt
decode_ast_DeferStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.Ellipsis) {
if !.StartStruct( == nil, ) {
return
}
if .Ellipsis != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Ellipsis))
}
if .Elt != nil {
.EncodeUint(1)
.EncodeAny(.Elt)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.Ellipsis) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.Ellipsis)
return
}
var ast.Ellipsis
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Ellipsis = token.Pos(.DecodeInt())
case 1:
.Elt = .DecodeAny().(ast.Expr)
default:
.UnknownField("ast.Ellipsis", )
}
* = &
}
}
func () {
codec.Register(&ast.Ellipsis{},
func( *codec.Encoder, interface{}) { encode_ast_Ellipsis(, .(*ast.Ellipsis)) },
func( *codec.Decoder) interface{} {
var *ast.Ellipsis
decode_ast_Ellipsis(, &)
return
})
}
func ( *codec.Encoder, *ast.EmptyStmt) {
if !.StartStruct( == nil, ) {
return
}
if .Semicolon != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Semicolon))
}
if .Implicit != false {
.EncodeUint(1)
.EncodeBool(.Implicit)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.EmptyStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.EmptyStmt)
return
}
var ast.EmptyStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Semicolon = token.Pos(.DecodeInt())
case 1:
.Implicit = .DecodeBool()
default:
.UnknownField("ast.EmptyStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.EmptyStmt{},
func( *codec.Encoder, interface{}) { encode_ast_EmptyStmt(, .(*ast.EmptyStmt)) },
func( *codec.Decoder) interface{} {
var *ast.EmptyStmt
decode_ast_EmptyStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.ExprStmt) {
if !.StartStruct( == nil, ) {
return
}
if .X != nil {
.EncodeUint(0)
.EncodeAny(.X)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.ExprStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.ExprStmt)
return
}
var ast.ExprStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.X = .DecodeAny().(ast.Expr)
default:
.UnknownField("ast.ExprStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.ExprStmt{},
func( *codec.Encoder, interface{}) { encode_ast_ExprStmt(, .(*ast.ExprStmt)) },
func( *codec.Decoder) interface{} {
var *ast.ExprStmt
decode_ast_ExprStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.FieldList) {
if !.StartStruct( == nil, ) {
return
}
if .Opening != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Opening))
}
if .List != nil {
.EncodeUint(1)
encode_slice_ast_Field(, .List)
}
if .Closing != 0 {
.EncodeUint(2)
.EncodeInt(int64(.Closing))
}
.EndStruct()
}
func ( *codec.Decoder, **ast.FieldList) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.FieldList)
return
}
var ast.FieldList
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Opening = token.Pos(.DecodeInt())
case 1:
decode_slice_ast_Field(, &.List)
case 2:
.Closing = token.Pos(.DecodeInt())
default:
.UnknownField("ast.FieldList", )
}
* = &
}
}
func () {
codec.Register(&ast.FieldList{},
func( *codec.Encoder, interface{}) { encode_ast_FieldList(, .(*ast.FieldList)) },
func( *codec.Decoder) interface{} {
var *ast.FieldList
decode_ast_FieldList(, &)
return
})
}
func ( *codec.Encoder, *ast.Field) {
if !.StartStruct( == nil, ) {
return
}
if .Doc != nil {
.EncodeUint(0)
encode_ast_CommentGroup(, .Doc)
}
if .Names != nil {
.EncodeUint(1)
encode_slice_ast_Ident(, .Names)
}
if .Type != nil {
.EncodeUint(2)
.EncodeAny(.Type)
}
if .Tag != nil {
.EncodeUint(3)
encode_ast_BasicLit(, .Tag)
}
if .Comment != nil {
.EncodeUint(4)
encode_ast_CommentGroup(, .Comment)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.Field) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.Field)
return
}
var ast.Field
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
decode_ast_CommentGroup(, &.Doc)
case 1:
decode_slice_ast_Ident(, &.Names)
case 2:
.Type = .DecodeAny().(ast.Expr)
case 3:
decode_ast_BasicLit(, &.Tag)
case 4:
decode_ast_CommentGroup(, &.Comment)
default:
.UnknownField("ast.Field", )
}
* = &
}
}
func () {
codec.Register(&ast.Field{},
func( *codec.Encoder, interface{}) { encode_ast_Field(, .(*ast.Field)) },
func( *codec.Decoder) interface{} {
var *ast.Field
decode_ast_Field(, &)
return
})
}
func ( *codec.Encoder, *ast.ForStmt) {
if !.StartStruct( == nil, ) {
return
}
if .For != 0 {
.EncodeUint(0)
.EncodeInt(int64(.For))
}
if .Init != nil {
.EncodeUint(1)
.EncodeAny(.Init)
}
if .Cond != nil {
.EncodeUint(2)
.EncodeAny(.Cond)
}
if .Post != nil {
.EncodeUint(3)
.EncodeAny(.Post)
}
if .Body != nil {
.EncodeUint(4)
encode_ast_BlockStmt(, .Body)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.ForStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.ForStmt)
return
}
var ast.ForStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.For = token.Pos(.DecodeInt())
case 1:
.Init = .DecodeAny().(ast.Stmt)
case 2:
.Cond = .DecodeAny().(ast.Expr)
case 3:
.Post = .DecodeAny().(ast.Stmt)
case 4:
decode_ast_BlockStmt(, &.Body)
default:
.UnknownField("ast.ForStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.ForStmt{},
func( *codec.Encoder, interface{}) { encode_ast_ForStmt(, .(*ast.ForStmt)) },
func( *codec.Decoder) interface{} {
var *ast.ForStmt
decode_ast_ForStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.FuncDecl) {
if !.StartStruct( == nil, ) {
return
}
if .Doc != nil {
.EncodeUint(0)
encode_ast_CommentGroup(, .Doc)
}
if .Recv != nil {
.EncodeUint(1)
encode_ast_FieldList(, .Recv)
}
if .Name != nil {
.EncodeUint(2)
encode_ast_Ident(, .Name)
}
if .Type != nil {
.EncodeUint(3)
encode_ast_FuncType(, .Type)
}
if .Body != nil {
.EncodeUint(4)
encode_ast_BlockStmt(, .Body)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.FuncDecl) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.FuncDecl)
return
}
var ast.FuncDecl
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
decode_ast_CommentGroup(, &.Doc)
case 1:
decode_ast_FieldList(, &.Recv)
case 2:
decode_ast_Ident(, &.Name)
case 3:
decode_ast_FuncType(, &.Type)
case 4:
decode_ast_BlockStmt(, &.Body)
default:
.UnknownField("ast.FuncDecl", )
}
* = &
}
}
func () {
codec.Register(&ast.FuncDecl{},
func( *codec.Encoder, interface{}) { encode_ast_FuncDecl(, .(*ast.FuncDecl)) },
func( *codec.Decoder) interface{} {
var *ast.FuncDecl
decode_ast_FuncDecl(, &)
return
})
}
func ( *codec.Encoder, *ast.FuncLit) {
if !.StartStruct( == nil, ) {
return
}
if .Type != nil {
.EncodeUint(0)
encode_ast_FuncType(, .Type)
}
if .Body != nil {
.EncodeUint(1)
encode_ast_BlockStmt(, .Body)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.FuncLit) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.FuncLit)
return
}
var ast.FuncLit
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
decode_ast_FuncType(, &.Type)
case 1:
decode_ast_BlockStmt(, &.Body)
default:
.UnknownField("ast.FuncLit", )
}
* = &
}
}
func () {
codec.Register(&ast.FuncLit{},
func( *codec.Encoder, interface{}) { encode_ast_FuncLit(, .(*ast.FuncLit)) },
func( *codec.Decoder) interface{} {
var *ast.FuncLit
decode_ast_FuncLit(, &)
return
})
}
func ( *codec.Encoder, *ast.FuncType) {
if !.StartStruct( == nil, ) {
return
}
if .Func != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Func))
}
if .Params != nil {
.EncodeUint(1)
encode_ast_FieldList(, .Params)
}
if .Results != nil {
.EncodeUint(2)
encode_ast_FieldList(, .Results)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.FuncType) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.FuncType)
return
}
var ast.FuncType
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Func = token.Pos(.DecodeInt())
case 1:
decode_ast_FieldList(, &.Params)
case 2:
decode_ast_FieldList(, &.Results)
default:
.UnknownField("ast.FuncType", )
}
* = &
}
}
func () {
codec.Register(&ast.FuncType{},
func( *codec.Encoder, interface{}) { encode_ast_FuncType(, .(*ast.FuncType)) },
func( *codec.Decoder) interface{} {
var *ast.FuncType
decode_ast_FuncType(, &)
return
})
}
func ( *codec.Encoder, *ast.GenDecl) {
if !.StartStruct( == nil, ) {
return
}
if .Doc != nil {
.EncodeUint(0)
encode_ast_CommentGroup(, .Doc)
}
if .TokPos != 0 {
.EncodeUint(1)
.EncodeInt(int64(.TokPos))
}
if .Tok != 0 {
.EncodeUint(2)
.EncodeInt(int64(.Tok))
}
if .Lparen != 0 {
.EncodeUint(3)
.EncodeInt(int64(.Lparen))
}
if .Specs != nil {
.EncodeUint(4)
encode_slice_ast_Spec(, .Specs)
}
if .Rparen != 0 {
.EncodeUint(5)
.EncodeInt(int64(.Rparen))
}
.EndStruct()
}
func ( *codec.Decoder, **ast.GenDecl) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.GenDecl)
return
}
var ast.GenDecl
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
decode_ast_CommentGroup(, &.Doc)
case 1:
.TokPos = token.Pos(.DecodeInt())
case 2:
.Tok = token.Token(.DecodeInt())
case 3:
.Lparen = token.Pos(.DecodeInt())
case 4:
decode_slice_ast_Spec(, &.Specs)
case 5:
.Rparen = token.Pos(.DecodeInt())
default:
.UnknownField("ast.GenDecl", )
}
* = &
}
}
func () {
codec.Register(&ast.GenDecl{},
func( *codec.Encoder, interface{}) { encode_ast_GenDecl(, .(*ast.GenDecl)) },
func( *codec.Decoder) interface{} {
var *ast.GenDecl
decode_ast_GenDecl(, &)
return
})
}
func ( *codec.Encoder, *ast.GoStmt) {
if !.StartStruct( == nil, ) {
return
}
if .Go != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Go))
}
if .Call != nil {
.EncodeUint(1)
encode_ast_CallExpr(, .Call)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.GoStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.GoStmt)
return
}
var ast.GoStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Go = token.Pos(.DecodeInt())
case 1:
decode_ast_CallExpr(, &.Call)
default:
.UnknownField("ast.GoStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.GoStmt{},
func( *codec.Encoder, interface{}) { encode_ast_GoStmt(, .(*ast.GoStmt)) },
func( *codec.Decoder) interface{} {
var *ast.GoStmt
decode_ast_GoStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.Ident) {
if !.StartStruct( == nil, ) {
return
}
if .NamePos != 0 {
.EncodeUint(0)
.EncodeInt(int64(.NamePos))
}
if .Name != "" {
.EncodeUint(1)
.EncodeString(.Name)
}
if .Obj != nil {
.EncodeUint(2)
encode_ast_Object(, .Obj)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.Ident) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.Ident)
return
}
var ast.Ident
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.NamePos = token.Pos(.DecodeInt())
case 1:
.Name = .DecodeString()
case 2:
decode_ast_Object(, &.Obj)
default:
.UnknownField("ast.Ident", )
}
* = &
}
}
func () {
codec.Register(&ast.Ident{},
func( *codec.Encoder, interface{}) { encode_ast_Ident(, .(*ast.Ident)) },
func( *codec.Decoder) interface{} {
var *ast.Ident
decode_ast_Ident(, &)
return
})
}
func ( *codec.Encoder, *ast.IfStmt) {
if !.StartStruct( == nil, ) {
return
}
if .If != 0 {
.EncodeUint(0)
.EncodeInt(int64(.If))
}
if .Init != nil {
.EncodeUint(1)
.EncodeAny(.Init)
}
if .Cond != nil {
.EncodeUint(2)
.EncodeAny(.Cond)
}
if .Body != nil {
.EncodeUint(3)
encode_ast_BlockStmt(, .Body)
}
if .Else != nil {
.EncodeUint(4)
.EncodeAny(.Else)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.IfStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.IfStmt)
return
}
var ast.IfStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.If = token.Pos(.DecodeInt())
case 1:
.Init = .DecodeAny().(ast.Stmt)
case 2:
.Cond = .DecodeAny().(ast.Expr)
case 3:
decode_ast_BlockStmt(, &.Body)
case 4:
.Else = .DecodeAny().(ast.Stmt)
default:
.UnknownField("ast.IfStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.IfStmt{},
func( *codec.Encoder, interface{}) { encode_ast_IfStmt(, .(*ast.IfStmt)) },
func( *codec.Decoder) interface{} {
var *ast.IfStmt
decode_ast_IfStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.ImportSpec) {
if !.StartStruct( == nil, ) {
return
}
if .Doc != nil {
.EncodeUint(0)
encode_ast_CommentGroup(, .Doc)
}
if .Name != nil {
.EncodeUint(1)
encode_ast_Ident(, .Name)
}
if .Path != nil {
.EncodeUint(2)
encode_ast_BasicLit(, .Path)
}
if .Comment != nil {
.EncodeUint(3)
encode_ast_CommentGroup(, .Comment)
}
if .EndPos != 0 {
.EncodeUint(4)
.EncodeInt(int64(.EndPos))
}
.EndStruct()
}
func ( *codec.Decoder, **ast.ImportSpec) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.ImportSpec)
return
}
var ast.ImportSpec
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
decode_ast_CommentGroup(, &.Doc)
case 1:
decode_ast_Ident(, &.Name)
case 2:
decode_ast_BasicLit(, &.Path)
case 3:
decode_ast_CommentGroup(, &.Comment)
case 4:
.EndPos = token.Pos(.DecodeInt())
default:
.UnknownField("ast.ImportSpec", )
}
* = &
}
}
func () {
codec.Register(&ast.ImportSpec{},
func( *codec.Encoder, interface{}) { encode_ast_ImportSpec(, .(*ast.ImportSpec)) },
func( *codec.Decoder) interface{} {
var *ast.ImportSpec
decode_ast_ImportSpec(, &)
return
})
}
func ( *codec.Encoder, *ast.IncDecStmt) {
if !.StartStruct( == nil, ) {
return
}
if .X != nil {
.EncodeUint(0)
.EncodeAny(.X)
}
if .TokPos != 0 {
.EncodeUint(1)
.EncodeInt(int64(.TokPos))
}
if .Tok != 0 {
.EncodeUint(2)
.EncodeInt(int64(.Tok))
}
.EndStruct()
}
func ( *codec.Decoder, **ast.IncDecStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.IncDecStmt)
return
}
var ast.IncDecStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.X = .DecodeAny().(ast.Expr)
case 1:
.TokPos = token.Pos(.DecodeInt())
case 2:
.Tok = token.Token(.DecodeInt())
default:
.UnknownField("ast.IncDecStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.IncDecStmt{},
func( *codec.Encoder, interface{}) { encode_ast_IncDecStmt(, .(*ast.IncDecStmt)) },
func( *codec.Decoder) interface{} {
var *ast.IncDecStmt
decode_ast_IncDecStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.IndexExpr) {
if !.StartStruct( == nil, ) {
return
}
if .X != nil {
.EncodeUint(0)
.EncodeAny(.X)
}
if .Lbrack != 0 {
.EncodeUint(1)
.EncodeInt(int64(.Lbrack))
}
if .Index != nil {
.EncodeUint(2)
.EncodeAny(.Index)
}
if .Rbrack != 0 {
.EncodeUint(3)
.EncodeInt(int64(.Rbrack))
}
.EndStruct()
}
func ( *codec.Decoder, **ast.IndexExpr) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.IndexExpr)
return
}
var ast.IndexExpr
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.X = .DecodeAny().(ast.Expr)
case 1:
.Lbrack = token.Pos(.DecodeInt())
case 2:
.Index = .DecodeAny().(ast.Expr)
case 3:
.Rbrack = token.Pos(.DecodeInt())
default:
.UnknownField("ast.IndexExpr", )
}
* = &
}
}
func () {
codec.Register(&ast.IndexExpr{},
func( *codec.Encoder, interface{}) { encode_ast_IndexExpr(, .(*ast.IndexExpr)) },
func( *codec.Decoder) interface{} {
var *ast.IndexExpr
decode_ast_IndexExpr(, &)
return
})
}
func ( *codec.Encoder, *ast.InterfaceType) {
if !.StartStruct( == nil, ) {
return
}
if .Interface != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Interface))
}
if .Methods != nil {
.EncodeUint(1)
encode_ast_FieldList(, .Methods)
}
if .Incomplete != false {
.EncodeUint(2)
.EncodeBool(.Incomplete)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.InterfaceType) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.InterfaceType)
return
}
var ast.InterfaceType
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Interface = token.Pos(.DecodeInt())
case 1:
decode_ast_FieldList(, &.Methods)
case 2:
.Incomplete = .DecodeBool()
default:
.UnknownField("ast.InterfaceType", )
}
* = &
}
}
func () {
codec.Register(&ast.InterfaceType{},
func( *codec.Encoder, interface{}) { encode_ast_InterfaceType(, .(*ast.InterfaceType)) },
func( *codec.Decoder) interface{} {
var *ast.InterfaceType
decode_ast_InterfaceType(, &)
return
})
}
func ( *codec.Encoder, *ast.KeyValueExpr) {
if !.StartStruct( == nil, ) {
return
}
if .Key != nil {
.EncodeUint(0)
.EncodeAny(.Key)
}
if .Colon != 0 {
.EncodeUint(1)
.EncodeInt(int64(.Colon))
}
if .Value != nil {
.EncodeUint(2)
.EncodeAny(.Value)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.KeyValueExpr) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.KeyValueExpr)
return
}
var ast.KeyValueExpr
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Key = .DecodeAny().(ast.Expr)
case 1:
.Colon = token.Pos(.DecodeInt())
case 2:
.Value = .DecodeAny().(ast.Expr)
default:
.UnknownField("ast.KeyValueExpr", )
}
* = &
}
}
func () {
codec.Register(&ast.KeyValueExpr{},
func( *codec.Encoder, interface{}) { encode_ast_KeyValueExpr(, .(*ast.KeyValueExpr)) },
func( *codec.Decoder) interface{} {
var *ast.KeyValueExpr
decode_ast_KeyValueExpr(, &)
return
})
}
func ( *codec.Encoder, *ast.LabeledStmt) {
if !.StartStruct( == nil, ) {
return
}
if .Label != nil {
.EncodeUint(0)
encode_ast_Ident(, .Label)
}
if .Colon != 0 {
.EncodeUint(1)
.EncodeInt(int64(.Colon))
}
if .Stmt != nil {
.EncodeUint(2)
.EncodeAny(.Stmt)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.LabeledStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.LabeledStmt)
return
}
var ast.LabeledStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
decode_ast_Ident(, &.Label)
case 1:
.Colon = token.Pos(.DecodeInt())
case 2:
.Stmt = .DecodeAny().(ast.Stmt)
default:
.UnknownField("ast.LabeledStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.LabeledStmt{},
func( *codec.Encoder, interface{}) { encode_ast_LabeledStmt(, .(*ast.LabeledStmt)) },
func( *codec.Decoder) interface{} {
var *ast.LabeledStmt
decode_ast_LabeledStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.MapType) {
if !.StartStruct( == nil, ) {
return
}
if .Map != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Map))
}
if .Key != nil {
.EncodeUint(1)
.EncodeAny(.Key)
}
if .Value != nil {
.EncodeUint(2)
.EncodeAny(.Value)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.MapType) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.MapType)
return
}
var ast.MapType
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Map = token.Pos(.DecodeInt())
case 1:
.Key = .DecodeAny().(ast.Expr)
case 2:
.Value = .DecodeAny().(ast.Expr)
default:
.UnknownField("ast.MapType", )
}
* = &
}
}
func () {
codec.Register(&ast.MapType{},
func( *codec.Encoder, interface{}) { encode_ast_MapType(, .(*ast.MapType)) },
func( *codec.Decoder) interface{} {
var *ast.MapType
decode_ast_MapType(, &)
return
})
}
func ( *codec.Encoder, *ast.ParenExpr) {
if !.StartStruct( == nil, ) {
return
}
if .Lparen != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Lparen))
}
if .X != nil {
.EncodeUint(1)
.EncodeAny(.X)
}
if .Rparen != 0 {
.EncodeUint(2)
.EncodeInt(int64(.Rparen))
}
.EndStruct()
}
func ( *codec.Decoder, **ast.ParenExpr) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.ParenExpr)
return
}
var ast.ParenExpr
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Lparen = token.Pos(.DecodeInt())
case 1:
.X = .DecodeAny().(ast.Expr)
case 2:
.Rparen = token.Pos(.DecodeInt())
default:
.UnknownField("ast.ParenExpr", )
}
* = &
}
}
func () {
codec.Register(&ast.ParenExpr{},
func( *codec.Encoder, interface{}) { encode_ast_ParenExpr(, .(*ast.ParenExpr)) },
func( *codec.Decoder) interface{} {
var *ast.ParenExpr
decode_ast_ParenExpr(, &)
return
})
}
func ( *codec.Encoder, *ast.RangeStmt) {
if !.StartStruct( == nil, ) {
return
}
if .For != 0 {
.EncodeUint(0)
.EncodeInt(int64(.For))
}
if .Key != nil {
.EncodeUint(1)
.EncodeAny(.Key)
}
if .Value != nil {
.EncodeUint(2)
.EncodeAny(.Value)
}
if .TokPos != 0 {
.EncodeUint(3)
.EncodeInt(int64(.TokPos))
}
if .Tok != 0 {
.EncodeUint(4)
.EncodeInt(int64(.Tok))
}
if .X != nil {
.EncodeUint(5)
.EncodeAny(.X)
}
if .Body != nil {
.EncodeUint(6)
encode_ast_BlockStmt(, .Body)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.RangeStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.RangeStmt)
return
}
var ast.RangeStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.For = token.Pos(.DecodeInt())
case 1:
.Key = .DecodeAny().(ast.Expr)
case 2:
.Value = .DecodeAny().(ast.Expr)
case 3:
.TokPos = token.Pos(.DecodeInt())
case 4:
.Tok = token.Token(.DecodeInt())
case 5:
.X = .DecodeAny().(ast.Expr)
case 6:
decode_ast_BlockStmt(, &.Body)
default:
.UnknownField("ast.RangeStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.RangeStmt{},
func( *codec.Encoder, interface{}) { encode_ast_RangeStmt(, .(*ast.RangeStmt)) },
func( *codec.Decoder) interface{} {
var *ast.RangeStmt
decode_ast_RangeStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.ReturnStmt) {
if !.StartStruct( == nil, ) {
return
}
if .Return != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Return))
}
if .Results != nil {
.EncodeUint(1)
encode_slice_ast_Expr(, .Results)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.ReturnStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.ReturnStmt)
return
}
var ast.ReturnStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Return = token.Pos(.DecodeInt())
case 1:
decode_slice_ast_Expr(, &.Results)
default:
.UnknownField("ast.ReturnStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.ReturnStmt{},
func( *codec.Encoder, interface{}) { encode_ast_ReturnStmt(, .(*ast.ReturnStmt)) },
func( *codec.Decoder) interface{} {
var *ast.ReturnStmt
decode_ast_ReturnStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.Scope) {
if !.StartStruct( == nil, ) {
return
}
if .Outer != nil {
.EncodeUint(0)
(, .Outer)
}
if .Objects != nil {
.EncodeUint(1)
encode_map_string_ast_Object(, .Objects)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.Scope) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.Scope)
return
}
var ast.Scope
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
(, &.Outer)
case 1:
decode_map_string_ast_Object(, &.Objects)
default:
.UnknownField("ast.Scope", )
}
* = &
}
}
func () {
codec.Register(&ast.Scope{},
func( *codec.Encoder, interface{}) { encode_ast_Scope(, .(*ast.Scope)) },
func( *codec.Decoder) interface{} {
var *ast.Scope
decode_ast_Scope(, &)
return
})
}
func ( *codec.Encoder, *ast.SelectStmt) {
if !.StartStruct( == nil, ) {
return
}
if .Select != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Select))
}
if .Body != nil {
.EncodeUint(1)
encode_ast_BlockStmt(, .Body)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.SelectStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.SelectStmt)
return
}
var ast.SelectStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Select = token.Pos(.DecodeInt())
case 1:
decode_ast_BlockStmt(, &.Body)
default:
.UnknownField("ast.SelectStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.SelectStmt{},
func( *codec.Encoder, interface{}) { encode_ast_SelectStmt(, .(*ast.SelectStmt)) },
func( *codec.Decoder) interface{} {
var *ast.SelectStmt
decode_ast_SelectStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.SelectorExpr) {
if !.StartStruct( == nil, ) {
return
}
if .X != nil {
.EncodeUint(0)
.EncodeAny(.X)
}
if .Sel != nil {
.EncodeUint(1)
encode_ast_Ident(, .Sel)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.SelectorExpr) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.SelectorExpr)
return
}
var ast.SelectorExpr
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.X = .DecodeAny().(ast.Expr)
case 1:
decode_ast_Ident(, &.Sel)
default:
.UnknownField("ast.SelectorExpr", )
}
* = &
}
}
func () {
codec.Register(&ast.SelectorExpr{},
func( *codec.Encoder, interface{}) { encode_ast_SelectorExpr(, .(*ast.SelectorExpr)) },
func( *codec.Decoder) interface{} {
var *ast.SelectorExpr
decode_ast_SelectorExpr(, &)
return
})
}
func ( *codec.Encoder, *ast.SendStmt) {
if !.StartStruct( == nil, ) {
return
}
if .Chan != nil {
.EncodeUint(0)
.EncodeAny(.Chan)
}
if .Arrow != 0 {
.EncodeUint(1)
.EncodeInt(int64(.Arrow))
}
if .Value != nil {
.EncodeUint(2)
.EncodeAny(.Value)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.SendStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.SendStmt)
return
}
var ast.SendStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Chan = .DecodeAny().(ast.Expr)
case 1:
.Arrow = token.Pos(.DecodeInt())
case 2:
.Value = .DecodeAny().(ast.Expr)
default:
.UnknownField("ast.SendStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.SendStmt{},
func( *codec.Encoder, interface{}) { encode_ast_SendStmt(, .(*ast.SendStmt)) },
func( *codec.Decoder) interface{} {
var *ast.SendStmt
decode_ast_SendStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.SliceExpr) {
if !.StartStruct( == nil, ) {
return
}
if .X != nil {
.EncodeUint(0)
.EncodeAny(.X)
}
if .Lbrack != 0 {
.EncodeUint(1)
.EncodeInt(int64(.Lbrack))
}
if .Low != nil {
.EncodeUint(2)
.EncodeAny(.Low)
}
if .High != nil {
.EncodeUint(3)
.EncodeAny(.High)
}
if .Max != nil {
.EncodeUint(4)
.EncodeAny(.Max)
}
if .Slice3 != false {
.EncodeUint(5)
.EncodeBool(.Slice3)
}
if .Rbrack != 0 {
.EncodeUint(6)
.EncodeInt(int64(.Rbrack))
}
.EndStruct()
}
func ( *codec.Decoder, **ast.SliceExpr) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.SliceExpr)
return
}
var ast.SliceExpr
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.X = .DecodeAny().(ast.Expr)
case 1:
.Lbrack = token.Pos(.DecodeInt())
case 2:
.Low = .DecodeAny().(ast.Expr)
case 3:
.High = .DecodeAny().(ast.Expr)
case 4:
.Max = .DecodeAny().(ast.Expr)
case 5:
.Slice3 = .DecodeBool()
case 6:
.Rbrack = token.Pos(.DecodeInt())
default:
.UnknownField("ast.SliceExpr", )
}
* = &
}
}
func () {
codec.Register(&ast.SliceExpr{},
func( *codec.Encoder, interface{}) { encode_ast_SliceExpr(, .(*ast.SliceExpr)) },
func( *codec.Decoder) interface{} {
var *ast.SliceExpr
decode_ast_SliceExpr(, &)
return
})
}
func ( *codec.Encoder, *ast.StarExpr) {
if !.StartStruct( == nil, ) {
return
}
if .Star != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Star))
}
if .X != nil {
.EncodeUint(1)
.EncodeAny(.X)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.StarExpr) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.StarExpr)
return
}
var ast.StarExpr
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Star = token.Pos(.DecodeInt())
case 1:
.X = .DecodeAny().(ast.Expr)
default:
.UnknownField("ast.StarExpr", )
}
* = &
}
}
func () {
codec.Register(&ast.StarExpr{},
func( *codec.Encoder, interface{}) { encode_ast_StarExpr(, .(*ast.StarExpr)) },
func( *codec.Decoder) interface{} {
var *ast.StarExpr
decode_ast_StarExpr(, &)
return
})
}
func ( *codec.Encoder, *ast.StructType) {
if !.StartStruct( == nil, ) {
return
}
if .Struct != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Struct))
}
if .Fields != nil {
.EncodeUint(1)
encode_ast_FieldList(, .Fields)
}
if .Incomplete != false {
.EncodeUint(2)
.EncodeBool(.Incomplete)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.StructType) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.StructType)
return
}
var ast.StructType
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Struct = token.Pos(.DecodeInt())
case 1:
decode_ast_FieldList(, &.Fields)
case 2:
.Incomplete = .DecodeBool()
default:
.UnknownField("ast.StructType", )
}
* = &
}
}
func () {
codec.Register(&ast.StructType{},
func( *codec.Encoder, interface{}) { encode_ast_StructType(, .(*ast.StructType)) },
func( *codec.Decoder) interface{} {
var *ast.StructType
decode_ast_StructType(, &)
return
})
}
func ( *codec.Encoder, *ast.SwitchStmt) {
if !.StartStruct( == nil, ) {
return
}
if .Switch != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Switch))
}
if .Init != nil {
.EncodeUint(1)
.EncodeAny(.Init)
}
if .Tag != nil {
.EncodeUint(2)
.EncodeAny(.Tag)
}
if .Body != nil {
.EncodeUint(3)
encode_ast_BlockStmt(, .Body)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.SwitchStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.SwitchStmt)
return
}
var ast.SwitchStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Switch = token.Pos(.DecodeInt())
case 1:
.Init = .DecodeAny().(ast.Stmt)
case 2:
.Tag = .DecodeAny().(ast.Expr)
case 3:
decode_ast_BlockStmt(, &.Body)
default:
.UnknownField("ast.SwitchStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.SwitchStmt{},
func( *codec.Encoder, interface{}) { encode_ast_SwitchStmt(, .(*ast.SwitchStmt)) },
func( *codec.Decoder) interface{} {
var *ast.SwitchStmt
decode_ast_SwitchStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.TypeAssertExpr) {
if !.StartStruct( == nil, ) {
return
}
if .X != nil {
.EncodeUint(0)
.EncodeAny(.X)
}
if .Lparen != 0 {
.EncodeUint(1)
.EncodeInt(int64(.Lparen))
}
if .Type != nil {
.EncodeUint(2)
.EncodeAny(.Type)
}
if .Rparen != 0 {
.EncodeUint(3)
.EncodeInt(int64(.Rparen))
}
.EndStruct()
}
func ( *codec.Decoder, **ast.TypeAssertExpr) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.TypeAssertExpr)
return
}
var ast.TypeAssertExpr
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.X = .DecodeAny().(ast.Expr)
case 1:
.Lparen = token.Pos(.DecodeInt())
case 2:
.Type = .DecodeAny().(ast.Expr)
case 3:
.Rparen = token.Pos(.DecodeInt())
default:
.UnknownField("ast.TypeAssertExpr", )
}
* = &
}
}
func () {
codec.Register(&ast.TypeAssertExpr{},
func( *codec.Encoder, interface{}) { encode_ast_TypeAssertExpr(, .(*ast.TypeAssertExpr)) },
func( *codec.Decoder) interface{} {
var *ast.TypeAssertExpr
decode_ast_TypeAssertExpr(, &)
return
})
}
func ( *codec.Encoder, *ast.TypeSpec) {
if !.StartStruct( == nil, ) {
return
}
if .Doc != nil {
.EncodeUint(0)
encode_ast_CommentGroup(, .Doc)
}
if .Name != nil {
.EncodeUint(1)
encode_ast_Ident(, .Name)
}
if .Assign != 0 {
.EncodeUint(2)
.EncodeInt(int64(.Assign))
}
if .Type != nil {
.EncodeUint(3)
.EncodeAny(.Type)
}
if .Comment != nil {
.EncodeUint(4)
encode_ast_CommentGroup(, .Comment)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.TypeSpec) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.TypeSpec)
return
}
var ast.TypeSpec
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
decode_ast_CommentGroup(, &.Doc)
case 1:
decode_ast_Ident(, &.Name)
case 2:
.Assign = token.Pos(.DecodeInt())
case 3:
.Type = .DecodeAny().(ast.Expr)
case 4:
decode_ast_CommentGroup(, &.Comment)
default:
.UnknownField("ast.TypeSpec", )
}
* = &
}
}
func () {
codec.Register(&ast.TypeSpec{},
func( *codec.Encoder, interface{}) { encode_ast_TypeSpec(, .(*ast.TypeSpec)) },
func( *codec.Decoder) interface{} {
var *ast.TypeSpec
decode_ast_TypeSpec(, &)
return
})
}
func ( *codec.Encoder, *ast.TypeSwitchStmt) {
if !.StartStruct( == nil, ) {
return
}
if .Switch != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Switch))
}
if .Init != nil {
.EncodeUint(1)
.EncodeAny(.Init)
}
if .Assign != nil {
.EncodeUint(2)
.EncodeAny(.Assign)
}
if .Body != nil {
.EncodeUint(3)
encode_ast_BlockStmt(, .Body)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.TypeSwitchStmt) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.TypeSwitchStmt)
return
}
var ast.TypeSwitchStmt
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Switch = token.Pos(.DecodeInt())
case 1:
.Init = .DecodeAny().(ast.Stmt)
case 2:
.Assign = .DecodeAny().(ast.Stmt)
case 3:
decode_ast_BlockStmt(, &.Body)
default:
.UnknownField("ast.TypeSwitchStmt", )
}
* = &
}
}
func () {
codec.Register(&ast.TypeSwitchStmt{},
func( *codec.Encoder, interface{}) { encode_ast_TypeSwitchStmt(, .(*ast.TypeSwitchStmt)) },
func( *codec.Decoder) interface{} {
var *ast.TypeSwitchStmt
decode_ast_TypeSwitchStmt(, &)
return
})
}
func ( *codec.Encoder, *ast.UnaryExpr) {
if !.StartStruct( == nil, ) {
return
}
if .OpPos != 0 {
.EncodeUint(0)
.EncodeInt(int64(.OpPos))
}
if .Op != 0 {
.EncodeUint(1)
.EncodeInt(int64(.Op))
}
if .X != nil {
.EncodeUint(2)
.EncodeAny(.X)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.UnaryExpr) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.UnaryExpr)
return
}
var ast.UnaryExpr
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.OpPos = token.Pos(.DecodeInt())
case 1:
.Op = token.Token(.DecodeInt())
case 2:
.X = .DecodeAny().(ast.Expr)
default:
.UnknownField("ast.UnaryExpr", )
}
* = &
}
}
func () {
codec.Register(&ast.UnaryExpr{},
func( *codec.Encoder, interface{}) { encode_ast_UnaryExpr(, .(*ast.UnaryExpr)) },
func( *codec.Decoder) interface{} {
var *ast.UnaryExpr
decode_ast_UnaryExpr(, &)
return
})
}
func ( *codec.Encoder, *ast.ValueSpec) {
if !.StartStruct( == nil, ) {
return
}
if .Doc != nil {
.EncodeUint(0)
encode_ast_CommentGroup(, .Doc)
}
if .Names != nil {
.EncodeUint(1)
encode_slice_ast_Ident(, .Names)
}
if .Type != nil {
.EncodeUint(2)
.EncodeAny(.Type)
}
if .Values != nil {
.EncodeUint(3)
encode_slice_ast_Expr(, .Values)
}
if .Comment != nil {
.EncodeUint(4)
encode_ast_CommentGroup(, .Comment)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.ValueSpec) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.ValueSpec)
return
}
var ast.ValueSpec
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
decode_ast_CommentGroup(, &.Doc)
case 1:
decode_slice_ast_Ident(, &.Names)
case 2:
.Type = .DecodeAny().(ast.Expr)
case 3:
decode_slice_ast_Expr(, &.Values)
case 4:
decode_ast_CommentGroup(, &.Comment)
default:
.UnknownField("ast.ValueSpec", )
}
* = &
}
}
func () {
codec.Register(&ast.ValueSpec{},
func( *codec.Encoder, interface{}) { encode_ast_ValueSpec(, .(*ast.ValueSpec)) },
func( *codec.Decoder) interface{} {
var *ast.ValueSpec
decode_ast_ValueSpec(, &)
return
})
}
func ( *codec.Encoder, *encPackage) {
if !.StartStruct( == nil, ) {
return
}
if .Files != nil {
.EncodeUint(2)
encode_slice_File(, .Files)
}
if .ModulePackagePaths != nil {
.EncodeUint(3)
encode_map_string_bool(, .ModulePackagePaths)
}
.EndStruct()
}
func ( *codec.Decoder, **encPackage) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*encPackage)
return
}
var encPackage
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 2:
decode_slice_File(, &.Files)
case 3:
decode_map_string_bool(, &.ModulePackagePaths)
default:
.UnknownField("encPackage", )
}
* = &
}
}
func () {
codec.Register(&encPackage{},
func( *codec.Encoder, interface{}) { encode_encPackage(, .(*encPackage)) },
func( *codec.Decoder) interface{} {
var *encPackage
decode_encPackage(, &)
return
})
}
func ( *codec.Encoder, []ast.Expr) {
if == nil {
.EncodeNil()
return
}
.StartList(len())
for , := range {
.EncodeAny()
}
}
func ( *codec.Decoder, *[]ast.Expr) {
:= .StartList()
if < 0 {
return
}
:= make([]ast.Expr, )
for := 0; < ; ++ {
[] = .DecodeAny().(ast.Expr)
}
* =
}
func () {
codec.Register([]ast.Expr(nil),
func( *codec.Encoder, interface{}) { encode_slice_ast_Expr(, .([]ast.Expr)) },
func( *codec.Decoder) interface{} { var []ast.Expr; decode_slice_ast_Expr(, &); return })
}
func ( *codec.Encoder, []ast.Stmt) {
if == nil {
.EncodeNil()
return
}
.StartList(len())
for , := range {
.EncodeAny()
}
}
func ( *codec.Decoder, *[]ast.Stmt) {
:= .StartList()
if < 0 {
return
}
:= make([]ast.Stmt, )
for := 0; < ; ++ {
[] = .DecodeAny().(ast.Stmt)
}
* =
}
func () {
codec.Register([]ast.Stmt(nil),
func( *codec.Encoder, interface{}) { encode_slice_ast_Stmt(, .([]ast.Stmt)) },
func( *codec.Decoder) interface{} { var []ast.Stmt; decode_slice_ast_Stmt(, &); return })
}
func ( *codec.Encoder, []*ast.Comment) {
if == nil {
.EncodeNil()
return
}
.StartList(len())
for , := range {
encode_ast_Comment(, )
}
}
func ( *codec.Decoder, *[]*ast.Comment) {
:= .StartList()
if < 0 {
return
}
:= make([]*ast.Comment, )
for := 0; < ; ++ {
decode_ast_Comment(, &[])
}
* =
}
func () {
codec.Register([]*ast.Comment(nil),
func( *codec.Encoder, interface{}) { encode_slice_ast_Comment(, .([]*ast.Comment)) },
func( *codec.Decoder) interface{} { var []*ast.Comment; decode_slice_ast_Comment(, &); return })
}
func ( *codec.Encoder, []*ast.Field) {
if == nil {
.EncodeNil()
return
}
.StartList(len())
for , := range {
encode_ast_Field(, )
}
}
func ( *codec.Decoder, *[]*ast.Field) {
:= .StartList()
if < 0 {
return
}
:= make([]*ast.Field, )
for := 0; < ; ++ {
decode_ast_Field(, &[])
}
* =
}
func () {
codec.Register([]*ast.Field(nil),
func( *codec.Encoder, interface{}) { encode_slice_ast_Field(, .([]*ast.Field)) },
func( *codec.Decoder) interface{} { var []*ast.Field; decode_slice_ast_Field(, &); return })
}
func ( *codec.Encoder, []*ast.Ident) {
if == nil {
.EncodeNil()
return
}
.StartList(len())
for , := range {
encode_ast_Ident(, )
}
}
func ( *codec.Decoder, *[]*ast.Ident) {
:= .StartList()
if < 0 {
return
}
:= make([]*ast.Ident, )
for := 0; < ; ++ {
decode_ast_Ident(, &[])
}
* =
}
func () {
codec.Register([]*ast.Ident(nil),
func( *codec.Encoder, interface{}) { encode_slice_ast_Ident(, .([]*ast.Ident)) },
func( *codec.Decoder) interface{} { var []*ast.Ident; decode_slice_ast_Ident(, &); return })
}
func ( *codec.Encoder, []ast.Spec) {
if == nil {
.EncodeNil()
return
}
.StartList(len())
for , := range {
.EncodeAny()
}
}
func ( *codec.Decoder, *[]ast.Spec) {
:= .StartList()
if < 0 {
return
}
:= make([]ast.Spec, )
for := 0; < ; ++ {
[] = .DecodeAny().(ast.Spec)
}
* =
}
func () {
codec.Register([]ast.Spec(nil),
func( *codec.Encoder, interface{}) { encode_slice_ast_Spec(, .([]ast.Spec)) },
func( *codec.Decoder) interface{} { var []ast.Spec; decode_slice_ast_Spec(, &); return })
}
func ( *codec.Encoder, *ast.Object) {
if !.StartStruct( == nil, ) {
return
}
if .Kind != 0 {
.EncodeUint(0)
.EncodeInt(int64(.Kind))
}
if .Name != "" {
.EncodeUint(1)
.EncodeString(.Name)
}
if .Decl != nil {
.EncodeUint(2)
.EncodeAny(.Decl)
}
if .Data != nil {
.EncodeUint(3)
.EncodeAny(.Data)
}
if .Type != nil {
.EncodeUint(4)
.EncodeAny(.Type)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.Object) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.Object)
return
}
var ast.Object
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Kind = ast.ObjKind(.DecodeInt())
case 1:
.Name = .DecodeString()
case 2:
.Decl = .DecodeAny()
case 3:
.Data = .DecodeAny()
case 4:
.Type = .DecodeAny()
default:
.UnknownField("ast.Object", )
}
* = &
}
}
func () {
codec.Register(&ast.Object{},
func( *codec.Encoder, interface{}) { encode_ast_Object(, .(*ast.Object)) },
func( *codec.Decoder) interface{} {
var *ast.Object
decode_ast_Object(, &)
return
})
}
func ( *codec.Encoder, map[string]*ast.Object) {
if == nil {
.EncodeNil()
return
}
.StartList(2 * len())
for , := range {
.EncodeString()
encode_ast_Object(, )
}
}
func ( *codec.Decoder, *map[string]*ast.Object) {
:= .StartList()
if < 0 {
return
}
:= / 2
:= make(map[string]*ast.Object, )
var string
var *ast.Object
for := 0; < ; ++ {
= .DecodeString()
decode_ast_Object(, &)
[] =
}
* =
}
func () {
codec.Register(map[string]*ast.Object(nil),
func( *codec.Encoder, interface{}) { encode_map_string_ast_Object(, .(map[string]*ast.Object)) },
func( *codec.Decoder) interface{} {
var map[string]*ast.Object
decode_map_string_ast_Object(, &)
return
})
}
func ( *codec.Encoder, []*File) {
if == nil {
.EncodeNil()
return
}
.StartList(len())
for , := range {
encode_File(, )
}
}
func ( *codec.Decoder, *[]*File) {
:= .StartList()
if < 0 {
return
}
:= make([]*File, )
for := 0; < ; ++ {
decode_File(, &[])
}
* =
}
func () {
codec.Register([]*File(nil),
func( *codec.Encoder, interface{}) { encode_slice_File(, .([]*File)) },
func( *codec.Decoder) interface{} { var []*File; decode_slice_File(, &); return })
}
func ( *codec.Encoder, map[string]bool) {
if == nil {
.EncodeNil()
return
}
.StartList(2 * len())
for , := range {
.EncodeString()
.EncodeBool()
}
}
func ( *codec.Decoder, *map[string]bool) {
:= .StartList()
if < 0 {
return
}
:= / 2
:= make(map[string]bool, )
var string
var bool
for := 0; < ; ++ {
= .DecodeString()
= .DecodeBool()
[] =
}
* =
}
func () {
codec.Register(map[string]bool(nil),
func( *codec.Encoder, interface{}) { encode_map_string_bool(, .(map[string]bool)) },
func( *codec.Decoder) interface{} { var map[string]bool; decode_map_string_bool(, &); return })
}
func ( *codec.Encoder, *File) {
if !.StartStruct( == nil, ) {
return
}
if .Name != "" {
.EncodeUint(0)
.EncodeString(.Name)
}
if .AST != nil {
.EncodeUint(1)
encode_ast_File(, .AST)
}
.EndStruct()
}
func ( *codec.Decoder, **File) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*File)
return
}
var File
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
.Name = .DecodeString()
case 1:
decode_ast_File(, &.AST)
default:
.UnknownField("File", )
}
* = &
}
}
func () {
codec.Register(&File{},
func( *codec.Encoder, interface{}) { encode_File(, .(*File)) },
func( *codec.Decoder) interface{} {
var *File
decode_File(, &)
return
})
}
func ( *codec.Encoder, *ast.File) {
if !.StartStruct( == nil, ) {
return
}
if .Doc != nil {
.EncodeUint(0)
encode_ast_CommentGroup(, .Doc)
}
if .Package != 0 {
.EncodeUint(1)
.EncodeInt(int64(.Package))
}
if .Name != nil {
.EncodeUint(2)
encode_ast_Ident(, .Name)
}
if .Decls != nil {
.EncodeUint(3)
encode_slice_ast_Decl(, .Decls)
}
if .Scope != nil {
.EncodeUint(4)
encode_ast_Scope(, .Scope)
}
if .Imports != nil {
.EncodeUint(5)
encode_slice_ast_ImportSpec(, .Imports)
}
if .Unresolved != nil {
.EncodeUint(6)
encode_slice_ast_Ident(, .Unresolved)
}
if .Comments != nil {
.EncodeUint(7)
encode_slice_ast_CommentGroup(, .Comments)
}
.EndStruct()
}
func ( *codec.Decoder, **ast.File) {
, := .StartStruct()
if ! {
return
}
if != nil {
* = .(*ast.File)
return
}
var ast.File
.StoreRef(&)
for {
:= .NextStructField()
if < 0 {
break
}
switch {
case 0:
decode_ast_CommentGroup(, &.Doc)
case 1:
.Package = token.Pos(.DecodeInt())
case 2:
decode_ast_Ident(, &.Name)
case 3:
decode_slice_ast_Decl(, &.Decls)
case 4:
decode_ast_Scope(, &.Scope)
case 5:
decode_slice_ast_ImportSpec(, &.Imports)
case 6:
decode_slice_ast_Ident(, &.Unresolved)
case 7:
decode_slice_ast_CommentGroup(, &.Comments)
default:
.UnknownField("ast.File", )
}
* = &
}
}
func () {
codec.Register(&ast.File{},
func( *codec.Encoder, interface{}) { encode_ast_File(, .(*ast.File)) },
func( *codec.Decoder) interface{} {
var *ast.File
decode_ast_File(, &)
return
})
}
func ( *codec.Encoder, []ast.Decl) {
if == nil {
.EncodeNil()
return
}
.StartList(len())
for , := range {
.EncodeAny()
}
}
func ( *codec.Decoder, *[]ast.Decl) {
:= .StartList()
if < 0 {
return
}
:= make([]ast.Decl, )
for := 0; < ; ++ {
[] = .DecodeAny().(ast.Decl)
}
* =
}
func () {
codec.Register([]ast.Decl(nil),
func( *codec.Encoder, interface{}) { encode_slice_ast_Decl(, .([]ast.Decl)) },
func( *codec.Decoder) interface{} { var []ast.Decl; decode_slice_ast_Decl(, &); return })
}
func ( *codec.Encoder, []*ast.ImportSpec) {
if == nil {
.EncodeNil()
return
}
.StartList(len())
for , := range {
encode_ast_ImportSpec(, )
}
}
func ( *codec.Decoder, *[]*ast.ImportSpec) {
:= .StartList()
if < 0 {
return
}
:= make([]*ast.ImportSpec, )
for := 0; < ; ++ {
decode_ast_ImportSpec(, &[])
}
* =
}
func () {
codec.Register([]*ast.ImportSpec(nil),
func( *codec.Encoder, interface{}) { encode_slice_ast_ImportSpec(, .([]*ast.ImportSpec)) },
func( *codec.Decoder) interface{} {
var []*ast.ImportSpec
decode_slice_ast_ImportSpec(, &)
return
})
}
func ( *codec.Encoder, []*ast.CommentGroup) {
if == nil {
.EncodeNil()
return
}
.StartList(len())
for , := range {
encode_ast_CommentGroup(, )
}
}
func ( *codec.Decoder, *[]*ast.CommentGroup) {
:= .StartList()
if < 0 {
return
}
:= make([]*ast.CommentGroup, )
for := 0; < ; ++ {
decode_ast_CommentGroup(, &[])
}
* =
}
func () {
codec.Register([]*ast.CommentGroup(nil),
func( *codec.Encoder, interface{}) { encode_slice_ast_CommentGroup(, .([]*ast.CommentGroup)) },
func( *codec.Decoder) interface{} {
var []*ast.CommentGroup
decode_slice_ast_CommentGroup(, &)
return
})
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |