From 6bc98b3f772327df13f2e21e6b62c16046f397c5 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Sat, 7 Jun 2025 22:38:20 -0400 Subject: [PATCH] generate: Add PDL language structures --- generate/protocol.go | 47 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 generate/protocol.go diff --git a/generate/protocol.go b/generate/protocol.go new file mode 100644 index 0000000..1c3ebc4 --- /dev/null +++ b/generate/protocol.go @@ -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 +}