tgo: Allow anonymous function declarations
Not sure why they're needed right now, though...
Этот коммит содержится в:
родитель
588910792d
коммит
5fa39adb81
1 изменённых файлов: 8 добавлений и 0 удалений
8
tgo.go
8
tgo.go
|
@ -392,6 +392,14 @@ func (c *Compiler) parsePackage(program *ssa.Program, pkg *ssa.Package) error {
|
|||
if member.Synthetic == "package initializer" {
|
||||
c.initFuncs = append(c.initFuncs, frame.llvmFn)
|
||||
}
|
||||
// TODO: recursively anonymous functions
|
||||
for _, child := range member.AnonFuncs {
|
||||
frame, err := c.parseFuncDecl(child)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
frames[child] = frame
|
||||
}
|
||||
case *ssa.NamedConst:
|
||||
// Ignore package-level untyped constants. The SSA form doesn't need
|
||||
// them.
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче