Documentation ¶
Index ¶
- Constants
- type DummySymbolMgrBuilder
- type Symbol
- type SymbolMgr
- func (sm *SymbolMgr) AllSymbols() map[string]*Symbol
- func (sm *SymbolMgr) ExpandType(varType string) string
- func (sm *SymbolMgr) GetSymbol(name string) (*Symbol, error)
- func (sm *SymbolMgr) Peek() map[string]*Symbol
- func (sm *SymbolMgr) Pop()
- func (sm *SymbolMgr) Push(symbols map[string]*Symbol)
- func (sm *SymbolMgr) Size() int
Constants ¶
View Source
const ( TypeArg = iota TypeImport TypeVar TypeFor )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DummySymbolMgrBuilder ¶
type DummySymbolMgrBuilder struct {
// contains filtered or unexported fields
}
func NewSymbolMgrBuilder ¶
func NewSymbolMgrBuilder() *DummySymbolMgrBuilder
func (*DummySymbolMgrBuilder) AddArg ¶
func (b *DummySymbolMgrBuilder) AddArg(name string, isPb bool)
func (*DummySymbolMgrBuilder) AddImport ¶
func (b *DummySymbolMgrBuilder) AddImport(name string, isPb bool, path, pbPkg string)
func (*DummySymbolMgrBuilder) Build ¶
func (b *DummySymbolMgrBuilder) Build() *SymbolMgr
type SymbolMgr ¶
type SymbolMgr struct {
// contains filtered or unexported fields
}
SymbolMgr manages all symbols of a template.
func (*SymbolMgr) AllSymbols ¶
func (*SymbolMgr) ExpandType ¶
ExpandType expands the given PB type with full qualified name, or the input unchanged if it's not a PB type.
func (*SymbolMgr) GetSymbol ¶
GetSymbol returns a symbol for the given name. It searches the name in each map of stack from top to bottom, so that if a name was defined twice, the higher one in stack shadows the lower one.
func (*SymbolMgr) Pop ¶
func (sm *SymbolMgr) Pop()
Pop pops and drop the top symbol map in the stack.
Click to show internal directories.
Click to hide internal directories.