...

Source file src/go/ast/ast_notypeparams.go

Documentation: go/ast

		 1  // Copyright 2021 The Go Authors. All rights reserved.
		 2  // Use of this source code is governed by a BSD-style
		 3  // license that can be found in the LICENSE file.
		 4  
		 5  //go:build !typeparams
		 6  // +build !typeparams
		 7  
		 8  package ast
		 9  
		10  import "go/token"
		11  
		12  type (
		13  	// A FuncType node represents a function type.
		14  	FuncType struct {
		15  		Func		token.Pos	// position of "func" keyword (token.NoPos if there is no "func")
		16  		Params	*FieldList // (incoming) parameters; non-nil
		17  		Results *FieldList // (outgoing) results; or nil
		18  	}
		19  
		20  	// A TypeSpec node represents a type declaration (TypeSpec production).
		21  	TypeSpec struct {
		22  		Doc		 *CommentGroup // associated documentation; or nil
		23  		Name		*Ident				// type name
		24  		Assign	token.Pos		 // position of '=', if any
		25  		Type		Expr					// *Ident, *ParenExpr, *SelectorExpr, *StarExpr, or any of the *XxxTypes
		26  		Comment *CommentGroup // line comments; or nil
		27  	}
		28  )
		29  

View as plain text