github.com/mattn/anko@v0.1.10/ast/ast.go (about)

     1  package ast
     2  
     3  // Token is used in the lexer to split characters into a string called a token
     4  type Token struct {
     5  	PosImpl
     6  	Tok int
     7  	Lit string
     8  }
     9  
    10  // TypeKind is the kinds of types
    11  type TypeKind int
    12  
    13  const (
    14  	// TypeDefault default type
    15  	TypeDefault TypeKind = iota
    16  	// TypePtr ptr type
    17  	TypePtr
    18  	// TypeSlice slice type
    19  	TypeSlice
    20  	// TypeMap map type
    21  	TypeMap
    22  	// TypeChan chan type
    23  	TypeChan
    24  	// TypeStructType struct type
    25  	TypeStructType
    26  )
    27  
    28  // TypeStruct is the type and sub-types
    29  type TypeStruct struct {
    30  	Kind        TypeKind
    31  	Env         []string
    32  	Name        string
    33  	Dimensions  int
    34  	SubType     *TypeStruct
    35  	Key         *TypeStruct
    36  	StructNames []string
    37  	StructTypes []*TypeStruct
    38  }