generate: Add PDL language structures

This commit is contained in:
Sasha Koshka 2025-06-07 22:38:20 -04:00
parent 8ece6436b8
commit 6bc98b3f77

47
generate/protocol.go Normal file
View File

@ -0,0 +1,47 @@
package generate
type Protocol struct {
Messages map[uint16] Message
Types map[string] Type
}
type Message struct {
Name string
Type Type
}
type Type interface {
}
type TypeInt struct {
Bits int
Signed bool
}
type TypeFloat struct {
Bits int
}
type TypeString struct { }
type TypeBuffer struct { }
type TypeArray struct {
Element Type
}
type TypeTable struct { }
type TypeTableDefined struct {
Fields map[uint16] Field
}
type Field struct {
Name string
Type Type
}
type TypeNamed struct {
Name string
}