build: separate compiler and libs

This commit is contained in:
Li Jie
2025-01-07 21:49:08 +08:00
parent b0123567cd
commit 1172e5bdce
559 changed files with 190 additions and 176 deletions

View File

@@ -0,0 +1,39 @@
package main
import "github.com/goplus/llgo/c"
type mSpanList struct {
first *mspan
last *mspan
}
type minfo struct {
span *mspan
info int
}
type mspan struct {
next *mspan
prev *mspan
list *mSpanList
info minfo
value int
check func(int) int
}
func main() {
m := &mspan{}
m.value = 100
m.next = &mspan{}
m.next.value = 200
m.list = &mSpanList{}
m.list.last = &mspan{}
m.list.last.value = 300
m.info.info = 10
m.info.span = m
m.check = func(n int) int {
return m.value * n
}
c.Printf(c.Str("%d %d %d %d %d %d\n"), m.next.value, m.list.last.value, m.info.info,
m.info.span.value, m.check(-2), m.info.span.check(-3))
}