mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-02 20:54:23 +01:00
bolt-gen: use 'enum' instead of 'e:' prefix for enums
use 'enum ' in wirespec instead of 'e:' as an indicator that a field is an enum.
This commit is contained in:
committed by
Rusty Russell
parent
b6d4c372bb
commit
46cbca97ea
@@ -239,8 +239,8 @@ class Type(FieldSet):
|
||||
self.tlv = False
|
||||
|
||||
def parse_name(self, name):
|
||||
if name.startswith('e:'):
|
||||
return name[2:], True
|
||||
if name.startswith('enum '):
|
||||
return name[5:], True
|
||||
return name, False
|
||||
|
||||
def add_data_field(self, field_name, type_obj, count=1,
|
||||
|
||||
@@ -26,7 +26,7 @@ msgdata,test_msg,test_varsize_struct_varlen,test_features,len_varsize_struct
|
||||
# assignable
|
||||
msgdata,test_msg,test_assignable,u16,
|
||||
# enum
|
||||
msgdata,test_msg,test_enum,e:test_enum,
|
||||
msgdata,test_msg,test_enum,enum test_enum,
|
||||
# test struct
|
||||
msgdata,test_msg,test_struct,test_short_id,
|
||||
# test var-size struct
|
||||
|
||||
Reference in New Issue
Block a user