Documentation ¶
Index ¶
- type Accessor
- func (a *Accessor) CToGoUnderlyingType(cIdent *gotypes.Identifier) (*gotypes.Identifier, error)
- func (a *Accessor) CurrentTable() (string, symbols.SymbolLookable)
- func (a *Accessor) FindFirstNonIdSymbol(typeDef gotypes.DataType) (gotypes.DataType, error)
- func (a *Accessor) FindFirstNonidDataType(typeDef gotypes.DataType) (gotypes.DataType, error)
- func (a *Accessor) FindFirstNonidVariable(typeDef gotypes.DataType) (gotypes.DataType, error)
- func (a *Accessor) FindLastIdDataType(typeDef gotypes.DataType) (gotypes.DataType, error)
- func (a *Accessor) GetBuiltin(name string) (*symbols.SymbolDef, symbols.SymbolType, error)
- func (a *Accessor) GetBuiltinDataType(name string) (*symbols.SymbolDef, symbols.SymbolLookable, error)
- func (a *Accessor) IsBuiltin(name string) bool
- func (a *Accessor) IsBuiltinConstantType(name string) bool
- func (a *Accessor) IsCIntegral(name string) bool
- func (a *Accessor) IsComplex(name string) bool
- func (a *Accessor) IsDataTypeInterface(typeDef gotypes.DataType) (bool, error)
- func (a *Accessor) IsFloating(name string) bool
- func (a *Accessor) IsIntegral(name string) bool
- func (a *Accessor) IsPointerType(def gotypes.DataType) bool
- func (a *Accessor) IsUintegral(name string) bool
- func (a *Accessor) Lookup(ident *gotypes.Identifier) (*symbols.SymbolDef, symbols.SymbolType, symbols.SymbolLookable, error)
- func (a *Accessor) LookupAllMethods(ident *gotypes.Identifier) (map[string]*symbols.SymbolDef, error)
- func (a *Accessor) LookupDataType(ident *gotypes.Identifier) (*symbols.SymbolDef, symbols.SymbolLookable, error)
- func (a *Accessor) LookupMethod(ident *gotypes.Identifier, method string) (*symbols.SymbolDef, error)
- func (a *Accessor) LookupPackage(packageName string) (symbols.SymbolLookable, error)
- func (a *Accessor) LookupVariableLike(ident *gotypes.Identifier) (*symbols.SymbolDef, symbols.SymbolLookable, error)
- func (a *Accessor) ResolveToUnderlyingType(typeDef gotypes.DataType) (*UnderlyingType, error)
- func (a *Accessor) RetrieveDataTypeField(accessor *FieldAccessor) (*FieldAttribute, error)
- func (a *Accessor) RetrieveInterfaceMethod(pkgsymboltable symbols.SymbolLookable, interfaceDefsymbol *symbols.SymbolDef, ...) (*FieldAttribute, error)
- func (a *Accessor) RetrieveQid(qidprefix gotypes.DataType, item *ast.Ident) (symbols.SymbolLookable, *symbols.SymbolDef, symbols.SymbolType, error)
- func (a *Accessor) RetrieveQidDataType(qidprefix gotypes.DataType, item *ast.Ident) (symbols.SymbolLookable, *symbols.SymbolDef, error)
- func (a *Accessor) RetrieveStructFieldAtIndex(structDef *gotypes.Struct, idx int) (gotypes.DataType, error)
- func (a *Accessor) SetCurrentTable(packageName string, symbolTable symbols.SymbolLookable) *Accessor
- func (a *Accessor) TypeToSimpleBuiltin(typeDef gotypes.DataType) (*gotypes.Identifier, error)
- type FieldAccessor
- type FieldAttribute
- type UnderlyingType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accessor ¶
type Accessor struct {
// contains filtered or unexported fields
}
func NewAccessor ¶
func (*Accessor) CToGoUnderlyingType ¶
func (a *Accessor) CToGoUnderlyingType(cIdent *gotypes.Identifier) (*gotypes.Identifier, error)
func (*Accessor) CurrentTable ¶
func (a *Accessor) CurrentTable() (string, symbols.SymbolLookable)
func (*Accessor) FindFirstNonIdSymbol ¶
func (*Accessor) FindFirstNonidDataType ¶
func (*Accessor) FindFirstNonidVariable ¶
func (*Accessor) FindLastIdDataType ¶
func (*Accessor) GetBuiltin ¶
func (*Accessor) GetBuiltinDataType ¶
func (*Accessor) IsBuiltinConstantType ¶
func (*Accessor) IsCIntegral ¶
func (*Accessor) IsDataTypeInterface ¶
func (*Accessor) IsFloating ¶
func (*Accessor) IsIntegral ¶
func (*Accessor) IsUintegral ¶
func (*Accessor) Lookup ¶
func (a *Accessor) Lookup(ident *gotypes.Identifier) (*symbols.SymbolDef, symbols.SymbolType, symbols.SymbolLookable, error)
Lookup retrieves a definition of identifier ident
func (*Accessor) LookupAllMethods ¶
func (*Accessor) LookupDataType ¶
func (a *Accessor) LookupDataType(ident *gotypes.Identifier) (*symbols.SymbolDef, symbols.SymbolLookable, error)
func (*Accessor) LookupMethod ¶
func (*Accessor) LookupPackage ¶
func (a *Accessor) LookupPackage(packageName string) (symbols.SymbolLookable, error)
func (*Accessor) LookupVariableLike ¶
func (a *Accessor) LookupVariableLike(ident *gotypes.Identifier) (*symbols.SymbolDef, symbols.SymbolLookable, error)
func (*Accessor) ResolveToUnderlyingType ¶
func (a *Accessor) ResolveToUnderlyingType(typeDef gotypes.DataType) (*UnderlyingType, error)
func (*Accessor) RetrieveDataTypeField ¶
func (a *Accessor) RetrieveDataTypeField(accessor *FieldAccessor) (*FieldAttribute, error)
Get a struct's field. Given a struct can embedded another struct from a different package, the method must be able to access symbol tables of other packages. Thus recursively process struct's definition up to all its embedded fields. TODO(jchaloup): return symbol table of the returned data type
func (*Accessor) RetrieveInterfaceMethod ¶
func (a *Accessor) RetrieveInterfaceMethod(pkgsymboltable symbols.SymbolLookable, interfaceDefsymbol *symbols.SymbolDef, method string) (*FieldAttribute, error)
TODO(jchaloup): return symbol table of the returned data type
func (*Accessor) RetrieveQid ¶
func (*Accessor) RetrieveQidDataType ¶
func (*Accessor) RetrieveStructFieldAtIndex ¶
func (*Accessor) SetCurrentTable ¶
func (a *Accessor) SetCurrentTable(packageName string, symbolTable symbols.SymbolLookable) *Accessor
func (*Accessor) TypeToSimpleBuiltin ¶
type FieldAccessor ¶
type FieldAccessor struct {
// contains filtered or unexported fields
}
func NewFieldAccessor ¶
func NewFieldAccessor(symbolTable symbols.SymbolLookable, dataTypeDef *symbols.SymbolDef, field *ast.Ident) *FieldAccessor
func (*FieldAccessor) SetDropFieldsOnly ¶
func (f *FieldAccessor) SetDropFieldsOnly() *FieldAccessor
func (*FieldAccessor) SetFieldsOnly ¶
func (f *FieldAccessor) SetFieldsOnly() *FieldAccessor
func (*FieldAccessor) SetMethodsOnly ¶
func (f *FieldAccessor) SetMethodsOnly() *FieldAccessor
type FieldAttribute ¶
Click to show internal directories.
Click to hide internal directories.