Support attributes in PSmap code generator.
This commit is contained in:
parent
67cb3de46e
commit
c89a99b8dd
@ -170,6 +170,12 @@ def parse_psmap(data: bytes, offset: str, rootname: str) -> Node:
|
|||||||
node = Node.bool_array(name, [False] * elements)
|
node = Node.bool_array(name, [False] * elements)
|
||||||
else:
|
else:
|
||||||
node = Node.bool(name, False)
|
node = Node.bool(name, False)
|
||||||
|
elif nodetype == 0x2F:
|
||||||
|
# Special case, this is an attribute
|
||||||
|
if name[-1] != '@':
|
||||||
|
raise Exception(f'Attribute name {name} expected to end with @')
|
||||||
|
root.set_attribute(name[:-1], '')
|
||||||
|
continue
|
||||||
else:
|
else:
|
||||||
raise Exception(f'Unimplemented node type 0x{nodetype:02x}')
|
raise Exception(f'Unimplemented node type 0x{nodetype:02x}')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user