1
0
mirror of https://github.com/fumiama/gozel.git synced 2026-06-27 14:20:28 +08:00

feat(gen&zecall): add function support

This commit is contained in:
源文雨
2026-03-22 18:12:12 +08:00
parent e91efbc86f
commit 64f95b23a7
33 changed files with 9568 additions and 265 deletions

View File

@@ -39,23 +39,35 @@ const (
symbolTypeFunc
)
type symbolSubType uintptr
const (
symbolSubTypeDefine symbolSubType = iota
symbolSubTypeEmptyStruct
symbolSubTypeLargeStruct
symbolSubTypeEnum
)
type symbol struct {
stype symbolType
sstype symbolSubType
name string
fields []string
}
func newSymbolConst(name, val string) *symbol {
func newSymbolConst(name, val string, sstype symbolSubType) *symbol {
return &symbol{
stype: symbolTypeConst,
sstype: sstype,
name: name,
fields: []string{val},
}
}
func newSymbolFunc(name, paras, evals string) *symbol {
func newSymbolFunc(name, paras, evals string, sstype symbolSubType) *symbol {
return &symbol{
stype: symbolTypeFunc,
sstype: sstype,
name: name,
fields: []string{paras, evals},
}