Beispiel #1
0
func newBuilder() *builder {
	ret := new(builder)
	ret.ErrorList = lex8.NewErrorList()
	ret.scope = sym8.NewScope()
	ret.indices = make(map[string]uint32)
	ret.pkgUsed = make(map[string]struct{})

	return ret
}
Beispiel #2
0
func newBuilder(path string) *builder {
	ret := new(builder)
	ret.ErrorList = lex8.NewErrorList()
	ret.path = path
	ret.p = ir.NewPkg(path)
	ret.scope = sym8.NewScope() // package scope

	ret.continues = newBlockStack()
	ret.breaks = newBlockStack()

	return ret
}