Big nasty commit to add code generation for encoding
This commit is contained in:
@@ -21,28 +21,7 @@ func Parse(lx parse.Lexer) (*Protocol, error) {
|
||||
func defaultProtocol() Protocol {
|
||||
return Protocol {
|
||||
Messages: make(map[uint16] Message),
|
||||
Types: map[string] Type {
|
||||
"U8": TypeInt { Bits: 8 },
|
||||
"U16": TypeInt { Bits: 16 },
|
||||
"U32": TypeInt { Bits: 32 },
|
||||
"U64": TypeInt { Bits: 64 },
|
||||
"U128": TypeInt { Bits: 128 },
|
||||
"U256": TypeInt { Bits: 256 },
|
||||
"I8": TypeInt { Bits: 8, Signed: true },
|
||||
"I16": TypeInt { Bits: 16, Signed: true },
|
||||
"I32": TypeInt { Bits: 32, Signed: true },
|
||||
"I64": TypeInt { Bits: 64, Signed: true },
|
||||
"I128": TypeInt { Bits: 128, Signed: true },
|
||||
"I256": TypeInt { Bits: 256, Signed: true },
|
||||
"F16": TypeFloat { Bits: 16 },
|
||||
"F32": TypeFloat { Bits: 32 },
|
||||
"F64": TypeFloat { Bits: 64 },
|
||||
"F128": TypeFloat { Bits: 128 },
|
||||
"F256": TypeFloat { Bits: 256 },
|
||||
"String": TypeString { },
|
||||
"Buffer": TypeBuffer { },
|
||||
"Table": TypeTable { },
|
||||
},
|
||||
Types: map[string] Type { },
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user